package Default

 Methods

Constructor

__construct(\Zend\Authentication\Storage\StorageInterface $storage = null, \Zend\Authentication\Adapter\AdapterInterface $adapter = null

Parameters

$storage

\Zend\Authentication\Storage\StorageInterface

$adapter

\Zend\Authentication\Adapter\AdapterInterface

Authenticates against the supplied adapter

authenticate(\Zend\Authentication\Adapter\AdapterInterface $adapter = null) : \Zend\Authentication\Result
inherited_from \Zend\Authentication\AuthenticationServiceInterface::authenticate()

Parameters

$adapter

\Zend\Authentication\Adapter\AdapterInterface

Exceptions

\Zend\Authentication\Exception\RuntimeException

Returns

\Zend\Authentication\Result

Clears the identity from persistent storage

clearIdentity() : void
inherited_from \Zend\Authentication\AuthenticationServiceInterface::clearIdentity()

Returns the authentication adapter

getAdapter() : \Zend\Authentication\Adapter\AdapterInterface | null

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

Returns

\Zend\Authentication\Adapter\AdapterInterfacenull

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

getIdentity() : mixed | null
inherited_from \Zend\Authentication\AuthenticationServiceInterface::getIdentity()

Returns

mixednull

Returns the persistent storage handler

getStorage() : \Zend\Authentication\Storage\StorageInterface

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

Returns

\Zend\Authentication\Storage\StorageInterface

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

hasIdentity() : boolean
inherited_from \Zend\Authentication\AuthenticationServiceInterface::hasIdentity()

Returns

boolean

Sets the authentication adapter

setAdapter(\Zend\Authentication\Adapter\AdapterInterface $adapter) : \Zend\Authentication\AuthenticationService

Parameters

$adapter

\Zend\Authentication\Adapter\AdapterInterface

Returns

\Zend\Authentication\AuthenticationServiceProvides a fluent interface

Sets the persistent storage handler

setStorage(\Zend\Authentication\Storage\StorageInterface $storage) : \Zend\Authentication\AuthenticationService

Parameters

$storage

\Zend\Authentication\Storage\StorageInterface

Returns

\Zend\Authentication\AuthenticationServiceProvides a fluent interface

 Properties

 

Authentication adapter

$adapter : \Zend\Authentication\Adapter\AdapterInterface

Default

null
 

Persistent storage handler

$storage : \Zend\Authentication\Storage\StorageInterface

Default

null