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

Function test_validate_auth_time

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

Source from the content-addressed store, hash-verified

23
24
25def test_validate_auth_time():
26 claims = CodeIDToken(
27 {"iss": "1", "sub": "1", "aud": "1", "exp": 10000, "iat": 100}, {}
28 )
29 claims.params = {"max_age": 100}
30 with pytest.raises(MissingClaimError):
31 claims.validate(1000)
32
33 claims["auth_time"] = "foo"
34 with pytest.raises(InvalidClaimError):
35 claims.validate(1000)
36
37
38def test_validate_nonce():

Callers

nothing calls this directly

Calls 2

CodeIDTokenClass · 0.90
validateMethod · 0.45

Tested by

no test coverage detected