PHP 클래스 JeremyKendall\Password\Decorator\UpgradeDecorator

상속: extends JeremyKendall\Password\Decorator\AbstractDecorator
파일 보기 프로젝트 열기: jeremykendall/password-validator 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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