PHP Class AppserverIo\Appserver\ServletEngine\Security\GenericPrincipal

Inheritance: extends SimplePrincipal
Show file Open project: appserver-io/appserver

Protected Properties

Property Type Description
$loginContext AppserverIo\Psr\Security\Auth\Login\LoginContextInterface The actual login context instance.
$password AppserverIo\Lang\String The principal's password.
$roles AppserverIo\Collection\ArrayList The principal's roles.
$userPrincipal AppserverIo\Psr\Security\PrincipalInterface The user principal instance that will be returned from the request.
$username AppserverIo\Lang\String The principal's username.

Public Methods

Method Description
__construct ( string $username = null, string $password = null, AppserverIo\Collections\ArrayList $roles = null, AppserverIo\Psr\Security\PrincipalInterface $userPrincipal = null, AppserverIo\Psr\Security\Auth\Login\LoginContextInterface $loginContext = null ) Initializes the principal with the data from the passed objects.
getLoginContext ( ) : the Return's the actual login context instance.
getPassword ( ) : the Return's the principal's password.
getRoles ( ) : the Return's the principal's roles.
getUserPrincipal ( ) : the Return's the user principal instance that will be returned from the request.
getUsername ( ) : the Return's the principal's username.

Method Details

__construct() public method

Initializes the principal with the data from the passed objects.
public __construct ( string $username = null, string $password = null, AppserverIo\Collections\ArrayList $roles = null, AppserverIo\Psr\Security\PrincipalInterface $userPrincipal = null, AppserverIo\Psr\Security\Auth\Login\LoginContextInterface $loginContext = null )
$username string The principal's username
$password string The principal's password
$roles AppserverIo\Collections\ArrayList The principal's roles
$userPrincipal AppserverIo\Psr\Security\PrincipalInterface The user principal instance that will be returned from the request
$loginContext AppserverIo\Psr\Security\Auth\Login\LoginContextInterface The actual login context instance

getLoginContext() public method

Return's the actual login context instance.
public getLoginContext ( ) : the
return the \AppserverIo\Psr\Security\Auth\Login\LoginContextInterface The login context instance

getPassword() public method

Return's the principal's password.
public getPassword ( ) : the
return the \AppserverIo\Lang\String The password

getRoles() public method

Return's the principal's roles.
public getRoles ( ) : the
return the \AppserverIo\Collection\ArrayList The roles

getUserPrincipal() public method

Return's the user principal instance that will be returned from the request.
public getUserPrincipal ( ) : the
return the \AppserverIo\Psr\Security\PrincipalInterface The user principal

getUsername() public method

Return's the principal's username.
public getUsername ( ) : the
return the \AppserverIo\Lang\String The username

Property Details

$loginContext protected property

The actual login context instance.
protected LoginContextInterface,AppserverIo\Psr\Security\Auth\Login $loginContext
return AppserverIo\Psr\Security\Auth\Login\LoginContextInterface

$password protected property

The principal's password.
protected String,AppserverIo\Lang $password
return AppserverIo\Lang\String

$roles protected property

The principal's roles.
protected ArrayList,AppserverIo\Collection $roles
return AppserverIo\Collection\ArrayList

$userPrincipal protected property

The user principal instance that will be returned from the request.
protected PrincipalInterface,AppserverIo\Psr\Security $userPrincipal
return AppserverIo\Psr\Security\PrincipalInterface

$username protected property

The principal's username.
protected String,AppserverIo\Lang $username
return AppserverIo\Lang\String