AuthenticationProviderManager

AuthenticationProviderManager

class AuthenticationProviderManager implements AuthenticationManagerInterface

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

Methods

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

Constructor.

setEventDispatcher(EventDispatcherInterface $dispatcher)
TokenInterface authenticate(TokenInterface $token)

Attempts to authenticate a TokenInterface object.

Details

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

Constructor.

Parameters

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

Exceptions

InvalidArgumentException

setEventDispatcher(EventDispatcherInterface $dispatcher)

Parameters

EventDispatcherInterface $dispatcher

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
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部