code styling

This commit is contained in:
Oscar Krause 2025-03-20 21:53:51 +01:00
parent 5480a42886
commit e34241fac9

View File

@ -309,8 +309,6 @@ def test_our_config_token_with_our_key():
.sign(my_private_key, hashes.SHA256()) .sign(my_private_key, hashes.SHA256())
) )
my_jwt_decode_key = jwk.construct(my_certificate.public_bytes(encoding=Encoding.PEM), algorithm=ALGORITHMS.RS256)
### build payload ### build payload
cur_time = datetime.now(UTC) cur_time = datetime.now(UTC)
@ -352,9 +350,11 @@ def test_our_config_token_with_our_key():
### ###
my_jws_sign_key = jwk.construct(my_certificate.public_bytes(encoding=Encoding.PEM), algorithm=ALGORITHMS.RS256)
my_response_config_token = response.get('configToken') my_response_config_token = response.get('configToken')
payload = jws.verify(my_response_config_token, key=my_jwt_decode_key, algorithms=ALGORITHMS.RS256) payload = jws.verify(my_response_config_token, key=my_jws_sign_key, algorithms=ALGORITHMS.RS256)
payload = json.loads(payload) payload = json.loads(payload)
assert payload.get('iss') == 'NLS Service Instance' assert payload.get('iss') == 'NLS Service Instance'
assert payload.get('aud') == 'NLS Licensed Client' assert payload.get('aud') == 'NLS Licensed Client'