Compare commits
4 Commits
291eba63a7
...
renovate/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c896075ead | ||
| ac0a04e71f | |||
| 94cc74c0fb | |||
| 41a18edb4f |
@@ -14,7 +14,7 @@ dependencies = [
|
||||
"asyncpg==0.31.0",
|
||||
"alembic==1.18.4",
|
||||
"PyJWT==2.12.1",
|
||||
"cryptography==45.0.3",
|
||||
"cryptography==45.0.7",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
@@ -3,7 +3,7 @@ from uuid import UUID
|
||||
|
||||
import jwt
|
||||
from fastapi import Depends, HTTPException, Request, status
|
||||
from jwt import PyJWKClient, PyJWKClientError
|
||||
from jwt import PyJWKClient, PyJWKClientError, PyJWKSetError
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
@@ -71,7 +71,11 @@ def _verify_jwt(token: str) -> dict | None:
|
||||
algorithms=["RS256"],
|
||||
audience="authenticated",
|
||||
)
|
||||
except jwt.InvalidTokenError, PyJWKClientError:
|
||||
except jwt.InvalidTokenError:
|
||||
pass
|
||||
except PyJWKClientError:
|
||||
pass
|
||||
except PyJWKSetError:
|
||||
pass
|
||||
return _verify_jwt_hs256(token)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user