AppserverIo\Appserver\ServletEngine\Security\Realm::authenticate PHP 메소드

authenticate() 공개 메소드

Finally tries to authenticate the user with the passed name.
public authenticate ( string $username, string $password ) : AppserverIo\Security\PrincipalInterface | null
$username string The name of the user to authenticate
$password string The password used for authentication
리턴 AppserverIo\Security\PrincipalInterface | null The authenticated user principal
    public function authenticate(string $username, string $password)
    {
        // prepare the callback handler
        $callbackHandler = new SecurityAssociationHandler(new SimplePrincipal($username), $password);
        // authenticate the passed username/password combination
        return $this->authenticateByUsernameAndCallbackHandler($username, $callbackHandler);
    }