Documentation

AbstractTokenStorage
in package

Used to store and validate tokens used to mitigate CSRF attacks

Table of Contents

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

clearExpired()

Removes all expired tokens

public clearExpired() : void
Return values
void

commit()

Store the token between requests

public abstract 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