AuthenticationCollector
class AuthenticationCollector implements AuthenticationCollectorInterface (View source)
A collector class for authentication providers.
Properties
| protected AuthenticationProviderInterface[] | $providers | Array of all registered authentication providers, keyed by ID. |
|
| protected array | $providerOrders | Array of all providers and their priority. |
|
| protected AuthenticationProviderInterface[] | $sortedProviders | Sorted list of registered providers. |
|
| protected string[] | $globalProviders | List of providers which are allowed on routes with no _auth option. |
Methods
Adds a provider to the array of registered providers.
Returns whether a provider is considered global.
Returns an authentication provider.
Returns the sorted array of authentication providers.
Details
addProvider(AuthenticationProviderInterface $provider, string $provider_id, int $priority = 0, bool $global = FALSE)
Adds a provider to the array of registered providers.
bool
isGlobal(string $provider_id)
Returns whether a provider is considered global.
AuthenticationProviderInterface|null
getProvider(string $provider_id)
Returns an authentication provider.
AuthenticationProviderInterface[]
getSortedProviders()
Returns the sorted array of authentication providers.