Symfony2 API
Class

Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider

abstract class UserAuthenticationProvider implements AuthenticationProviderInterface

UserProviderInterface retrieves users for UsernamePasswordToken tokens.

Methods

__construct(UserCheckerInterface $userChecker, string $providerKey, Boolean $hideUserNotFoundExceptions = true)

Constructor.

TokenInterface authenticate(TokenInterface $token)

Attempts to authenticates a TokenInterface object.

Boolean supports(TokenInterface $token)

Checks whether this provider supports the given token.

Details

at line 43
public __construct(UserCheckerInterface $userChecker, string $providerKey, Boolean $hideUserNotFoundExceptions = true)

Constructor.

Parameters

UserCheckerInterface $userChecker An UserCheckerInterface interface
string $providerKey A provider key
Boolean $hideUserNotFoundExceptions Whether to hide user not found exception or not

Exceptions

InvalidArgumentException

at line 57
public TokenInterface authenticate(TokenInterface $token)

Attempts to authenticates a TokenInterface object.

Parameters

TokenInterface $token The TokenInterface instance to authenticate

Return Value

TokenInterface An authenticated TokenInterface instance, never null

Exceptions

AuthenticationException if the authentication fails

at line 104
public Boolean supports(TokenInterface $token)

Checks whether this provider supports the given token.

Parameters

TokenInterface $token A TokenInterface instance

Return Value

Boolean true if the implementation supports the Token, false otherwise