diff options
-rw-r--r-- | Core/Authentication/Token/AnonymousToken.php | 2 | ||||
-rw-r--r-- | Core/Authentication/Token/PreAuthenticatedToken.php | 2 | ||||
-rw-r--r-- | Core/Authentication/Token/TokenInterface.php | 2 | ||||
-rw-r--r-- | Core/Authentication/Token/UsernamePasswordToken.php | 2 | ||||
-rw-r--r-- | Core/User/InMemoryUserProvider.php | 2 | ||||
-rw-r--r-- | Core/User/LdapUserProvider.php | 2 | ||||
-rw-r--r-- | Guard/GuardAuthenticatorInterface.php | 14 | ||||
-rw-r--r-- | Http/Authentication/DefaultAuthenticationFailureHandler.php | 2 | ||||
-rw-r--r-- | Http/Authentication/DefaultAuthenticationSuccessHandler.php | 2 |
9 files changed, 17 insertions, 13 deletions
diff --git a/Core/Authentication/Token/AnonymousToken.php b/Core/Authentication/Token/AnonymousToken.php index 2c73cb4..76c88ba 100644 --- a/Core/Authentication/Token/AnonymousToken.php +++ b/Core/Authentication/Token/AnonymousToken.php @@ -26,7 +26,7 @@ class AnonymousToken extends AbstractToken * Constructor. * * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client - * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string. + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string * @param RoleInterface[] $roles An array of roles */ public function __construct($secret, $user, array $roles = array()) diff --git a/Core/Authentication/Token/PreAuthenticatedToken.php b/Core/Authentication/Token/PreAuthenticatedToken.php index 5a3fc95..b4b5e70 100644 --- a/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/Core/Authentication/Token/PreAuthenticatedToken.php @@ -26,7 +26,7 @@ class PreAuthenticatedToken extends AbstractToken /** * Constructor. * - * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string. + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string * @param mixed $credentials The user credentials * @param string $providerKey The provider key * @param RoleInterface[]|string[] $roles An array of roles diff --git a/Core/Authentication/Token/TokenInterface.php b/Core/Authentication/Token/TokenInterface.php index be90802..4e1dd7b 100644 --- a/Core/Authentication/Token/TokenInterface.php +++ b/Core/Authentication/Token/TokenInterface.php @@ -33,7 +33,7 @@ interface TokenInterface extends \Serializable /** * Returns the user roles. * - * @return RoleInterface[] An array of RoleInterface instances. + * @return RoleInterface[] An array of RoleInterface instances */ public function getRoles(); diff --git a/Core/Authentication/Token/UsernamePasswordToken.php b/Core/Authentication/Token/UsernamePasswordToken.php index 9248136..33b00f0 100644 --- a/Core/Authentication/Token/UsernamePasswordToken.php +++ b/Core/Authentication/Token/UsernamePasswordToken.php @@ -26,7 +26,7 @@ class UsernamePasswordToken extends AbstractToken /** * Constructor. * - * @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method. + * @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method * @param string $credentials This usually is the password of the user * @param string $providerKey The provider key * @param RoleInterface[]|string[] $roles An array of roles diff --git a/Core/User/InMemoryUserProvider.php b/Core/User/InMemoryUserProvider.php index c1981de..e09d72e 100644 --- a/Core/User/InMemoryUserProvider.php +++ b/Core/User/InMemoryUserProvider.php @@ -97,7 +97,7 @@ class InMemoryUserProvider implements UserProviderInterface /** * Returns the user by given username. * - * @param string $username The username. + * @param string $username The username * * @return User * diff --git a/Core/User/LdapUserProvider.php b/Core/User/LdapUserProvider.php index 5eb7668..fc42419 100644 --- a/Core/User/LdapUserProvider.php +++ b/Core/User/LdapUserProvider.php @@ -111,7 +111,7 @@ class LdapUserProvider implements UserProviderInterface * * @return User */ - private function loadUser($username, Entry $entry) + protected function loadUser($username, Entry $entry) { $password = $this->getPassword($entry); diff --git a/Guard/GuardAuthenticatorInterface.php b/Guard/GuardAuthenticatorInterface.php index 947594c..b28f06d 100644 --- a/Guard/GuardAuthenticatorInterface.php +++ b/Guard/GuardAuthenticatorInterface.php @@ -39,11 +39,15 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * Whatever value you return here will be passed to getUser() and checkCredentials() * * For example, for a form login, you might: - * - * return array( - * 'username' => $request->request->get('_username'), - * 'password' => $request->request->get('_password'), - * ); + * + * if ($request->request->has('_username')) { + * return array( + * 'username' => $request->request->get('_username'), + * 'password' => $request->request->get('_password'), + * ); + * } else { + * return; + * } * * Or for an API token that's on a header, you might use: * diff --git a/Http/Authentication/DefaultAuthenticationFailureHandler.php b/Http/Authentication/DefaultAuthenticationFailureHandler.php index 3e63992..ea5c356 100644 --- a/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -47,7 +47,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle * * @param HttpKernelInterface $httpKernel * @param HttpUtils $httpUtils - * @param array $options Options for processing a failed authentication attempt. + * @param array $options Options for processing a failed authentication attempt * @param LoggerInterface $logger Optional logger */ public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options = array(), LoggerInterface $logger = null) diff --git a/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 38690c7..4cb4bb6 100644 --- a/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -43,7 +43,7 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle * Constructor. * * @param HttpUtils $httpUtils - * @param array $options Options for processing a successful authentication attempt. + * @param array $options Options for processing a successful authentication attempt */ public function __construct(HttpUtils $httpUtils, array $options = array()) { |