MCPcopy
hub / github.com/authlib/authlib / test_validate_nonce

Function test_validate_nonce

tests/core/test_oidc/test_core.py:35–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34
35def test_validate_nonce():
36 claims = CodeIDToken(
37 {"iss": "1", "sub": "1", "aud": "1", "exp": 10000, "iat": 100}, {}
38 )
39 claims.params = {"nonce": "foo"}
40 with pytest.raises(MissingClaimError):
41 claims.validate(1000)
42 claims["nonce"] = "bar"
43 with pytest.raises(InvalidClaimError):
44 claims.validate(1000)
45 claims["nonce"] = "foo"
46 claims.validate(1000)
47
48
49def test_validate_amr():

Callers

nothing calls this directly

Calls 2

CodeIDTokenClass · 0.90
validateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…