Skip to content

Commit

Permalink
maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidwhiteside committed Feb 6, 2021
1 parent 59ce82a commit 4e3cf23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pivportal/lib/pivportal/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def create_token(user, secret_key):
}

token = jwt.encode(payload, secret_key, algorithm='HS256')
return token.encode().decode('unicode_escape')
return token


def parse_token(token, secret_key):
return jwt.encode().decode(token, secret_key, algorithms='HS256')
return jwt.decode(token, secret_key, algorithms='HS256')


def token_required(secret_key):
Expand Down

0 comments on commit 4e3cf23

Please sign in to comment.