MCPcopy
hub / github.com/authlib/authlib / __call__

Method __call__

authlib/integrations/requests_client/oauth2_session.py:24–33  ·  view source on GitHub ↗
(self, req)

Source from the content-addressed store, hash-verified

22 raise InvalidTokenError()
23
24 def __call__(self, req):
25 self.ensure_active_token()
26 try:
27 req.url, req.headers, req.body = self.prepare(
28 req.url, req.headers, req.body
29 )
30 except KeyError as error:
31 description = f"Unsupported token_type: {str(error)}"
32 raise UnsupportedTokenTypeError(description=description) from error
33 return req
34
35
36class OAuth2ClientAuth(AuthBase, ClientAuth):

Callers

nothing calls this directly

Calls 3

ensure_active_tokenMethod · 0.95
prepareMethod · 0.45

Tested by

no test coverage detected