add integration

This commit is contained in:
2025-08-06 18:46:21 -03:00
parent e08f16bbaa
commit ff25ade76e
16 changed files with 314 additions and 132 deletions

View File

@@ -39,7 +39,16 @@ def generate_refresh_token(user_id: str) -> str:
def verify_jwt(token: str) -> dict:
try:
payload = jwt.decode(token, JWT_SECRET, algorithms=[JWT_ALGORITHM])
payload = jwt.decode(
token,
JWT_SECRET,
algorithms=[JWT_ALGORITHM],
issuer=ISSUER,
options={
'require': ['exp', 'sub', 'iss'],
'leeway': 60,
},
)
return payload
except ExpiredSignatureError:
raise ForbiddenError('Token expired')