Documentation

CSRFToken

Specifies the methods required for the OAuth2 CSRF token validation ("state parameter")

Tags
link
https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1
link
https://datatracker.ietf.org/doc/html/rfc6749#section-10.12

Table of Contents

Methods

checkState()  : void
Checks whether the CSRF state was set and verifies against the last known state.
setState()  : array<string, string>
Sets the CSRF state parameter in a given array of query parameters and stores that value in the local storage for later verification. Returns the updated array of parameters.

Methods

checkState()

Checks whether the CSRF state was set and verifies against the last known state.

public checkState([string|null $state = null ]) : void

Throws a ProviderException if the given state is empty, unknown or doesn't match the known state.

Parameters
$state : string|null = null
Tags
throws
ProviderException

setState()

Sets the CSRF state parameter in a given array of query parameters and stores that value in the local storage for later verification. Returns the updated array of parameters.

public setState(array<string, string> $params) : array<string, string>
Parameters
$params : array<string, string>
Tags
throws
ProviderException
Return values
array<string, string>

        
On this page

Search results