MCPcopy
hub / github.com/authlib/authlib / __init__

Method __init__

authlib/integrations/httpx_client/oauth2_client.py:218–253  ·  view source on GitHub ↗
(
        self,
        client_id=None,
        client_secret=None,
        token_endpoint_auth_method=None,
        revocation_endpoint_auth_method=None,
        scope=None,
        redirect_uri=None,
        token=None,
        token_placement="header",
        update_token=None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

216 oauth_error_class = OAuthError
217
218 def __init__(
219 self,
220 client_id=None,
221 client_secret=None,
222 token_endpoint_auth_method=None,
223 revocation_endpoint_auth_method=None,
224 scope=None,
225 redirect_uri=None,
226 token=None,
227 token_placement="header",
228 update_token=None,
229 **kwargs,
230 ):
231 # extract httpx.Client kwargs
232 client_kwargs = self._extract_session_request_params(kwargs)
233 # app keyword was dropped!
234 app_value = client_kwargs.pop("app", None)
235 if app_value is not None:
236 client_kwargs["transport"] = httpx.WSGITransport(app=app_value)
237
238 httpx.Client.__init__(self, **client_kwargs)
239
240 _OAuth2Client.__init__(
241 self,
242 session=self,
243 client_id=client_id,
244 client_secret=client_secret,
245 token_endpoint_auth_method=token_endpoint_auth_method,
246 revocation_endpoint_auth_method=revocation_endpoint_auth_method,
247 scope=scope,
248 redirect_uri=redirect_uri,
249 token=token,
250 token_placement=token_placement,
251 update_token=update_token,
252 **kwargs,
253 )
254
255 @staticmethod
256 def handle_error(error_type, error_description):

Callers 1

__init__Method · 0.45

Calls 1

Tested by

no test coverage detected