diff --git a/foca/security/auth.py b/foca/security/auth.py index 5747976f..2b556b78 100644 --- a/foca/security/auth.py +++ b/foca/security/auth.py @@ -56,8 +56,8 @@ def validate_token(token: str) -> Dict: try: claims = jwt.decode( jwt=token, - verify=False, algorithms=algorithms, + options={"verify_signature": False} ) except Exception as e: raise Unauthorized("JWT could not be decoded") from e diff --git a/requirements.txt b/requirements.txt index 91ec5349..517f1b03 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ Flask==2.0.3 Flask-Cors==3.0.9 Flask-PyMongo==2.3.0 pydantic==1.8.2 -PyJWT==1.7.1 +PyJWT==2.4.0 pymongo==3.10.1 PyYAML==5.4 requests==2.27.1