Switch from PyJWT to python-jose, since it supports more features and has more documentation

This commit is contained in:
Danielle McLean 2017-11-03 17:42:57 +11:00
parent 5b70c59f83
commit cfe0f47d0f
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
3 changed files with 32 additions and 13 deletions

View file

@ -1,4 +1,4 @@
import jwt
from jose import jwt
from datetime import datetime, timedelta
from django.conf import settings
@ -34,4 +34,4 @@ def gen_token(code):
'sco': code['sco'],
'iat': datetime.utcnow(),
}
return encode(tok).decode('utf-8')
return encode(tok)