Browse Source

[FIX] FIxes tracback python 3+

pull/3/head
Nicolas JEUDY 4 years ago
parent
commit
d23c8a6232
  1. 3
      galicea_openid_connect/controllers/main.py

3
galicea_openid_connect/controllers/main.py

@ -240,7 +240,8 @@ class Main(http.Controller):
digest = hashes.Hash(hashes.SHA256(), backend=default_backend()) digest = hashes.Hash(hashes.SHA256(), backend=default_backend())
digest.update(access_token.encode('ascii')) digest.update(access_token.encode('ascii'))
at_hash = digest.finalize() at_hash = digest.finalize()
extra_claims['at_hash'] = base64.urlsafe_b64encode(at_hash[:16]).strip('=')
#extra_claims['at_hash'] = base64.urlsafe_b64encode(at_hash[:16]).strip('=')
extra_claims['at_hash'] = base64.urlsafe_b64encode(at_hash[:16])
if 'id_token' in response_types: if 'id_token' in response_types:
response_params['id_token'] = self.__create_id_token(req, user.id, client, extra_claims) response_params['id_token'] = self.__create_id_token(req, user.id, client, extra_claims)

Loading…
Cancel
Save