예제 #1
0
 /**
  * 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");
 }
예제 #2
0
 /**
  * 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));
 }
예제 #3
0
 /**
  * No parameters are required - the token is just missing!
  */
 public function __construct()
 {
     parent::__construct("CSRF Token not found on \$_POST");
 }