CSRF
  • Namespace
  • Class
  • Tree

Namespaces

  • PHP
  • Riimu
    • Kit
      • CSRF
        • Source
        • Storage

Classes

  • Riimu\Kit\CSRF\CSRFHandler
  • Riimu\Kit\CSRF\NonceValidator
  • Riimu\Kit\CSRF\SingleToken
  • Riimu\Kit\CSRF\Source\HeaderSource
  • Riimu\Kit\CSRF\Source\PostSource
  • Riimu\Kit\CSRF\Storage\CookieStorage
  • Riimu\Kit\CSRF\Storage\SessionStorage

Interfaces

  • Riimu\Kit\CSRF\Source\TokenSource
  • Riimu\Kit\CSRF\Storage\TokenStorage

Exceptions

  • Riimu\Kit\CSRF\InvalidCSRFTokenException
  • Riimu\Kit\CSRF\Storage\TokenStorageException
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
<?php

namespace Riimu\Kit\CSRF\Storage;

/**
 * Interface for a persistent token storage.
 * @author Riikka Kalliomäki <riikka.kalliomaki@gmail.com>
 * @copyright Copyright (c) 2014, Riikka Kalliomäki
 * @license http://opensource.org/licenses/mit-license.php MIT License
 */
interface TokenStorage
{
    /**
     * Stores the CSRF token in the persistent storage.
     * @param string $token The CSRF token to store
     * @return void
     * @throws TokenStorageException If the token cannot be successfully stored
     */
    public function storeToken($token);

    /**
     * Loads the CSRF token from the persistent storage.
     * @return string|false The stored token or false if none is stored
     * @throws TokenStorageException If the token cannot be successfully loaded
     */
    public function getStoredToken();
}
CSRF API documentation generated by ApiGen