我用jwt和Lumen创建了一个身份验证api。
我tymondesigns/jwt-auth在Lumen项目中使用软件包进行身份验证。在项目中,当用户登录时,我想在1个月后过期用户令牌。
现在我该如何解决?
如果您运行了:
php artisan vendor:publish
根据安装Wiki:https : //github.com/tymondesigns/jwt-auth/wiki/Installation
然后简单地更改ttl设置:
// In config/jwt.php
...
/*
|--------------------------------------------------------------------------
| JWT time to live
|--------------------------------------------------------------------------
|
| Specify the length of time (in minutes) that the token will be valid for.
| Defaults to 1 hour
|
*/
'ttl' => 43800, // valid for 1 month
...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3820 次 |
| 最近记录: |