feat: 添加 JWT 支持与开发环境配置,更新 API 路由与中间件
This commit is contained in:
22
app/Exceptions/PlayerAuthenticationException.php
Normal file
22
app/Exceptions/PlayerAuthenticationException.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* 玩家端 Bearer 鉴权失败时抛出,由 EnsurePlayerApi 捕获并转为 JSON。
|
||||
*
|
||||
* @property-read int $lotteryCode 业务错误码(对齐 docs/04-领域字典 §10,SSO 段 8000–8999)
|
||||
* @property-read int $httpStatus HTTP 状态码(401 未授权、503 服务未配置等)
|
||||
*/
|
||||
final class PlayerAuthenticationException extends RuntimeException
|
||||
{
|
||||
public function __construct(
|
||||
string $message,
|
||||
public readonly int $lotteryCode,
|
||||
public readonly int $httpStatus = 401,
|
||||
) {
|
||||
parent::__construct($message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user