UserSession
extends Session
in package
Table of Contents
Constants
- JWT_COOKIE_NAME = 'GEWISSESSTOKEN'
- JWT_KEY_ALGORITHM = 'RS256'
Properties
- $config : array<string|int, mixed>
- $rememberMe : bool
- $request : Request
- $response : Response
Methods
- __construct() : mixed
- clear() : void
- Defined by Laminas\Authentication\Storage\StorageInterface.
- isEmpty() : bool
- Defined by Laminas\Authentication\Storage\StorageInterface.
- setRememberMe() : void
- Set whether we should remember this session or not.
- write() : void
- Defined by Laminas\Authentication\Storage\StorageInterface.
- clearCookie() : void
- Destroy the cookie holding the stored session.
- getPrivateKey() : false|string
- Get the private key to use for JWT.
- getPublicKey() : false|string
- Get the public key to use for JWT.
- saveCookie() : void
- Store the session token as a cookie.
- saveSession() : void
- Store the current session.
- validateSession() : bool
- Check if there is a session stored in the database and load it when possible.
- setCookieParameters() : SetCookie
- Set specific cookie parameters.
Constants
JWT_COOKIE_NAME
private
mixed
JWT_COOKIE_NAME
= 'GEWISSESSTOKEN'
JWT_KEY_ALGORITHM
private
mixed
JWT_KEY_ALGORITHM
= 'RS256'
Properties
$config read-only
private
array<string|int, mixed>
$config
$rememberMe
private
bool
$rememberMe
$request read-only
private
Request
$request
$response read-only
private
Response
$response
Methods
__construct()
public
__construct(Request $request, Response $response, array<string|int, mixed> $config) : mixed
Parameters
- $request : Request
- $response : Response
- $config : array<string|int, mixed>
Tags
clear()
Defined by Laminas\Authentication\Storage\StorageInterface.
public
clear() : void
isEmpty()
Defined by Laminas\Authentication\Storage\StorageInterface.
public
isEmpty() : bool
Return values
boolsetRememberMe()
Set whether we should remember this session or not.
public
setRememberMe(bool $rememberMe) : void
Parameters
- $rememberMe : bool
write()
Defined by Laminas\Authentication\Storage\StorageInterface.
public
write(mixed $contents) : void
Parameters
- $contents : mixed
Tags
clearCookie()
Destroy the cookie holding the stored session.
protected
clearCookie() : void
getPrivateKey()
Get the private key to use for JWT.
protected
getPrivateKey() : false|string
Return values
false|stringgetPublicKey()
Get the public key to use for JWT.
protected
getPublicKey() : false|string
Return values
false|stringsaveCookie()
Store the session token as a cookie.
protected
saveCookie(string $jwt) : void
Parameters
- $jwt : string
saveSession()
Store the current session.
protected
saveSession(int $lidnr) : void
Parameters
- $lidnr : int
validateSession()
Check if there is a session stored in the database and load it when possible.
protected
validateSession() : bool
Return values
boolsetCookieParameters()
Set specific cookie parameters.
private
setCookieParameters(SetCookie $sessionToken) : SetCookie
Parameters
- $sessionToken : SetCookie