dggjimai/config/api/jwt.php

19 lines
811 B
PHP
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
return [
//token在header中的name
'name' => 'token',
//token加密使用的secret
'secret' => '552ac90778a976c72f7f673db174df30',
//颁发者
'iss' => 'iss',
//使用者
'aud' => 'aud',
//过期时间以秒为单位默认2小时
'ttl' => 30*60*60*24,
//刷新时间以秒为单位默认14天
'refresh_ttl' => 1209600,
//是否自动刷新开启后可自动刷新token附在header中返回name为`Authorization`,字段为`Bearer `+$token
'auto_refresh' => true,
//黑名单宽限期以秒为单位首次token刷新之后在此时间内原token可以继续访问
'blacklist_grace_period' => 60
];