add contract pdf generation
This commit is contained in:
@@ -13,6 +13,8 @@ import jwt
|
||||
from jwt import PyJWKClient
|
||||
import requests
|
||||
|
||||
from src.messages import tokenExpired, invalidToken
|
||||
|
||||
router = APIRouter(prefix="/auth")
|
||||
|
||||
jwk_client = PyJWKClient(JWKS_URL)
|
||||
@@ -78,9 +80,9 @@ def verify_token(token: str):
|
||||
)
|
||||
return payload
|
||||
except jwt.ExpiredSignatureError:
|
||||
raise HTTPException(status_code=401, detail="Token expired")
|
||||
raise HTTPException(status_code=401, detail=tokenExpired)
|
||||
except jwt.InvalidTokenError:
|
||||
raise HTTPException(status_code=401, detail="Invalid token")
|
||||
raise HTTPException(status_code=401, detail=invalidToken)
|
||||
|
||||
|
||||
def get_current_user(
|
||||
|
||||
Reference in New Issue
Block a user