mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-10 22:02:12 +00:00
085f98cf08
- Better php7 support. - Added easier way to debug router. - Improvements and bugfixes. - Updated documentation.
29 lines
491 B
PHP
29 lines
491 B
PHP
<?php
|
|
|
|
namespace Pecee\Http\Security;
|
|
|
|
interface ITokenProvider
|
|
{
|
|
|
|
/**
|
|
* Refresh existing token
|
|
*/
|
|
public function refresh(): void;
|
|
|
|
/**
|
|
* Validate valid CSRF token
|
|
*
|
|
* @param string $token
|
|
* @return bool
|
|
*/
|
|
public function validate(string $token): bool;
|
|
|
|
/**
|
|
* Get token token
|
|
*
|
|
* @param string|null $defaultValue
|
|
* @return string|null
|
|
*/
|
|
public function getToken(?string $defaultValue = null): ?string;
|
|
|
|
} |