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

@@ -2,13 +2,14 @@
namespace App\Support;
use App\Lottery\ErrorCode;
use Illuminate\Http\Request;
/**
* 【业务文案翻译辅助类】
*
* lang/{locale}/sso.php 等语言包取字符串,供 JSON 里「msg」字段使用。
* 当前实现:玩家 SSO / Bearer 鉴权相关错误码80018004 docs/04 错误码段
* `App\Lottery\ErrorCode` 中玩家 SSO 80018004的各语言 `msg`
*
* 依赖 NegotiateLotteryLocale 已写入 lottery_locale若未写则使用 fallback 语言包。
*/
@@ -17,7 +18,7 @@ final class LotteryMessage
/**
* SSO 鉴权类错误的用户可见文案(与 ApiResponse msg 对应)。
*
* @param int $code 业务错误码,如 8001
* @param int $code {@see ErrorCode} 玩家 SSO 80018004
*/
public static function sso(Request $request, int $code): string
{