MCPcopy
hub / github.com/authlib/authlib / test_serialize_json_overwrite_header

Function test_serialize_json_overwrite_header

tests/jose/test_jws.py:200–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198
199
200def test_serialize_json_overwrite_header():
201 jws = JsonWebSignature()
202 protected = {"alg": "HS256", "kid": "a"}
203 header = {"protected": protected}
204 result = jws.serialize_json(header, b"", "secret")
205 result["header"] = {"kid": "b"}
206 decoded = jws.deserialize_json(result, "secret")
207 assert decoded["header"]["kid"] == "a"
208
209
210def test_validate_header():

Callers

nothing calls this directly

Calls 3

serialize_jsonMethod · 0.95
deserialize_jsonMethod · 0.95
JsonWebSignatureClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…