"...resnet50_tensorflow.git" did not exist on "0cc529052ae35227dc6a06ca21a6ffba1112350f"
Commit 4fceb404 authored by Tim Farrell's avatar Tim Farrell
Browse files

Call `jwt.decode` with the expected algorithms

parent e15dbdc4
...@@ -48,7 +48,7 @@ def create_token(data: dict, expires_delta: Union[timedelta, None] = None) -> st ...@@ -48,7 +48,7 @@ def create_token(data: dict, expires_delta: Union[timedelta, None] = None) -> st
def decode_token(token: str) -> Optional[dict]: def decode_token(token: str) -> Optional[dict]:
try: try:
decoded = jwt.decode(token, SESSION_SECRET) decoded = jwt.decode(token, SESSION_SECRET, algorithms=[ALGORITHM])
return decoded return decoded
except Exception as e: except Exception as e:
return None return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment