PHP Classes

File: src/Exception/TokenHashException.php

Recommend this page to a friend!
  Packages of Scott Arciszewski   Anti-CSRF   src/Exception/TokenHashException.php   Download  
File: src/Exception/TokenHashException.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Anti-CSRF
Generate tokens to protect against CSRF exploits
Author: By
Last change:
Date: 9 months ago
Size: 375 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);

namespace
ParagonIE\AntiCSRF\Exception;

/**
 * Class TokenHashException
 *
 * @package ParagonIE\AntiCSRF
 */
class TokenHashException extends AntiCSRFException
{
    public static function
create(string $token): self
   
{
        return new
self(
            \
sprintf('Token "%s" did not match the stored value', $token)
        );
    }
}