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

Class OAuth1Client

authlib/integrations/httpx_client/oauth1_client.py:102–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101
102class OAuth1Client(_OAuth1Client, httpx2.Client):
103 auth_class = OAuth1Auth
104
105 def __init__(
106 self,
107 client_id,
108 client_secret=None,
109 token=None,
110 token_secret=None,
111 redirect_uri=None,
112 rsa_key=None,
113 verifier=None,
114 signature_method=SIGNATURE_HMAC_SHA1,
115 signature_type=SIGNATURE_TYPE_HEADER,
116 force_include_body=False,
117 **kwargs,
118 ):
119 _client_kwargs = extract_client_kwargs(kwargs)
120 httpx2.Client.__init__(self, **_client_kwargs)
121
122 _OAuth1Client.__init__(
123 self,
124 self,
125 client_id=client_id,
126 client_secret=client_secret,
127 token=token,
128 token_secret=token_secret,
129 redirect_uri=redirect_uri,
130 rsa_key=rsa_key,
131 verifier=verifier,
132 signature_method=signature_method,
133 signature_type=signature_type,
134 force_include_body=force_include_body,
135 **kwargs,
136 )
137
138 @staticmethod
139 def handle_error(error_type, error_description):
140 raise OAuthError(error_type, error_description)

Callers 7

test_fetch_access_tokenFunction · 0.90
test_get_via_headerFunction · 0.90
test_get_via_bodyFunction · 0.90
test_get_via_queryFunction · 0.90

Calls

no outgoing calls

Tested by 7

test_fetch_access_tokenFunction · 0.72
test_get_via_headerFunction · 0.72
test_get_via_bodyFunction · 0.72
test_get_via_queryFunction · 0.72