Documentation

Token
in package

Validates and generates CSRF tokens.

Tags
author

Samerton

version
2.0.0-pr8
license

MIT

Table of Contents

Methods

check()  : bool
Check if token in session matches current token.
generate()  : void
Generate a form token and store in a session variable.
get()  : string
Get current form token.

Methods

check()

Check if token in session matches current token.

public static check([string|null $token = null ]) : bool
Parameters
$token : string|null = null

Contains the form token which will be checked against the session variable.

Tags
throws
Exception
Return values
bool

Whether token matches.

generate()

Generate a form token and store in a session variable.

public static generate() : void

get()

Get current form token.

public static get() : string
Return values
string

current form token.


        
On this page

Search results