@@ -60,7 +60,7 @@ def __init__(self, credential, endpoint, custom_key_values={}):
6060
6161 self .requests_kwargs .update ({"params" : self .params })
6262 self .pagination = Pagination ()
63- next_page_url_key = endpoint .get ("next_page_url_key" , "" ). split ( '.' )
63+ next_page_url_key = endpoint .get ("next_page_url_key" , "" )
6464 top_key = endpoint .get ("top_key" )
6565 skip_key = endpoint .get ("skip_key" )
6666 pagination_type = endpoint .get ("pagination_type" , "na" )
@@ -92,10 +92,16 @@ def __init__(self, credential, endpoint, custom_key_values={}):
9292 def set_login (self , credential ):
9393 login_type = credential .get ("login_type" , "no_auth" )
9494 if login_type == "basic_login" :
95- self .username = credential .get ("username" , "" )
96- self .password = credential .get ("password" , "" )
97- self .auth = (self .username , self .password )
98- self .requests_kwargs .update ({"auth" : self .auth })
95+ username = credential .get ("username" , "" )
96+ password = credential .get ("password" , "" )
97+ auth = (username , password )
98+ self .requests_kwargs .update ({"auth" : auth })
99+ if login_type == "ntlm" :
100+ from requests_ntlm import HttpNtlmAuth
101+ username = credential .get ("username" , "" )
102+ password = credential .get ("password" , "" )
103+ auth = HttpNtlmAuth (username , password )
104+ self .requests_kwargs .update ({"auth" : auth })
99105 if login_type == "bearer_token" :
100106 token = credential .get ("token" , "" )
101107 bearer_template = credential .get ("bearer_template" , "Bearer {{token}}" )
0 commit comments