AuthenticationProviderInterface
interface AuthenticationProviderInterface (View source)
Contract for an authentication provider used by the AuthenticationProviderManager.
Has to add a TokenInterface to the security context, which contains.
Methods
Constructs an instance with the given name and options.
Returns true if the given token can be authenticated by this provider
Returns the classnames of the tokens this provider is responsible for.
Tries to authenticate the given token. Sets isAuthenticated to true if authentication succeeded.
Details
static AuthenticationProviderInterface
create(string $name, array $options)
Constructs an instance with the given name and options.
bool
canAuthenticate(TokenInterface $token)
Returns true if the given token can be authenticated by this provider
array
getTokenClassNames()
Returns the classnames of the tokens this provider is responsible for.
void
authenticate(TokenInterface $authenticationToken)
Tries to authenticate the given token. Sets isAuthenticated to true if authentication succeeded.