MCPcopy Create free account
hub / github.com/authlib/authlib / test_validate_custom

Function test_validate_custom

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

Source from the content-addressed store, hash-verified

358
359
360def test_validate_custom():
361 id_token = jwt.encode({"alg": "HS256"}, {"custom": "foo"}, "k")
362 claims_options = {"custom": {"validate": lambda c, o: o == "bar"}}
363 claims = jwt.decode(id_token, "k", claims_options=claims_options)
364 with pytest.raises(errors.InvalidClaimError):
365 claims.validate()
366
367
368def test_use_jws():

Callers

nothing calls this directly

Calls 3

encodeMethod · 0.80
decodeMethod · 0.80
validateMethod · 0.45

Tested by

no test coverage detected