MCPcopy
hub / github.com/authlib/authlib / test_use_jwe

Function test_use_jwe

tests/jose/test_jwt.py:208–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206
207
208def test_use_jwe():
209 payload = {"name": "hi"}
210 private_key = read_file_path("rsa_private.pem")
211 pub_key = read_file_path("rsa_public.pem")
212 _jwt = JsonWebToken(["RSA-OAEP", "A256GCM"])
213 data = _jwt.encode({"alg": "RSA-OAEP", "enc": "A256GCM"}, payload, pub_key)
214 assert data.count(b".") == 4
215
216 claims = _jwt.decode(data, private_key)
217 assert claims["name"] == "hi"
218
219
220def test_use_jwks():

Callers

nothing calls this directly

Calls 4

encodeMethod · 0.95
decodeMethod · 0.95
read_file_pathFunction · 0.90
JsonWebTokenClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…