add integration
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user