Skip to content

Commit 899de75

Browse files
#2219 fixed an issue with how xmlrpc logs in employees
1 parent 6ea81c6 commit 899de75

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

SoftLayer/API.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ def authenticate_with_internal(self, username, password, security_token=None):
711711
if len(security_token) != 6:
712712
raise exceptions.SoftLayerAPIError("Invalid security token: {}".format(security_token))
713713

714-
self.auth = slauth.BasicHTTPAuthentication(username, password)
715-
auth_result = self.call('SoftLayer_User_Employee', 'getEncryptedSessionToken', security_token)
714+
auth_result = self.call('SoftLayer_User_Employee', 'getEncryptedSessionToken',
715+
username, password, security_token)
716716

717717
self.settings['softlayer']['access_token'] = auth_result['hash']
718718
self.settings['softlayer']['userid'] = str(auth_result['userId'])

SoftLayer/transports/transport.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,12 @@ def special_rest_params(self):
119119
120120
Added this method here since it was a little easier to change the data as needed this way.
121121
"""
122-
if len(self.args) == 0 or self.params:
123-
return
124122
if self.method == "getEncryptedSessionToken" and self.service == "SoftLayer_User_Employee":
125-
self.params = {"remoteToken": self.args[0]}
123+
if len(self.args) < 3:
124+
return
125+
self.params = {"remoteToken": self.args[2]}
126+
self.transport_user = self.args[0]
127+
self.transport_password = self.args[1]
126128
self.args = []
127129

128130

0 commit comments

Comments
 (0)