LoginProviderResolver

class \TYPO3\CMS\Backend\LoginProvider\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.

Table of Contents

Properties

$loginProviders  : array

Methods

__construct()  : mixed
getLoginProviderConfigurationByIdentifier()  : array
getLoginProviders()  : array
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
Validates the registered login providers

Properties

$loginProviders

protected array $loginProviders = []

Methods

__construct()

public __construct([array|null $loginProviders = null ]) : mixed

Parameters

$loginProviders : array|null = null

getLoginProviderConfigurationByIdentifier()

public getLoginProviderConfigurationByIdentifier(string $identifier) : array

Parameters

$identifier : string

Return values

array

getLoginProviders()

Get all registered login providers in the right order

public getLoginProviders() : array

Return values

array

getPrimaryLoginProviderIdentifier()

Returns the identifier of the first login provider / with the highest priority.

public getPrimaryLoginProviderIdentifier() : string

Return values

string

hasLoginProvider()

Check if the login provider is registered.

public hasLoginProvider(string $identifier) : bool

Parameters

$identifier : string

Return values

bool

resolveLoginProviderIdentifierFromRequest()

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

string

validateAndSortLoginProviders()

Validates the registered login providers

protected validateAndSortLoginProviders(array $providers) : array

Parameters

$providers : array

Tags

throws
RuntimeException

Return values

array —

the sorted login providers

On this page