Projet

Général

Profil

0001-python3-oidc-authn-backend-jwk-encoding.patch

Paul Marillonnet, 25 avril 2019 16:17

Télécharger (1,17 ko)

Voir les différences:

Subject: [PATCH 1/2] python3: oidc authn backend jwk encoding

 src/authentic2_auth_oidc/backends.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/authentic2_auth_oidc/backends.py
47 47
                key = list(key['keys'])[0]
48 48
            algs = ['RS256', 'RS384', 'RS512']
49 49
        elif provider.idtoken_algo == models.OIDCProvider.ALGO_HMAC:
50
            key = JWK(kty='oct', k=base64url_encode(provider.client_secret.encode('utf-8')))
50
            k = base64url_encode(provider.client_secret.encode('utf-8'))
51
            key = JWK(kty='oct', k=k.decode('ascii'))
51 52
            if not provider.client_secret:
52 53
                logger.warning('auth_oidc: idtoken signature algorithm is HMAC but '
53 54
                               'no client_secret is defined on provider %s', id_token.iss)
54
-