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

Function test_code_challenge

tests/clients/test_requests/test_oauth2_session.py:135–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133
134
135def test_code_challenge():
136 sess = OAuth2Session(client_id="foo", code_challenge_method="S256")
137
138 url = "https://provider.test/authorize"
139 auth_url, _ = sess.create_authorization_url(url, code_verifier=generate_token(48))
140 assert "code_challenge" in auth_url
141 assert "code_challenge_method=S256" in auth_url
142
143
144def test_token_from_fragment(token):

Callers

nothing calls this directly

Calls 3

OAuth2SessionClass · 0.90
generate_tokenFunction · 0.90

Tested by

no test coverage detected