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 41
__construct(Session $sessionHandler)

No description

Parameters

Session $sessionHandler

at line 47
void saveAuthentication(IIdentity $identity)

Sets the authenticated state of user.

Parameters

IIdentity $identity

Return Value

void

at line 61
void clearAuthentication(bool $clearIdentity)

Removed authenticated state of user.

Parameters

bool $clearIdentity

Return Value

void

at line 76
array getState()

Returns user authenticated state, identity and logout reason.

Return Value

array

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

Changes namespace; allows more users to share a session.

Parameters

string $namespace

Return Value

SessionStorage

at line 129
string getNamespace()

Returns current namespace.

Return Value

string

at line 138
protected SessionSection|null getSessionSection()

Returns and initializes $this->sessionSection.

Return Value

SessionSection|null

Traits

SmartObject