Security
in package
Table of Contents
Constants
- SESSION_KEY_NONCE = 'security-script-src-nonce'
Methods
- applyHeader() : mixed
- getNonce() : string
- setNonce() : mixed
- createNonce() : string
- setHeader() : mixed
Constants
SESSION_KEY_NONCE
public
mixed
SESSION_KEY_NONCE
= 'security-script-src-nonce'
Methods
applyHeader()
public
static applyHeader([mixed $withCsp = false ]) : mixed
Parameters
- $withCsp : mixed = false
Tags
getNonce()
public
static getNonce([bool $create = false ]) : string
Parameters
- $create : bool = false
-
creates a new nonce if none given
Tags
Return values
stringsetNonce()
public
static setNonce([mixed $nonce = null ]) : mixed
Parameters
- $nonce : mixed = null
createNonce()
private
static createNonce() : string
Tags
Return values
stringsetHeader()
private
static setHeader(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
- $value : mixed