Documentation

CsrfTokenBadge
in package
implements BadgeInterface

Adds automatic CSRF tokens checking capabilities to this authenticator.

Tags
see
CsrfProtectionListener
author

Wouter de Jong wouter@wouterj.nl

final

Table of Contents

Interfaces

BadgeInterface
Passport badges allow to add more information to a passport (e.g. a CSRF token).

Properties

$csrfToken  : string|null
$csrfTokenId  : string
$resolved  : bool

Methods

__construct()  : mixed
getCsrfToken()  : string|null
getCsrfTokenId()  : string
isResolved()  : bool
Checks if this badge is resolved by the security system.

Properties

Methods

__construct()

public __construct(string $csrfTokenId, string|null $csrfToken) : mixed
Parameters
$csrfTokenId : string

An arbitrary string used to generate the value of the CSRF token. Using a different string for each authenticator improves its security.

$csrfToken : string|null

The CSRF token presented in the request, if any

getCsrfToken()

public getCsrfToken() : string|null
Return values
string|null

getCsrfTokenId()

public getCsrfTokenId() : string
Return values
string

isResolved()

Checks if this badge is resolved by the security system.

public isResolved() : bool

After authentication, all badges must return true in this method in order for the authentication to succeed.

Return values
bool

        
On this page

Search results