PHP 클래스 AppserverIo\Appserver\ServletEngine\Security\Realm

상속: implements AppserverIo\Appserver\ServletEngine\Security\RealmInterface
파일 보기 프로젝트 열기: appserver-io/appserver 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$authenticationManager AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface The authentication manager instance.
$configruation AppserverIo\Appserver\ServletEngine\Security\SecurityDomainInterface The security domain's login modules.
$exceptionStack AppserverIo\Collections\ArrayList A stack with the exception throwed during authentication.
$name string The security domain's name.

공개 메소드들

메소드 설명
__construct ( AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface $authenticationManager, string $name ) Initialize the security domain with the passed name.
authenticate ( string $username, string $password ) : AppserverIo\Security\PrincipalInterface | null Finally tries to authenticate the user with the passed name.
authenticateByUsernameAndCallbackHandler ( string $username, AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface $callbackHandler ) : AppserverIo\Security\PrincipalInterface | null Finally tries to authenticate the user with the passed name.
getAuthenticationManager ( ) : AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface Return's the authentication manager instance.
getConfiguration ( ) : AppserverIo\Appserver\ServletEngine\Security\SecurityDomainInterface Return's the realm's configuration.
getExceptionStack ( ) : AppserverIo\Collections\ArrayList Return's the exception stack.
getName ( ) : string Return's the name of the security domain.
injectConfiguration ( AppserverIo\Appserver\Core\Api\Node\SecurityDomainNodeInterface $configuration ) : void Inject the realm's configuration.

보호된 메소드들

메소드 설명
createPrincipal ( string $username, AppserverIo\Psr\Security\Auth\Subject $subject, AppserverIo\Psr\Security\Auth\Login\LoginContextInterface $loginContext ) : AppserverIo\Security\PrincipalInterface Identify and return an instance implementing the PrincipalInterface that represens the authenticated user for the specified Subject. The Principal is constructed by scanning the list of Principals returned by the LoginModule. The first Principal object that matches one of the class names supplied as a "user class" is the user Principal. This object is returned to the caller. Any remaining principal objects returned by the LoginModules are mapped to roles, but only if their respective classes match one of the "role class" classes. If a user Principal cannot be constructed, return NULL.

메소드 상세

__construct() 공개 메소드

Initialize the security domain with the passed name.
public __construct ( AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface $authenticationManager, string $name )
$authenticationManager AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface The authentication manager instance
$name string The security domain's name

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

authenticateByUsernameAndCallbackHandler() 공개 메소드

Finally tries to authenticate the user with the passed name.
public authenticateByUsernameAndCallbackHandler ( string $username, AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface $callbackHandler ) : AppserverIo\Security\PrincipalInterface | null
$username string The name of the user to authenticate
$callbackHandler AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface The callback handler used to load the credentials
리턴 AppserverIo\Security\PrincipalInterface | null The authenticated user principal

createPrincipal() 보호된 메소드

Identify and return an instance implementing the PrincipalInterface that represens the authenticated user for the specified Subject. The Principal is constructed by scanning the list of Principals returned by the LoginModule. The first Principal object that matches one of the class names supplied as a "user class" is the user Principal. This object is returned to the caller. Any remaining principal objects returned by the LoginModules are mapped to roles, but only if their respective classes match one of the "role class" classes. If a user Principal cannot be constructed, return NULL.
protected createPrincipal ( string $username, AppserverIo\Psr\Security\Auth\Subject $subject, AppserverIo\Psr\Security\Auth\Login\LoginContextInterface $loginContext ) : AppserverIo\Security\PrincipalInterface
$username string The associated user name
$subject AppserverIo\Psr\Security\Auth\Subject The Subject representing the logged-in user
$loginContext AppserverIo\Psr\Security\Auth\Login\LoginContextInterface Associated with the Principal so {@link LoginContext#logout()} can be called later
리턴 AppserverIo\Security\PrincipalInterface the principal object

getAuthenticationManager() 공개 메소드

Return's the authentication manager instance.
public getAuthenticationManager ( ) : AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface
리턴 AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface The authentication manager instance

getConfiguration() 공개 메소드

Return's the realm's configuration.
public getConfiguration ( ) : AppserverIo\Appserver\ServletEngine\Security\SecurityDomainInterface
리턴 AppserverIo\Appserver\ServletEngine\Security\SecurityDomainInterface The realm's configuration

getExceptionStack() 공개 메소드

Return's the exception stack.
public getExceptionStack ( ) : AppserverIo\Collections\ArrayList
리턴 AppserverIo\Collections\ArrayList The exception stack

getName() 공개 메소드

Return's the name of the security domain.
public getName ( ) : string
리턴 string The security domain's name

injectConfiguration() 공개 메소드

Inject the realm's configuration.
public injectConfiguration ( AppserverIo\Appserver\Core\Api\Node\SecurityDomainNodeInterface $configuration ) : void
$configuration AppserverIo\Appserver\Core\Api\Node\SecurityDomainNodeInterface The realm's configuration
리턴 void

프로퍼티 상세

$authenticationManager 보호되어 있는 프로퍼티

The authentication manager instance.
protected AuthenticationManagerInterface,AppserverIo\Appserver\ServletEngine\Security $authenticationManager
리턴 AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface

$configruation 보호되어 있는 프로퍼티

The security domain's login modules.
protected SecurityDomainInterface,AppserverIo\Appserver\ServletEngine\Security $configruation
리턴 AppserverIo\Appserver\ServletEngine\Security\SecurityDomainInterface

$exceptionStack 보호되어 있는 프로퍼티

A stack with the exception throwed during authentication.
protected ArrayList,AppserverIo\Collections $exceptionStack
리턴 AppserverIo\Collections\ArrayList

$name 보호되어 있는 프로퍼티

The security domain's name.
protected string $name
리턴 string