LoginProviderResolver
Login Providers for the TYPO3 Backend can be registered via $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['loginProviders']
This makes it possible to e.g. register a login provider to log-in via a common SSO login, with a different entry point.
By default, TYPO3 ships with a username/password login provider.
This class is responsible to fetch the login providers sorted by their priority, and encapsulate the logic further.
This resolver class itself is not part of the TYPO3 Core API as it is only used in TYPO3's Backend login.
Table of Contents
Properties
- $loginProviders : array<string|int, mixed>
Methods
- __construct() : mixed
- getLoginProviderConfigurationByIdentifier() : array<string|int, mixed>
- getLoginProviders() : array<string|int, mixed>
- Get all registered login providers in the right order
- getPrimaryLoginProviderIdentifier() : string
- Returns the identifier of the first login provider / with the highest priority.
- hasLoginProvider() : bool
- Check if the login provider is registered.
- resolveLoginProviderIdentifierFromRequest() : string
- Fetches the login provider identifier from a ServerRequest, checking for POST Body, then Query Param, and then checks for the cookie.
- validateAndSortLoginProviders() : array<string|int, mixed>
- Validates the registered login providers
Properties
$loginProviders
protected
array<string|int, mixed>
$loginProviders
= []
Methods
__construct()
public
__construct([array<string|int, mixed>|null $loginProviders = null ]) : mixed
Parameters
- $loginProviders : array<string|int, mixed>|null = null
getLoginProviderConfigurationByIdentifier()
public
getLoginProviderConfigurationByIdentifier(string $identifier) : array<string|int, mixed>
Parameters
- $identifier : string
Return values
array<string|int, mixed>getLoginProviders()
Get all registered login providers in the right order
public
getLoginProviders() : array<string|int, mixed>
Return values
array<string|int, mixed>getPrimaryLoginProviderIdentifier()
Returns the identifier of the first login provider / with the highest priority.
public
getPrimaryLoginProviderIdentifier() : string
Return values
stringhasLoginProvider()
Check if the login provider is registered.
public
hasLoginProvider(string $identifier) : bool
Parameters
- $identifier : string
Return values
boolresolveLoginProviderIdentifierFromRequest()
Fetches the login provider identifier from a ServerRequest, checking for POST Body, then Query Param, and then checks for the cookie.
public
resolveLoginProviderIdentifierFromRequest(ServerRequestInterface $request, string $cookieName) : string
Parameters
- $request : ServerRequestInterface
- $cookieName : string
Return values
stringvalidateAndSortLoginProviders()
Validates the registered login providers
protected
validateAndSortLoginProviders(array<string|int, mixed> $providers) : array<string|int, mixed>
Parameters
- $providers : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —the sorted login providers