feat: 增强管理员 API 鉴权,新增 token 有效天数配置,更新相关异常处理与错误码引用

This commit is contained in:
2026-05-09 11:26:39 +08:00
parent 8a70c029f6
commit f1b38ef421
13 changed files with 124 additions and 42 deletions

View File

@@ -48,4 +48,13 @@ return [
],
],
/*
| admin_apiSanctum Personal Access Tokenauth:sanctum + lottery.admin
|
| token_ttl_days签发时刻起有效日历天数到期后 Laravel 拒绝该 token需重新登录。
*/
'admin_api' => [
'token_ttl_days' => max(1, (int) env('ADMIN_API_TOKEN_TTL_DAYS', 7)),
],
];