Documentation

Csrf
in package

Table of Contents

Properties

$config  : Config
$escaper  : Escaper
$hmacKey  : string
$scrfSessionIndex  : string
$session  : Session

Methods

__construct()  : mixed
csrfGenerate()  : array<string|int, string>
Generates token for CSRF protection
csrfVerify()  : bool

Properties

$hmacKey

private string $hmacKey

$scrfSessionIndex

private string $scrfSessionIndex = 'csrf'

Methods

csrfGenerate()

Generates token for CSRF protection

public csrfGenerate() : array<string|int, string>
Return values
array<string|int, string>

Form index, token and html input tag

csrfVerify()

public csrfVerify(array<string|int, mixed> $post[, bool $deleteToken = false ]) : bool
Parameters
$post : array<string|int, mixed>
$deleteToken : bool = false
Return values
bool

        
On this page

Search results