feat: 增强管理员 API 鉴权,新增 token 有效天数配置,更新相关异常处理与错误码引用
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use App\Lottery\ErrorCode;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* 【业务文案翻译辅助类】
|
||||
*
|
||||
* 从 lang/{locale}/sso.php 等语言包取字符串,供 JSON 里「msg」字段使用。
|
||||
* 当前实现:玩家 SSO / Bearer 鉴权相关错误码(8001–8004),见 docs/04 错误码段。
|
||||
* `App\Lottery\ErrorCode` 中玩家 SSO 段(8001–8004)的各语言 `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 段(8001–8004)
|
||||
*/
|
||||
public static function sso(Request $request, int $code): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user