|
@@ -41,16 +41,6 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
|
|
$this->hideUserNotFoundExceptions = $hideUserNotFoundExceptions;
|
|
$this->hideUserNotFoundExceptions = $hideUserNotFoundExceptions;
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * Does additional checks on the user and token (like validating the credentials).
|
|
|
|
- *
|
|
|
|
- * @param AccountInterface $account The retrieved AccountInterface instance
|
|
|
|
- * @param UsernamePasswordToken $token The UsernamePasswordToken token to be authenticated
|
|
|
|
- *
|
|
|
|
- * @throws AuthenticationException if the credentials could not be validated
|
|
|
|
- */
|
|
|
|
- abstract protected function checkAuthentication(AccountInterface $account, UsernamePasswordToken $token);
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* {@inheritdoc}
|
|
* {@inheritdoc}
|
|
*/
|
|
*/
|
|
@@ -88,6 +78,14 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
|
|
return new UsernamePasswordToken($user, $token->getCredentials(), $user->getRoles());
|
|
return new UsernamePasswordToken($user, $token->getCredentials(), $user->getRoles());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * {@inheritdoc}
|
|
|
|
+ */
|
|
|
|
+ public function supports(TokenInterface $token)
|
|
|
|
+ {
|
|
|
|
+ return $token instanceof UsernamePasswordToken;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Retrieves the user from an implementation-specific location.
|
|
* Retrieves the user from an implementation-specific location.
|
|
*
|
|
*
|
|
@@ -101,10 +99,13 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
|
|
abstract protected function retrieveUser($username, UsernamePasswordToken $token);
|
|
abstract protected function retrieveUser($username, UsernamePasswordToken $token);
|
|
|
|
|
|
/**
|
|
/**
|
|
- * {@inheritdoc}
|
|
|
|
|
|
+ * Does additional checks on the user and token (like validating the
|
|
|
|
+ * credentials).
|
|
|
|
+ *
|
|
|
|
+ * @param AccountInterface $account The retrieved AccountInterface instance
|
|
|
|
+ * @param UsernamePasswordToken $token The UsernamePasswordToken token to be authenticated
|
|
|
|
+ *
|
|
|
|
+ * @throws AuthenticationException if the credentials could not be validated
|
|
*/
|
|
*/
|
|
- public function supports(TokenInterface $token)
|
|
|
|
- {
|
|
|
|
- return $token instanceof UsernamePasswordToken;
|
|
|
|
- }
|
|
|
|
|
|
+ abstract protected function checkAuthentication(AccountInterface $account, UsernamePasswordToken $token);
|
|
}
|
|
}
|