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

Method auth_flow

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

build_requestFunction · 0.85
prepareMethod · 0.45

Tested by

no test coverage detected