feat: 增强管理员 API 鉴权,新增 token 有效天数配置,更新相关异常处理与错误码引用
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Exceptions\PlayerAuthenticationException;
|
||||
use App\Lottery\ErrorCode;
|
||||
use App\Services\PlayerTokenResolver;
|
||||
use App\Support\ApiResponse;
|
||||
use App\Support\LotteryMessage;
|
||||
@@ -15,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*
|
||||
* - 成功:解析 Bearer → Player,写入 request attribute `lottery_player`。
|
||||
* - 失败:直接 JSON 返回,不进入控制器;其中 msg 经由 LotteryMessage::sso() 按请求语言翻译
|
||||
* (依赖前置的 NegotiateLotteryLocale),code 仍为文档约定业务码(如 8001)。
|
||||
* (依赖前置的 NegotiateLotteryLocale),code 为 {@see ErrorCode} 中玩家鉴权段。
|
||||
*
|
||||
* PlayerAuthenticationException 的 getMessage() 仅作开发与日志用语,可与 API msg 语种不一致。
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user