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

Function test_code_challenge

tests/clients/test_httpx/test_async_oauth2_client.py:125–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123
124
125def test_code_challenge():
126 sess = AsyncOAuth2Client("foo", code_challenge_method="S256")
127
128 url = "https://provider.test/authorize"
129 auth_url, _ = sess.create_authorization_url(url, code_verifier=generate_token(48))
130 assert "code_challenge=" in auth_url
131 assert "code_challenge_method=S256" in auth_url
132
133
134def test_token_from_fragment():

Callers

nothing calls this directly

Calls 3

AsyncOAuth2ClientClass · 0.90
generate_tokenFunction · 0.90

Tested by

no test coverage detected