chore: 重写初始提交(清空历史,整理后全量提交)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | YwxApp [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2026-2036 http://ywxapp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: ywxapp<admin@ywxapp.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
// config/jwt.php
|
||||
|
||||
return [
|
||||
// 签名算法:HS256 / RS256
|
||||
'algorithm' => 'HS256',
|
||||
|
||||
// 对称密钥(HS256 使用)
|
||||
'secret' => env('JWT_SECRET', 'your-default-secret-key-change-in-production'),
|
||||
|
||||
// 非对称密钥路径(RS256 使用)
|
||||
'private_key_path' => root_path() . 'keys/private.key',
|
||||
'public_key_path' => root_path() . 'keys/public.key',
|
||||
|
||||
// Token 配置
|
||||
'access_ttl' => 1800, // Access Token 有效期(秒)→ 30分钟
|
||||
'refresh_ttl' => 604800, // Refresh Token 有效期(秒)→ 7天
|
||||
|
||||
// JWT 标准声明
|
||||
'issuer' => 'https://your-app.com',
|
||||
'audience' => 'https://api.your-app.com',
|
||||
];
|
||||
Reference in New Issue
Block a user