Upgrade pyjwkest to version > 1.0.3
There have been some issues in Python 3 where elements of the id_token were left when encoding the token. Cause was incorrect encoding logic in pyjwkest. Version 1.0.3 has improved encoding handling.
This commit is contained in:
parent
c76f73eb7e
commit
893a877b76
|
@ -56,9 +56,7 @@ def encode_id_token(payload):
|
||||||
key_string = get_rsa_key().encode('utf-8')
|
key_string = get_rsa_key().encode('utf-8')
|
||||||
keys = [ RSAKey(key=importKey(key_string), kid=md5(key_string).hexdigest()) ]
|
keys = [ RSAKey(key=importKey(key_string), kid=md5(key_string).hexdigest()) ]
|
||||||
_jws = JWS(payload, alg='RS256')
|
_jws = JWS(payload, alg='RS256')
|
||||||
_jwt = _jws.sign_compact(keys)
|
return _jws.sign_compact(keys)
|
||||||
|
|
||||||
return _jwt.decode('utf-8')
|
|
||||||
|
|
||||||
|
|
||||||
def create_token(user, client, id_token_dic, scope):
|
def create_token(user, client, id_token_dic, scope):
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -37,10 +37,10 @@ setup(
|
||||||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
||||||
],
|
],
|
||||||
tests_require=[
|
tests_require=[
|
||||||
'pyjwkest==1.0.1',
|
'pyjwkest>=1.0.3,<1.1',
|
||||||
],
|
],
|
||||||
|
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'pyjwkest==1.0.1',
|
'pyjwkest>=1.0.3,<1.1',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue