We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee81706 commit b1b1d3fCopy full SHA for b1b1d3f
backend/common/security/jwt.py
@@ -32,9 +32,7 @@ class CustomHTTPBearer(HTTPBearer):
32
"""
33
自定义 HTTPBearer 认证类
34
35
- 重写 __call__ 方法,当认证失败时:
36
- - 如果原始异常是 403 状态码,则抛出 401 状态码的 TokenError
37
- - 其他异常保持原样抛出
+ https://github.com/fastapi/fastapi/issues/10177
38
39
async def __call__(self, request: Request) -> HTTPAuthorizationCredentials | None:
40
try:
0 commit comments