/** * CSRFTokenInvalidException constructor. * * @param string $tokenReceived The string that is not a valid token, */ public function __construct(string $tokenReceived) { parent::__construct("CSRF Token '{$tokenReceived}' does not exist"); }
/** * CSRFTokenSpentException constructor. * * @param string $tokenReceived The token that was received but found to * have been spent already * @param string $previousUseTime The time it was previously used. */ public function __construct(string $tokenReceived, int $previousUseTime) { parent::__construct("CSRF Token '{$tokenReceived}' previously used at " . date("c", $previousUseTime)); }
/** * No parameters are required - the token is just missing! */ public function __construct() { parent::__construct("CSRF Token not found on \$_POST"); }