@@ -324,7 +324,11 @@ def serialize(scopes):
324324
325325class LinodeLoginClient :
326326 def __init__ (
327- self , client_id , client_secret , base_url = "https://login.linode.com"
327+ self ,
328+ client_id ,
329+ client_secret ,
330+ base_url = "https://login.linode.com" ,
331+ ca_path = None ,
328332 ):
329333 """
330334 Create a new LinodeLoginClient. These clients do not make any requests
@@ -339,10 +343,13 @@ def __init__(
339343 :param base_url: The URL for Linode's OAuth server. This should not be
340344 changed.
341345 :type base_url: str
346+ :param ca_path: The path to the CA file to use for requests run by this client.
347+ :type ca_path: str
342348 """
343349 self .base_url = base_url
344350 self .client_id = client_id
345351 self .client_secret = client_secret
352+ self .ca_path = ca_path
346353
347354 def _login_uri (self , path ):
348355 return "{}{}" .format (self .base_url , path )
@@ -423,6 +430,7 @@ def oauth_redirect():
423430 "client_id" : self .client_id ,
424431 "client_secret" : self .client_secret ,
425432 },
433+ verify = self .ca_path or True ,
426434 )
427435
428436 if r .status_code != 200 :
@@ -467,6 +475,7 @@ def refresh_oauth_token(self, refresh_token):
467475 "client_secret" : self .client_secret ,
468476 "refresh_token" : refresh_token ,
469477 },
478+ verify = self .ca_path or True ,
470479 )
471480
472481 if r .status_code != 200 :
@@ -501,6 +510,7 @@ def expire_token(self, token):
501510 "client_secret" : self .client_secret ,
502511 "token" : token ,
503512 },
513+ verify = self .ca_path or True ,
504514 )
505515
506516 if r .status_code != 200 :
0 commit comments