Conflicts:
	README.rst
This commit is contained in:
juanifioren 2015-08-12 15:21:57 -03:00
commit 5311888520
2 changed files with 4 additions and 2 deletions

View file

@ -40,7 +40,7 @@ Examples running
****************
* **Example OIDC provider** by Juan Ignacio Fiorentino. (`view site <http://openid.juanifioren.com/>`_)
* **BAID** by Government of Buenos Aires City*. (`view site <https://id.buenosaires.gob.ar/>`_)
* **BAID** by Government of Buenos Aires City. (`view site <https://id.buenosaires.gob.ar/>`_)
************
Contributing

View file

@ -4,6 +4,7 @@ import uuid
from Crypto.PublicKey.RSA import importKey
from django.utils import timezone
from hashlib import md5
from jwkest.jwk import RSAKey
from jwkest.jws import JWS
@ -52,7 +53,8 @@ def encode_id_token(payload):
Return a hash.
"""
keys = [ RSAKey(key=importKey(get_rsa_key())) ]
key_string = get_rsa_key().encode('utf-8')
keys = [ RSAKey(key=importKey(key_string), kid=md5(key_string).hexdigest()) ]
_jws = JWS(payload, alg='RS256')
_jwt = _jws.sign_compact(keys)