refactor: 修改验证码接口及登录接口

This commit is contained in:
2025-01-02 16:22:58 +08:00
parent 824d1cf8c2
commit 3d81035d0e
8 changed files with 109 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ return [
// 验证码字符集合
'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY',
// 验证码过期时间
'expire' => 1800,
'expire' => 300,
// 是否使用中文验证码
'useZh' => false,
// 是否使用算术验证码

21
config/jwt.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
return [
'secret' => env('JWT_SECRET'),
//Asymmetric key
'public_key' => env('JWT_PUBLIC_KEY'),
'private_key' => env('JWT_PRIVATE_KEY'),
'password' => env('JWT_PASSWORD'),
//JWT time to live
'ttl' => env('JWT_TTL', 60),
//Refresh time to live
'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
//JWT hashing algorithm
'algo' => env('JWT_ALGO', 'HS256'),
//token获取方式数组靠前值优先
'token_mode' => ['header', 'cookie', 'param'],
//黑名单后有效期
'blacklist_grace_period' => env('BLACKLIST_GRACE_PERIOD', 10),
'blacklist_storage' => thans\jwt\provider\storage\Tp6::class,
];