CSRFToken
in
Specifies the methods required for the OAuth2 CSRF token validation ("state parameter")
Tags
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
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>