MfaChallengeResponseFactory

final class \TYPO3\CMS\Backend\Security\MfaChallengeResponseFactory

Decides whether an authenticated backend user still has to pass multi-factor authentication and creates the challenge response initiating it: a redirect to the MFA endpoint with the necessary cookies and headers appended, so the already passed authentication step is not lost.

Table of Contents

Methods

__construct()  : mixed
createChallengeIfRequired()  : Challenge|null
Challenges a user with an active MFA provider that has not passed the multi-factor authentication in this session yet - unless the requested route is the MFA route itself or accessible without an authenticated user, which must stay reachable with the partially authenticated session.
createRedirect()  : ResponseInterface
isMfaPending()  : bool
Whether the user has an active MFA provider and has not passed the multi-factor authentication in this session yet. No principal may be established while it is pending. A session an admin switched to another user with is not challenged, the admin passed the authentication already.

Methods

createChallengeIfRequired()

Challenges a user with an active MFA provider that has not passed the multi-factor authentication in this session yet - unless the requested route is the MFA route itself or accessible without an authenticated user, which must stay reachable with the partially authenticated session.

public createChallengeIfRequired(BackendUserAuthentication $user, ServerRequestInterface $request) : Challenge|null

Parameters

$user : BackendUserAuthentication
$request : ServerRequestInterface

Return values

Challenge|null

createRedirect()

public createRedirect(string $endpoint, BackendUserAuthentication $user, ServerRequestInterface $request[, array $parameters = [] ]) : ResponseInterface

Parameters

$endpoint : string
$user : BackendUserAuthentication
$request : ServerRequestInterface
$parameters : array = []

Return values

ResponseInterface

isMfaPending()

Whether the user has an active MFA provider and has not passed the multi-factor authentication in this session yet. No principal may be established while it is pending. A session an admin switched to another user with is not challenged, the admin passed the authentication already.

public isMfaPending(BackendUserAuthentication $user) : bool

Parameters

$user : BackendUserAuthentication

Return values

bool
On this page