"ts/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "dc54f4add0ea1837be0a14f353cf6bcf6e68bb95"
Commit 2c1dacb9 authored by Tim Farrell's avatar Tim Farrell
Browse files

We should verify signatures to make the whole session secret meaningful.

parent 03a7e359
...@@ -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, options={"verify_signature": False}) decoded = jwt.decode(token, SESSION_SECRET)
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