GuardAuthenticationProvider

class GuardAuthenticationProvider implements AuthenticationProviderInterface

Responsible for accepting the PreAuthenticationGuardToken and calling the correct authenticator to retrieve the authenticated token.

Methods

__construct(array $guardAuthenticators, UserProviderInterface $userProvider, string $providerKey, UserCheckerInterface $userChecker)
TokenInterface authenticate(TokenInterface $token)

Finds the correct authenticator for the token and calls it.

bool supports(TokenInterface $token)

Checks whether this provider supports the given token.

Details

__construct(array $guardAuthenticators, UserProviderInterface $userProvider, string $providerKey, UserCheckerInterface $userChecker)

Parameters

array $guardAuthenticators The authenticators, with keys that match what's passed to GuardAuthenticationListener
UserProviderInterface $userProvider The user provider
string $providerKey The provider (i.e. firewall) key
UserCheckerInterface $userChecker

TokenInterface authenticate(TokenInterface $token)

Finds the correct authenticator for the token and calls it.

Parameters

TokenInterface $token The TokenInterface instance to authenticate

Return Value

TokenInterface An authenticated TokenInterface instance, never null

bool supports(TokenInterface $token)

Checks whether this provider supports the given token.

Parameters

TokenInterface $token A TokenInterface instance

Return Value

bool true if the implementation supports the Token, false otherwise
doc_Symfony
2016-10-28 06:20:05
Comments
Leave a Comment

Please login to continue.