‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Middleware\SudoModeInterceptor Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Middleware\SudoModeInterceptor:

Public Member Functions

 __construct (private readonly AccessStorage $storage, private readonly SudoModeController $controller,)
 
 process (ServerRequestInterface $request, RequestHandlerInterface $handler)
 

Private Member Functions

 handleVerificationRequired (VerificationRequiredException $exception)
 
 handleRequestGrantedException (RequestGrantedException $exception)
 

Detailed Description

Middleware that catches any VerificationRequiredException (= the current user must verify the access for a particular resource, route, module) by entering their password again; and any RequestGrantedException (= the verification process was successful & the user shall be redirected to the URI, that has been requested originally).

Definition at line 39 of file SudoModeInterceptor.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Middleware\SudoModeInterceptor::__construct ( private readonly AccessStorage  $storage,
private readonly SudoModeController  $controller 
)

Definition at line 43 of file SudoModeInterceptor.php.

Member Function Documentation

◆ handleRequestGrantedException()

TYPO3\CMS\Backend\Middleware\SudoModeInterceptor::handleRequestGrantedException ( RequestGrantedException  $exception)
private

Redirects to the URI that was originally requested (prior to this sudo mode interception).

Definition at line 74 of file SudoModeInterceptor.php.

References TYPO3\CMS\Backend\Security\SudoMode\Exception\RequestGrantedException\getInstruction().

Referenced by TYPO3\CMS\Backend\Middleware\SudoModeInterceptor\process().

◆ handleVerificationRequired()

TYPO3\CMS\Backend\Middleware\SudoModeInterceptor::handleVerificationRequired ( VerificationRequiredException  $exception)
private

Redirects to the sudo mode controller, and renders the password verification dialog.

Definition at line 62 of file SudoModeInterceptor.php.

References TYPO3\CMS\Backend\Security\SudoMode\Exception\VerificationRequiredException\getClaim().

Referenced by TYPO3\CMS\Backend\Middleware\SudoModeInterceptor\process().

◆ process()

TYPO3\CMS\Backend\Middleware\SudoModeInterceptor::process ( ServerRequestInterface  $request,
RequestHandlerInterface  $handler 
)