-
csrf-tokenservice: 服务提供无状态的CSRF(跨站请求伪造)令牌
资源介绍
CSRF \ TokenService
无状态CSRF(跨站请求伪造)令牌服务 :meat_on_bone:
安装
$ composer require schnittstabil/csrf-tokenservice
用法
<?php
require __DIR__. '/vendor/autoload.php' ;
use Schnittstabil \ Csrf \ TokenService \ TokenService ;
// Shared secret key used for generating and validating token signatures:
$ key = 'This key is not so secret - change it!' ;
// Time to Live in seconds; default is 1440 seconds === 24 minutes:
$