final class SessionStorage implements UserStorage

Session storage for Nette\Security\User object.

Methods

__construct(Session $sessionHandler)

No description

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 $time, bool $clearIdentity = false)

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

setNamespace(string $namespace)

Changes namespace; allows more users to share a session.

string
getNamespace()

Returns current namespace.

Details

at line 29
__construct(Session $sessionHandler)

No description

Parameters

Session $sessionHandler

at line 35
void saveAuthentication(IIdentity $identity)

Saves authenticated identity to storage.

Parameters

IIdentity $identity

Return Value

void

at line 49
void clearAuthentication(bool $clearIdentity)

Removes authenticated state from storage.

Parameters

bool $clearIdentity

Return Value

void

at line 64
array getState()

Returns user authenticated state, identity and logout reason.

Return Value

array

at line 71
void setExpiration(string|null $time, bool $clearIdentity = false)

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

Parameters

string|null $time
bool $clearIdentity

Return Value

void

at line 101
SessionStorage setNamespace(string $namespace)

Changes namespace; allows more users to share a session.

Parameters

string $namespace

Return Value

SessionStorage

at line 115
string getNamespace()

Returns current namespace.

Return Value

string