Documentation

AuthenticationService
in package
implements AuthenticationServiceInterface

Tags
template

TStorage of CompanyUserSession|UserSession

template

TAdapter of CompanyUserAdapter|UserAdapter

Table of Contents

Interfaces

AuthenticationServiceInterface

Properties

$adapter  : CompanyUserAdapter|UserAdapter
$storage  : CompanyUserSession|UserSession

Methods

__construct()  : mixed
authenticate()  : Result
Authenticates against the authentication adapter. The default values must be `null` to be compatible with the `AuthenticationServiceInterface`. We can safely assume they are provided, but if not throw a `RuntimeException`.
clearIdentity()  : void
Clears the identity from persistent storage.
getAdapter()  : CompanyUserAdapter|UserAdapter
Returns the authentication adapter.
getIdentity()  : IdentityInterface|null
Returns the authenticated CompanyUser|User or null if no identity is available.
getStorage()  : CompanyUserSession|UserSession
Returns the persistent storage handler.
hasIdentity()  : bool
Returns true if and only if an identity is available from storage.
setAdapter()  : self
Sets the authentication adapter.
setRememberMe()  : void
Set whether we should remember this session or not.
setStorage()  : self
Sets the persistent storage handler.

Properties

Methods

authenticate()

Authenticates against the authentication adapter. The default values must be `null` to be compatible with the `AuthenticationServiceInterface`. We can safely assume they are provided, but if not throw a `RuntimeException`.

public authenticate([string|null $login = null ][, string|null $securityCode = null ]) : Result
Parameters
$login : string|null = null
$securityCode : string|null = null
Return values
Result

getIdentity()

Returns the authenticated CompanyUser|User or null if no identity is available.

public getIdentity() : IdentityInterface|null
Tags
psalm-return

(TAdapter is CompanyUserAdapter ? (CompanyUser|null) : (User|null))

Return values
IdentityInterface|null

hasIdentity()

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

public hasIdentity() : bool
Return values
bool

setRememberMe()

Set whether we should remember this session or not.

public setRememberMe(bool $rememberMe) : void
Parameters
$rememberMe : bool

        
On this page

Search results