class AuthenticationProviderManager implements AuthenticationManagerInterface

AuthenticationProviderManager uses a list of AuthenticationProviderInterface instances to authenticate a Token.

Methods

__construct(iterable|AuthenticationProviderInterface[] $providers, bool $eraseCredentials = true)

No description

setEventDispatcher(EventDispatcherInterface $dispatcher)

No description

authenticate(TokenInterface $token)

Attempts to authenticate a TokenInterface object.

Details

at line line 43
__construct(iterable|AuthenticationProviderInterface[] $providers, bool $eraseCredentials = true)

Parameters

iterable|AuthenticationProviderInterface[] $providers An iterable with AuthenticationProviderInterface instances as values
bool $eraseCredentials Whether to erase credentials after authentication or not

Exceptions

InvalidArgumentException

at line line 53
setEventDispatcher(EventDispatcherInterface $dispatcher)

Parameters

EventDispatcherInterface $dispatcher

at line line 61
TokenInterface authenticate(TokenInterface $token)

Attempts to authenticate 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