AppserverIo\Appserver\ServletEngine\Security\Auth\Spi\UsernamePasswordLoginModule::validatePassword PHP Метод

validatePassword() защищенный Метод

A hook that allows subclasses to change the validation of the input password against the expected password. This version checks that neither inputPassword or expectedPassword are null that that inputPassword.equals(expectedPassword) is true;
protected validatePassword ( string $inputPassword, string $expectedPassword ) : boolean
$inputPassword string The specified password
$expectedPassword string The expected password
Результат boolean TRUE if the inputPassword is valid, FALSE otherwise
    protected function validatePassword(string $inputPassword, string $expectedPassword)
    {
        // if username or password is NULL, return immediately
        if ($inputPassword == null || $expectedPassword == null) {
            return false;
        }
        // initialize the valid login flag
        $valid = false;
        // query whether or not we've to ignore the case
        if ($this->ignorePasswordCase === true) {
            $valid = $inputPassword->equalsIgnoreCase($expectedPassword);
        } else {
            $valid = $inputPassword->equals($expectedPassword);
        }
        // return the flag
        return $valid;
    }