0001-python3-oidc-authn-backend-jwk-encoding.patch
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 |
- |