MCPcopy
hub / github.com/authlib/authlib / test_validate_at_hash

Function test_validate_at_hash

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

Source from the content-addressed store, hash-verified

86
87
88def test_validate_at_hash():
89 claims = CodeIDToken(
90 {
91 "iss": "1",
92 "sub": "1",
93 "aud": "1",
94 "exp": 10000,
95 "iat": 100,
96 "at_hash": "a",
97 },
98 {},
99 )
100 claims.params = {"access_token": "a"}
101
102 # invalid alg will raise too
103 claims.header = {"alg": "HS222"}
104 with pytest.raises(InvalidClaimError):
105 claims.validate(1000)
106
107 claims.header = {"alg": "HS256"}
108 with pytest.raises(InvalidClaimError):
109 claims.validate(1000)
110
111
112def test_implicit_id_token():

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…