Documentation

TokenStorageInterface

Stores CSRF tokens.

Tags
author

Bernhard Schussek bschussek@gmail.com

Table of Contents

Methods

getToken()  : string
Reads a stored CSRF token.
hasToken()  : bool
Checks whether a token with the given token ID exists.
removeToken()  : string|null
Removes a CSRF token.
setToken()  : mixed
Stores a CSRF token.

Methods

hasToken()

Checks whether a token with the given token ID exists.

public hasToken(string $tokenId) : bool
Parameters
$tokenId : string
Return values
bool

removeToken()

Removes a CSRF token.

public removeToken(string $tokenId) : string|null
Parameters
$tokenId : string
Return values
string|null

Returns the removed token if one existed, NULL otherwise

setToken()

Stores a CSRF token.

public setToken(string $tokenId, string $token) : mixed
Parameters
$tokenId : string
$token : string

        
On this page

Search results