PHP Класс JeremyKendall\Password\Decorator\UpgradeDecorator

Наследование: extends JeremyKendall\Password\Decorator\AbstractDecorator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$validationCallback Legacy password validation via callback

Открытые методы

Метод Описание
__construct ( JeremyKendall\Password\PasswordValidatorInterface $validator, callable $validationCallback ) Public constructor
isValid ( $password, $passwordHash, $legacySalt = null, $identity = null ) {@inheritDoc}

Приватные методы

Метод Описание
createHashWhichWillForceRehashInValidator ( string $password ) : string This method returns an upgraded password, one that is hashed by the password_hash method in such a way that it forces the PasswordValidator to rehash the password. This results in PasswordValidator::isValid() returning a Result::$code of Result::SUCCESS_PASSWORD_REHASHED, notifying the StorageDecorator or custom application code that the returned password hash should be persisted.

Описание методов

__construct() публичный Метод

Public constructor
public __construct ( JeremyKendall\Password\PasswordValidatorInterface $validator, callable $validationCallback )
$validator JeremyKendall\Password\PasswordValidatorInterface Password validator
$validationCallback callable Callback used to validate legacy password hash

isValid() публичный Метод

{@inheritDoc}
public isValid ( $password, $passwordHash, $legacySalt = null, $identity = null )

Описание свойств

$validationCallback защищенное свойство

Legacy password validation via callback
protected $validationCallback