ChainedHandler

Implements \Joomla\Authentication\Password\HandlerInterface, \Joomla\CMS\Authentication\Password\CheckIfRehashNeededHandlerInterface

Password handler supporting testing against a chain of handlers

since

4.0.0

Methods

addHandler

Add a handler to the chain

addHandler(\Joomla\Authentication\Password\HandlerInterface $handler) : void
since

4.0.0

Arguments

$handler

\Joomla\Authentication\Password\HandlerInterfaceThe password handler to add

checkIfRehashNeeded

Check if the password requires rehashing

checkIfRehashNeeded(string $hash) : boolean
since

4.0.0

Arguments

$hash

stringThe password hash to check

Response

boolean

hashPassword

Generate a hash for a plaintext password

hashPassword(string $plaintext, array $options = array()) : void
since

4.0.0

throws

\RuntimeException

Arguments

$plaintext

stringThe plaintext password to validate

$options

arrayOptions for the hashing operation

isSupported

Check that the password handler is supported in this environment

isSupported() : boolean
static
since

4.0.0

Response

boolean

validatePassword

Validate a password

validatePassword(string $plaintext, string $hashed) : boolean
since

4.0.0

Arguments

$plaintext

stringThe plain text password to validate

$hashed

stringThe password hash to validate against

Response

boolean

Properties

handlers

The password handlers in use by this chain.

since

4.0.0

Type(s)

array<mixed,\Joomla\Authentication\Password\HandlerInterface>