‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification Class Reference

Public Member Functions

 __construct (protected readonly PasswordHashFactory $passwordHashFactory)
 
 verifyInstallToolPassword (string $password)
 
 verifyBackendUserPassword (string $password, BackendUserAuthentication $backendUser)
 

Public Attributes

yield $service
 

Protected Member Functions

Generator< int, getAuthServices(BackendUserAuthentication $backendUser, array $loginData, array $authInfo):\Generator { $serviceChain=[];$subType='authUserBE';while( $service=GeneralUtility::makeInstanceService( 'auth', $subType, $serviceChain)) { $serviceChain[]=$service-> getServiceKey ()
 

Detailed Description

Service for either verifying the password of the current backend user session, or the admin tool password (without actually going through the complete authentication process).

Definition at line 35 of file PasswordVerification.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification::__construct ( protected readonly PasswordHashFactory  $passwordHashFactory)

Definition at line 37 of file PasswordVerification.php.

Member Function Documentation

◆ getServiceKey()

Generator<int, getAuthServices(BackendUserAuthentication $backendUser, array $loginData, array $authInfo): \Generator { $serviceChain = []; $subType = 'authUserBE'; while ($service = GeneralUtility::makeInstanceService('auth', $subType, $serviceChain)) { $serviceChain[] = $service-> TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification::getServiceKey ( )
protected

Initializes authentication services to be used in a foreach loop

Parameters
array$loginData
array$authInfo
Returns
‪\Generator<int, object>

◆ verifyBackendUserPassword()

TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification::verifyBackendUserPassword ( string  $password,
BackendUserAuthentication  $backendUser 
)

Verifies that the provided password is actually correct for current backend user by stepping through the authentication chain in $GLOBALS['BE_USER].

Definition at line 64 of file PasswordVerification.php.

References TYPO3\CMS\Webhooks\Message\$loginData, and TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification\$service.

◆ verifyInstallToolPassword()

TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification::verifyInstallToolPassword ( string  $password)

Verifies that provided password matches Install Tool password.

Definition at line 44 of file PasswordVerification.php.

References $GLOBALS.

Member Data Documentation

◆ $service

yield TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification::$service