From a640b33dd68bbe1394ef6a5d679b10ce2c5856b4 Mon Sep 17 00:00:00 2001 From: juanifioren Date: Mon, 27 Jul 2015 15:50:02 -0300 Subject: [PATCH] Convert "aud" to str in create_id_token function. --- oidc_provider/lib/utils/token.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oidc_provider/lib/utils/token.py b/oidc_provider/lib/utils/token.py index 293b583..89dad4b 100644 --- a/oidc_provider/lib/utils/token.py +++ b/oidc_provider/lib/utils/token.py @@ -34,14 +34,14 @@ def create_id_token(user, aud, nonce): dic = { 'iss': get_issuer(), 'sub': sub, - 'aud': aud, + 'aud': str(aud), 'exp': exp_time, 'iat': iat_time, 'auth_time': auth_time, } if nonce: - dic['nonce'] = nonce + dic['nonce'] = str(nonce) return dic @@ -56,7 +56,7 @@ def encode_id_token(payload): _jws = JWS(payload, alg='RS256') _jwt = _jws.sign_compact(keys) - return _jwt + return _jwt.decode('utf-8') def create_token(user, client, id_token_dic, scope):