PasswordCredentialVerifier

final readonly class \TYPO3\CMS\Core\Security\PasswordCredentialVerifier

The parts of a password login that the native backend and frontend authenticators share: the request token check, the password verification against a stored hash, the creation of a replacement hash and the timing mitigation for unknown users. The hash method and the request token scope are derived from the login type of the user object.

Nothing is persisted here: where a user record and its hash are stored is the business of the identity provider the authenticator looked the user up with.

Table of Contents

Methods

__construct()  : mixed
hashPassword()  : string
Hashes the password with the default hash method of the login type of the user.
mimicPasswordHashing()  : void
Mimics password hashing for a login of an unknown user to mitigate
requestTokenMatches()  : bool
Validates the submitted request token (nonce) for the authentication scope of the user ("core/user-auth/be" or "core/user-auth/fe") and revokes its signing secret. Listeners of BeforeRequestTokenProcessedEvent may adjust the token, felogin also derives the storage page restriction from it.
verify()  : PasswordVerification
Verifies the password against the stored hash. A matching password whose hash is outdated or not created with the default hash method of the login type is reported as such, so the caller can store a replacement created by hashPassword().

Methods

requestTokenMatches()

Validates the submitted request token (nonce) for the authentication scope of the user ("core/user-auth/be" or "core/user-auth/fe") and revokes its signing secret. Listeners of BeforeRequestTokenProcessedEvent may adjust the token, felogin also derives the storage page restriction from it.

public requestTokenMatches(AbstractUserAuthentication $user, ServerRequestInterface $request) : bool

Parameters

$user : AbstractUserAuthentication
$request : ServerRequestInterface

Return values

bool
On this page