MCPcopy Index your code
hub / github.com/authlib/authlib / auth_flow

Method auth_flow

authlib/integrations/httpx_client/oauth2_client.py:36–47  ·  view source on GitHub ↗
(self, request: Request)

Source from the content-addressed store, hash-verified

34 requires_request_body = True
35
36 def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]:
37 try:
38 url, headers, body = self.prepare(
39 str(request.url), request.headers, request.content
40 )
41 headers["Content-Length"] = str(len(body))
42 yield build_request(
43 url=url, headers=headers, body=body, initial_request=request
44 )
45 except KeyError as error:
46 description = f"Unsupported token_type: {str(error)}"
47 raise UnsupportedTokenTypeError(description=description) from error
48
49
50class OAuth2ClientAuth(Auth, ClientAuth):

Callers

nothing calls this directly

Calls 3

build_requestFunction · 0.85
prepareMethod · 0.45

Tested by

no test coverage detected