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
Afficher le fichier Open project: appserver-io/appserver Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

addMapping() public méthode

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
Résultat void

addRealm() public méthode

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
Résultat void

getAttribute() public méthode

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.
Résultat mixed The requested attribute

getAuthenticator() public méthode

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
Résultat AppserverIo\Storage\StorageInterface The storage with the authentication types

getAuthenticators() public méthode

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

getIdentifier() public méthode

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

getMappings() public méthode

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

getRealm() public méthode

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

getRealms() public méthode

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

handleRequest() public méthode

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
Résultat boolean TRUE if the authentication has been successful, else FALSE

initialize() public méthode

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
Résultat void

injectAuthenticators() public méthode

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

injectMappings() public méthode

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

injectRealms() public méthode

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