added remember me feature #53 (#98)

cleanup event subscriber
This commit is contained in:
Kevin Papst
2018-01-17 19:55:26 +01:00
committed by GitHub
parent 7df21f3f5a
commit 9a161b8fd9
26 changed files with 193 additions and 116 deletions

View File

@@ -36,6 +36,19 @@ abstract class AbstractVoter extends Voter
$this->decisionManager = $decisionManager;
}
/**
* @param TokenInterface $token
* @return bool
*/
protected function isFullyAuthenticated(TokenInterface $token)
{
if ($this->decisionManager->decide($token, ['IS_AUTHENTICATED_FULLY'])) {
return true;
}
return false;
}
/**
* @param string $role
* @param TokenInterface $token
@@ -43,7 +56,7 @@ abstract class AbstractVoter extends Voter
*/
protected function hasRole($role, TokenInterface $token)
{
if ($this->decisionManager->decide($token, array($role))) {
if ($this->decisionManager->decide($token, [$role])) {
return true;
}