class TokenAndProviderFactory implements TokenAndProviderFactoryInterface (View source)

Default factory for providers and tokens.

Properties

protected bool $isInitialized
protected AuthenticationProviderInterface[] $providers
protected TokenInterface[] $tokens
protected array $providerConfigurations
protected AuthenticationProviderResolver $providerResolver
protected AuthenticationTokenResolver $tokenResolver
protected RequestPatternResolver $requestPatternResolver
protected ObjectManagerInterface $objectManager

Methods

__construct(AuthenticationProviderResolver $providerResolver, RequestPatternResolver $requestPatternResolver, AuthenticationTokenResolver $tokenResolver)

No description

array
getTokens()

Returns clean tokens this manager is responsible for.

array
getProviders()

Returns all configured authentication providers

void
injectSettings(array $settings)

Inject the settings and does a fresh build of tokens based on the injected settings

void
buildProvidersAndTokensFromConfiguration()

Builds the provider and token objects based on the given configuration

Details

__construct(AuthenticationProviderResolver $providerResolver, RequestPatternResolver $requestPatternResolver, AuthenticationTokenResolver $tokenResolver)

No description

Parameters

AuthenticationProviderResolver $providerResolver

The provider resolver

RequestPatternResolver $requestPatternResolver

The request pattern resolver

AuthenticationTokenResolver $tokenResolver

The token resolver

array getTokens()

Returns clean tokens this manager is responsible for.

Note: The order of the tokens in the array is important, as the tokens will be authenticated in the given order.

void injectSettings(array $settings)

Inject the settings and does a fresh build of tokens based on the injected settings

Parameters

array $settings

The settings

Return Value

void

Exceptions

Exception

protected void buildProvidersAndTokensFromConfiguration()