MfaChallengeResponseFactory
final class \
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.
Internal
not part of TYPO3 Core API
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
__construct()
public
__construct(UriBuilder $uriBuilder, MfaProviderRegistry $mfaProviderRegistry) : mixed
Parameters
- $uriBuilder : UriBuilder
- $mfaProviderRegistry : MfaProviderRegistry
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|nullcreateRedirect()
public
createRedirect(string $endpoint, BackendUserAuthentication $user, ServerRequestInterface $request[, array $parameters = [] ]) : ResponseInterface
Parameters
- $endpoint : string
- $user : BackendUserAuthentication
- $request : ServerRequestInterface
- $parameters : array = []
Return values
ResponseInterfaceisMfaPending()
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