@@ -132,14 +132,14 @@ def __init__(
132132 raise ValueError (
133133 "verify, proxies, or timeout is not allowed "
134134 "when http_client is in use" )
135- self .http_client = http_client
135+ self ._http_client = http_client
136136 else :
137- self .http_client = requests .Session ()
138- self .http_client .verify = True if verify is None else verify
139- self .http_client .proxies = proxies
140- self .http_client .request = functools .partial (
137+ self ._http_client = requests .Session ()
138+ self ._http_client .verify = True if verify is None else verify
139+ self ._http_client .proxies = proxies
140+ self ._http_client .request = functools .partial (
141141 # A workaround for requests not supporting session-wide timeout
142- self .http_client .request , timeout = timeout )
142+ self ._http_client .request , timeout = timeout )
143143
144144 def _build_auth_request_params (self , response_type , ** kwargs ):
145145 # response_type is a string defined in
@@ -200,7 +200,7 @@ def _obtain_token( # The verb "obtain" is influenced by OAUTH2 RFC 6749
200200
201201 if "token_endpoint" not in self .configuration :
202202 raise ValueError ("token_endpoint not found in configuration" )
203- resp = (post or self .http_client .post )(
203+ resp = (post or self ._http_client .post )(
204204 self .configuration ["token_endpoint" ],
205205 headers = _headers , params = params , data = _data ,
206206 ** kwargs )
@@ -269,7 +269,7 @@ def initiate_device_flow(self, scope=None, **kwargs):
269269 DAE = "device_authorization_endpoint"
270270 if not self .configuration .get (DAE ):
271271 raise ValueError ("You need to provide device authorization endpoint" )
272- resp = self .http_client .post (self .configuration [DAE ],
272+ resp = self ._http_client .post (self .configuration [DAE ],
273273 data = {"client_id" : self .client_id , "scope" : self ._stringify (scope or [])},
274274 headers = dict (self .default_headers , ** kwargs .pop ("headers" , {})),
275275 ** kwargs )
0 commit comments