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

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
rohe committed Mar 16, 2020
1 parent 4b34970 commit 4114123
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_06_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import pytest
from cryptojwt.exception import BadSignature
from cryptojwt.exception import UnsupportedAlgorithm
from cryptojwt.jws.exception import SignerAlgError
from cryptojwt.jws.utils import left_hash
from cryptojwt.jwt import JWT
Expand Down Expand Up @@ -1422,10 +1423,11 @@ def test_wrong_sign_alg():
packer = JWT(kj, sign_alg='HS256', lifetime=3600, iss='https://example.com/op')
_jws = packer.pack(payload=idt.to_dict())
msg = AuthorizationResponse(id_token=_jws)
assert verify_id_token(msg, check_hash=True, keyjar=kj,
with pytest.raises(UnsupportedAlgorithm):
verify_id_token(msg, check_hash=True, keyjar=kj,
iss="https://example.com/op",
client_id="554295ce3770612820620000",
allowed_sign_alg="RS256") is False
allowed_sign_alg="RS256")


def test_correct_sign_alg():
Expand Down

0 comments on commit 4114123

Please sign in to comment.