CsrfValidationException
extends RuntimeException
in package
Exception thrown when CSRF token validation fails.
This exception should be caught at the application/framework level and handled appropriately (typically by returning a 403 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