class CookieStorage implements UserStorage

Cookie storage for Nette\Security\User object.

Constants

MIN_LENGTH

Methods

__construct(IRequest $request, IResponse $response)

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 $expire, bool $clearIdentity)

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

setCookieParameters(string $name = null, string $domain = null, string $sameSite = null)

No description

Details

at line 45
__construct(IRequest $request, IResponse $response)

Parameters

IRequest $request
IResponse $response

at line 52
void saveAuthentication(IIdentity $identity)

Sets the authenticated state of user.

Parameters

IIdentity $identity

Return Value

void

at line 68
void clearAuthentication(bool $clearIdentity)

Removed authenticated state of user.

Parameters

bool $clearIdentity

Return Value

void

at line 78
array getState()

Returns user authenticated state, identity and logout reason.

Return Value

array ?IIdentity, ?int}

at line 88
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

at line 94
setCookieParameters(string $name = null, string $domain = null, string $sameSite = null)

Parameters

string $name
string $domain
string $sameSite

Traits

Strict class for better experience.