diff options
author | Ryan Weaver <ryan@thatsquality.com> | 2015-05-17 18:16:06 -0400 |
---|---|---|
committer | Ryan Weaver <ryan@thatsquality.com> | 2015-09-20 19:24:21 -0400 |
commit | 5fa45716c9461a07f03428754d2bb05a0e6f2943 (patch) | |
tree | 27b675465cbc2a7e93ed806cac2571964f2c2233 /Guard/GuardAuthenticatorInterface.php | |
parent | 43d1a03737bdc39a9e70c7b6bc7792c912b46082 (diff) | |
download | symfony-security-5fa45716c9461a07f03428754d2bb05a0e6f2943.zip symfony-security-5fa45716c9461a07f03428754d2bb05a0e6f2943.tar.gz symfony-security-5fa45716c9461a07f03428754d2bb05a0e6f2943.tar.bz2 |
Thanks fabbot!
Diffstat (limited to 'Guard/GuardAuthenticatorInterface.php')
-rw-r--r-- | Guard/GuardAuthenticatorInterface.php | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Guard/GuardAuthenticatorInterface.php b/Guard/GuardAuthenticatorInterface.php index f6405e9..0b4306c 100644 --- a/Guard/GuardAuthenticatorInterface.php +++ b/Guard/GuardAuthenticatorInterface.php @@ -12,7 +12,7 @@ use Symfony\Component\Security\Guard\Token\GuardTokenInterface; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; /** - * The interface for all "guard" authenticators + * The interface for all "guard" authenticators. * * The methods on this interface are called throughout the guard authentication * process to give you the power to control most parts of the process from @@ -41,39 +41,44 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * return array('api_key' => $request->headers->get('X-API-TOKEN')); * * @param Request $request + * * @return mixed|null */ public function getCredentialsFromRequest(Request $request); /** * Return a UserInterface object based on the credentials OR throw - * an AuthenticationException + * an AuthenticationException. * * The *credentials* are the return value from getCredentialsFromRequest() * - * @param mixed $credentials + * @param mixed $credentials * @param UserProviderInterface $userProvider + * * @throws AuthenticationException + * * @return UserInterface */ public function authenticate($credentials, UserProviderInterface $userProvider); /** - * Create an authenticated token for the given user + * Create an authenticated token for the given user. * * If you don't care about which token class is used or don't really * understand what a "token" is, you can skip this method by extending * the AbstractGuardAuthenticator class from your authenticator. * * @see AbstractGuardAuthenticator + * * @param UserInterface $user - * @param string $providerKey The provider (i.e. firewall) key + * @param string $providerKey The provider (i.e. firewall) key + * * @return GuardTokenInterface */ public function createAuthenticatedToken(UserInterface $user, $providerKey); /** - * Called when authentication executed, but failed (e.g. wrong username password) + * Called when authentication executed, but failed (e.g. wrong username password). * * This should return the Response sent back to the user, like a * RedirectResponse to the login page or a 403 response. @@ -81,8 +86,9 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * If you return null, the request will continue, but the user will * not be authenticated. This is probably not what you want to do. * - * @param Request $request + * @param Request $request * @param AuthenticationException $exception + * * @return Response|null */ public function onAuthenticationFailure(Request $request, AuthenticationException $exception); @@ -96,9 +102,10 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * If you return null, the current request will continue, and the user * will be authenticated. This makes sense, for example, with an API. * - * @param Request $request + * @param Request $request * @param TokenInterface $token - * @param string $providerKey The provider (i.e. firewall) key + * @param string $providerKey The provider (i.e. firewall) key + * * @return Response|null */ public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey); |