Skip to content

Commit 7655d9c

Browse files
committed
feat: added test for typ in JWS header
1 parent 2327b46 commit 7655d9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_06_jws.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,14 @@ def P256():
308308
def test_1():
309309
claimset = {"iss": "joe", "exp": 1300819380, "http://example.com/is_root": True}
310310

311-
_jws = JWS(claimset, cty="JWT", alg="none")
311+
_jws = JWS(claimset, cty="JWT", alg="none", typ="JWT")
312312
_jwt = _jws.sign_compact()
313313

314314
_jr = JWS()
315315
_msg = _jr.verify_compact(_jwt, allow_none=True)
316316
print(_jr)
317317
assert _jr.jwt.headers["alg"] == "none"
318+
assert _jr.jwt.headers["typ"] == "JWT"
318319
assert _msg == claimset
319320

320321

0 commit comments

Comments
 (0)