We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2462a4b commit 6ffa587Copy full SHA for 6ffa587
tests/test_06_jws.py
@@ -783,3 +783,14 @@ def test_extra_headers_2():
783
sjwt = _jws.sign_compact(keys)
784
_jwt = factory(sjwt)
785
assert set(_jwt.jwt.headers.keys()) == {'alg', 'foo'}
786
+
787
788
+def test_extra_headers_3():
789
+ pkey = import_private_rsa_key_from_file(full_path("./size2048.key"))
790
+ payload = "Please take a moment to register today"
791
+ keys = [RSAKey(priv_key=pkey)]
792
+ _jws = JWS(payload, alg='RS256')
793
+ _jws.set_header_claim('foo', 'bar')
794
+ sjwt = _jws.sign_compact(keys, abc=123)
795
+ _jwt = factory(sjwt)
796
+ assert set(_jwt.jwt.headers.keys()) == {'alg', 'foo', 'abc'}
0 commit comments