129. Class

129.1. Zend\Authentication\AuthenticationService

129.1.1. Methods

129.1.1.1. __construct

__construct()

Constructor

Parameters:
  • StorageStorageInterface
  • AdapterAdapterInterface

129.1.1.2. getAdapter

getAdapter()

Returns the authentication adapter

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

Return type:AdapterAdapterInterface|null

129.1.1.3. setAdapter

setAdapter()

Sets the authentication adapter

Parameters:AdapterAdapterInterface
Return type:AuthenticationService Provides a fluent interface

129.1.1.4. getStorage

getStorage()

Returns the persistent storage handler

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

Return type:StorageStorageInterface

129.1.1.5. setStorage

setStorage()

Sets the persistent storage handler

Parameters:StorageStorageInterface
Return type:AuthenticationService Provides a fluent interface

129.1.1.6. authenticate

authenticate()

Authenticates against the supplied adapter

Parameters:AdapterAdapterInterface
Return type:Result
Throws :ExceptionRuntimeException

129.1.1.7. hasIdentity

hasIdentity()

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

Return type:bool

129.1.1.8. getIdentity

getIdentity()

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

Return type:mixed|null

129.1.1.9. clearIdentity

clearIdentity()

Clears the identity from persistent storage

Return type:void