PHP Class AppserverIo\Appserver\ServletEngine\Security\StandardAuthenticationManager

Author: Florian Sydekum ([email protected])
Author: Bernhard Wick ([email protected])
Inheritance: extends AppserverIo\Appserver\Core\AbstractManager, implements AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface
ファイルを表示 Open project: appserver-io/appserver Class Usage Examples

Public Methods

Method Description
addAuthenticator ( AppserverIo\Appserver\ServletEngine\Authenticator\AuthenticatorInterface $authenticator ) : void Register's the passed authenticator.
addMapping ( AppserverIo\Appserver\ServletEngine\Security\MappingInterface $mapping ) : void Register's a new URL pattern to authentication type mapping.
addRealm ( AppserverIo\Appserver\ServletEngine\Security\RealmInterface $realm ) : void Add's the passed realm the the authentication manager.
getAttribute ( string $key ) : mixed Returns the value with the passed name from the context.
getAuthenticator ( AppserverIo\Appserver\ServletEngine\Security\MappingInterface $mapping = null ) : AppserverIo\Storage\StorageInterface Returns the configured authenticator for the passed URL pattern authenticator mapping.
getAuthenticators ( ) : AppserverIo\Storage\StorageInterface Returns the configured authentication types.
getIdentifier ( ) : string Initializes the manager instance.
getMappings ( ) : AppserverIo\Storage\StorageInterface Return's the storage for the URL pattern to authenticator mappings.
getRealm ( string $realmName ) : object Returns the realm with the passed name.
getRealms ( ) : AppserverIo\Collections\MapInterface Returns the map with the security domains.
handleRequest ( AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface $servletRequest, AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface $servletResponse ) : boolean Handles request in order to authenticate.
initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Initializes the manager instance.
injectAuthenticators ( AppserverIo\Storage\StorageInterface $authenticators ) : void Inject the storage for the authenticators.
injectMappings ( AppserverIo\Storage\StorageInterface $mappings ) : void Inject the storage for the URL pattern to authenticator mappings.
injectRealms ( AppserverIo\Collections\MapInterface $realms ) : void Inject the map with the realms.

Method Details

addAuthenticator() public method

Register's the passed authenticator.
public addAuthenticator ( AppserverIo\Appserver\ServletEngine\Authenticator\AuthenticatorInterface $authenticator ) : void
$authenticator AppserverIo\Appserver\ServletEngine\Authenticator\AuthenticatorInterface The authenticator to add
return void

addMapping() public method

Register's a new URL pattern to authentication type mapping.
public addMapping ( AppserverIo\Appserver\ServletEngine\Security\MappingInterface $mapping ) : void
$mapping AppserverIo\Appserver\ServletEngine\Security\MappingInterface The URL pattern to authenticator mapping
return void

addRealm() public method

Add's the passed realm the the authentication manager.
public addRealm ( AppserverIo\Appserver\ServletEngine\Security\RealmInterface $realm ) : void
$realm AppserverIo\Appserver\ServletEngine\Security\RealmInterface The realm to add
return void

getAttribute() public method

Returns the value with the passed name from the context.
public getAttribute ( string $key ) : mixed
$key string The key of the value to return from the context.
return mixed The requested attribute

getAuthenticator() public method

Returns the configured authenticator for the passed URL pattern authenticator mapping.
public getAuthenticator ( AppserverIo\Appserver\ServletEngine\Security\MappingInterface $mapping = null ) : AppserverIo\Storage\StorageInterface
$mapping AppserverIo\Appserver\ServletEngine\Security\MappingInterface The URL pattern to authenticator mapping
return AppserverIo\Storage\StorageInterface The storage with the authentication types

getAuthenticators() public method

Returns the configured authentication types.
public getAuthenticators ( ) : AppserverIo\Storage\StorageInterface
return AppserverIo\Storage\StorageInterface The storage with the authentication types

getIdentifier() public method

Initializes the manager instance.
See also: AppserverIo\Psr\Application\ManagerInterface::initialize()
public getIdentifier ( ) : string
return string

getMappings() public method

Return's the storage for the URL pattern to authenticator mappings.
public getMappings ( ) : AppserverIo\Storage\StorageInterface
return AppserverIo\Storage\StorageInterface The storage instance

getRealm() public method

Returns the realm with the passed name.
public getRealm ( string $realmName ) : object
$realmName string The name of the requested realm
return object The requested realm instance

getRealms() public method

Returns the map with the security domains.
public getRealms ( ) : AppserverIo\Collections\MapInterface
return AppserverIo\Collections\MapInterface The security domains

handleRequest() public method

Handles request in order to authenticate.
public handleRequest ( AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface $servletRequest, AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface $servletResponse ) : boolean
$servletRequest AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface The request instance
$servletResponse AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface The response instance
return boolean TRUE if the authentication has been successful, else FALSE

initialize() public method

Initializes the manager instance.
See also: AppserverIo\Psr\Application\ManagerInterface::initialize()
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
return void

injectAuthenticators() public method

Inject the storage for the authenticators.
public injectAuthenticators ( AppserverIo\Storage\StorageInterface $authenticators ) : void
$authenticators AppserverIo\Storage\StorageInterface The storage instance
return void

injectMappings() public method

Inject the storage for the URL pattern to authenticator mappings.
public injectMappings ( AppserverIo\Storage\StorageInterface $mappings ) : void
$mappings AppserverIo\Storage\StorageInterface The storage instance
return void

injectRealms() public method

Inject the map with the realms.
public injectRealms ( AppserverIo\Collections\MapInterface $realms ) : void
$realms AppserverIo\Collections\MapInterface The realms
return void