Class AuthenticationService

Summary

Fully Qualified Name: Zend\Authentication\AuthenticationService
Implements: AuthenticationServiceInterface

Description

Methods

Name Description Defined By
__construct() Constructor AuthenticationService
authenticate() Authenticates against the supplied adapter AuthenticationService
clearIdentity() Clears the identity from persistent storage AuthenticationService
getAdapter() Returns the authentication adapter AuthenticationService
getIdentity() Returns the identity from storage or null if no identity is available AuthenticationService
getStorage() Returns the persistent storage handler AuthenticationService
hasIdentity() Returns true if and only if an identity is available from storage AuthenticationService
setAdapter() Sets the authentication adapter AuthenticationService
setStorage() Sets the persistent storage handler AuthenticationService

Method Details

__construct()

Constructor

Parameter Name Type Description
$storage \Storage\StorageInterface
$adapter \Adapter\AdapterInterface

Returns:

authenticate()

Authenticates against the supplied adapter

Parameter Name Type Description
$adapter \Adapter\AdapterInterface

Returns: \Result

clearIdentity()

Clears the identity from persistent storage

Returns: void

getAdapter()

Returns the authentication adapter

The adapter does not have a default if the storage adapter has not been set.

Returns: \Adapter\AdapterInterface|null

getIdentity()

Returns the identity from storage or null if no identity is available

Returns: mixed|null

getStorage()

Returns the persistent storage handler

Session storage is used by default unless a different storage adapter has been set.

Returns: \Storage\StorageInterface

hasIdentity()

Returns true if and only if an identity is available from storage

Returns: bool

setAdapter()

Sets the authentication adapter

Parameter Name Type Description
$adapter \Adapter\AdapterInterface

Returns: self Provides a fluent interface

setStorage()

Sets the persistent storage handler

Parameter Name Type Description
$storage \Storage\StorageInterface

Returns: self Provides a fluent interface

Top