Метод | Описание | |
---|---|---|
initialize ( AppserverIo\Psr\Security\Auth\Subject $subject, AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface $callbackHandler, AppserverIo\Collections\MapInterface $sharedState, AppserverIo\Collections\MapInterface $params ) : void | Initialize the login module. This stores the subject, callbackHandler and sharedState and options for the login session. Subclasses should override if they need to process their own options. A call to parent::initialize() must be made in the case of an override. | |
login ( ) : boolean | Perform the authentication of username and password. |
Метод | Описание | |
---|---|---|
createPasswordHash ( string $name, string $password ) : AppserverIo\Lang\String | If hashing is enabled, this method is called from login() prior to password validation. | |
getCredentials ( ) : AppserverIo\Lang\String | Return's the proof of login identity. | |
getIdentity ( ) : AppserverIo\Psr\Security\PrincipalInterface | Return's the authenticated user identity. | |
getUsername ( ) : AppserverIo\Lang\String | Return's the principal's username. | |
getUsersPassword ( ) : AppserverIo\Lang\String | Returns the password for the user from the sharedMap data. | |
validatePassword ( string $inputPassword, string $expectedPassword ) : boolean | 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 createPasswordHash ( string $name, string $password ) : AppserverIo\Lang\String | ||
$name | string | Ignored in default version |
$password | string | The password string to be hashed |
Результат | AppserverIo\Lang\String | The hashed password |
protected getCredentials ( ) : AppserverIo\Lang\String | ||
Результат | AppserverIo\Lang\String | The proof of login identity |
protected getIdentity ( ) : AppserverIo\Psr\Security\PrincipalInterface | ||
Результат | AppserverIo\Psr\Security\PrincipalInterface | The user identity |
protected getUsername ( ) : AppserverIo\Lang\String | ||
Результат | AppserverIo\Lang\String | The username |
abstract protected getUsersPassword ( ) : AppserverIo\Lang\String | ||
Результат | AppserverIo\Lang\String | The user's password |
public initialize ( AppserverIo\Psr\Security\Auth\Subject $subject, AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface $callbackHandler, AppserverIo\Collections\MapInterface $sharedState, AppserverIo\Collections\MapInterface $params ) : void | ||
$subject | AppserverIo\Psr\Security\Auth\Subject | The Subject to update after a successful login |
$callbackHandler | AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface | The callback handler that will be used to obtain the user identity and credentials |
$sharedState | AppserverIo\Collections\MapInterface | A map shared between all configured login module instances |
$params | AppserverIo\Collections\MapInterface | The parameters passed to the login module |
Результат | void |