python3: encoding variations in idp_oidc testing
This commit is contained in:
parent
d781f02fc4
commit
358973c231
|
@ -1064,7 +1064,8 @@ def test_claim_default_value(oidc_settings, normal_oidc_client, simple_user, app
|
|||
access_token = response.json['access_token']
|
||||
id_token = response.json['id_token']
|
||||
|
||||
key = JWK(kty='oct', k=base64.b64encode(oidc_client.client_secret.encode('utf-8')))
|
||||
k=base64.b64encode(oidc_client.client_secret.encode('utf-8'))
|
||||
key = JWK(kty='oct', k=force_text(k))
|
||||
jwt = JWT(jwt=id_token, key=key)
|
||||
claims = json.loads(jwt.claims)
|
||||
|
||||
|
@ -1179,7 +1180,8 @@ def test_credentials_grant(app, oidc_client, admin, simple_user):
|
|||
oidc_client.save()
|
||||
token_url = make_url('oidc-token')
|
||||
if oidc_client.idtoken_algo == OIDCClient.ALGO_HMAC:
|
||||
jwk = JWK(kty='oct', k=base64url(oidc_client.client_secret.encode('utf-8')))
|
||||
k=base64url(oidc_client.client_secret.encode('utf-8'))
|
||||
jwk = JWK(kty='oct', k=force_text(k))
|
||||
elif oidc_client.idtoken_algo == OIDCClient.ALGO_RSA:
|
||||
jwk = get_first_rsa_sig_key()
|
||||
|
||||
|
|
Loading…
Reference in New Issue