Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 4114123

Browse files
committedMar 16, 2020
fixed test
1 parent 4b34970 commit 4114123

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎tests/test_06_oidc.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import pytest
1010
from cryptojwt.exception import BadSignature
11+
from cryptojwt.exception import UnsupportedAlgorithm
1112
from cryptojwt.jws.exception import SignerAlgError
1213
from cryptojwt.jws.utils import left_hash
1314
from cryptojwt.jwt import JWT
@@ -1422,10 +1423,11 @@ def test_wrong_sign_alg():
14221423
packer = JWT(kj, sign_alg='HS256', lifetime=3600, iss='https://example.com/op')
14231424
_jws = packer.pack(payload=idt.to_dict())
14241425
msg = AuthorizationResponse(id_token=_jws)
1425-
assert verify_id_token(msg, check_hash=True, keyjar=kj,
1426+
with pytest.raises(UnsupportedAlgorithm):
1427+
verify_id_token(msg, check_hash=True, keyjar=kj,
14261428
iss="https://example.com/op",
14271429
client_id="554295ce3770612820620000",
1428-
allowed_sign_alg="RS256") is False
1430+
allowed_sign_alg="RS256")
14291431

14301432

14311433
def test_correct_sign_alg():

0 commit comments

Comments
 (0)