Documentation

SessionTokenStorage extends AbstractTokenStorage
in package

Uses the session to store the CSRF token

Table of Contents

__construct()  : mixed
__destruct()  : mixed
add()  : void
Adds a token to the storage
clearExpired()  : void
Removes all expired tokens
commit()  : void
Store the token between requests
isValid()  : bool
Determines if the storage contains a matching token and if it is valid.
queryAll()  : array<string|int, CsrfToken>
Returns all tokens
queryOne()  : CsrfToken|null
Returns a single token

Methods

__construct()

public __construct(AbstractSession $sessionVars[, string $requestId = REQUEST_ID_KEY ][, int $maxCount = TOKEN_MAX ]) : mixed
Parameters
$sessionVars : AbstractSession
$requestId : string = REQUEST_ID_KEY
$maxCount : int = TOKEN_MAX
Return values
mixed

clearExpired()

Removes all expired tokens

public clearExpired() : void
Return values
void

commit()

Store the token between requests

public commit() : void
Return values
void

isValid()

Determines if the storage contains a matching token and if it is valid.

public isValid(string $stringToken) : bool
Parameters
$stringToken : string
Return values
bool

Search results