final class SessionStorage implements UserStorage

Session storage for Nette\Security\User object.

Methods

__construct(Session $sessionHandler)

No description

void
saveAuthentication(IIdentity $identity)

Sets the authenticated state of user.

void
clearAuthentication(bool $clearIdentity)

Removed authenticated state of user.

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.

SessionSection|null
getSessionSection()

Returns and initializes $this->sessionSection.

Details

at line 31
__construct(Session $sessionHandler)

No description

Parameters

Session $sessionHandler

at line 37
void saveAuthentication(IIdentity $identity)

Sets the authenticated state of user.

Parameters

IIdentity $identity

Return Value

void

at line 51
void clearAuthentication(bool $clearIdentity)

Removed authenticated state of user.

Parameters

bool $clearIdentity

Return Value

void

at line 66
array getState()

Returns user authenticated state, identity and logout reason.

Return Value

array

at line 75
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 104
SessionStorage setNamespace(string $namespace)

Changes namespace; allows more users to share a session.

Parameters

string $namespace

Return Value

SessionStorage

at line 118
string getNamespace()

Returns current namespace.

Return Value

string

at line 127
protected SessionSection|null getSessionSection()

Returns and initializes $this->sessionSection.

Return Value

SessionSection|null