CsrfValidationException
extends RuntimeException
in package
Exception thrown when CSRF token validation fails.
Carries HTTP status 403. Applications/middleware should catch this and return a Forbidden response.
Table of Contents
Properties
- $_userMessage : string
Methods
- __construct() : mixed
- getUserMessage() : string
- Get user-friendly message suitable for display.
Properties
$_userMessage
private
string
$_userMessage
Methods
__construct()
public
__construct(string $message[, string $userMessage = 'CSRF token validation failed' ]) : mixed
Parameters
- $message : string
-
Technical message for logging
- $userMessage : string = 'CSRF token validation failed'
-
User-friendly message to display
getUserMessage()
Get user-friendly message suitable for display.
public
getUserMessage() : string