interface UserStorage

Persistent storage for user authentication state and identity.

Constants

LOGOUT_MANUAL

LOGOUT_INACTIVITY

Methods

void
saveAuthentication(IIdentity $identity)

Saves authenticated identity to storage.

void
clearAuthentication(bool $clearIdentity)

Removes authenticated state from storage.

array
getState()

Returns user authenticated state, identity and logout reason.

void
setExpiration(string|null $expire, bool $clearIdentity)

Enables log out from the persistent storage after inactivity (like '20 minutes').

Details

at line 25
void saveAuthentication(IIdentity $identity)

Saves authenticated identity to storage.

Parameters

IIdentity $identity

Return Value

void

at line 30
void clearAuthentication(bool $clearIdentity)

Removes authenticated state from storage.

Parameters

bool $clearIdentity

Return Value

void

at line 36
array getState()

Returns user authenticated state, identity and logout reason.

Return Value

array

at line 41
void setExpiration(string|null $expire, bool $clearIdentity)

Enables log out from the persistent storage after inactivity (like '20 minutes').

Parameters

string|null $expire
bool $clearIdentity

Return Value

void