Skip to content

Improved employee auth to work better on dev servers #2220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#2219 fixed test errors
  • Loading branch information
allmightyspiff committed Apr 24, 2025
commit 6ea81c6af2f396f32bd1e5819d04aa0d308c621b
1 change: 0 additions & 1 deletion SoftLayer/CLI/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import click

from SoftLayer.API import employee_client
from SoftLayer.CLI.command import SLCommand as SLCommand
from SoftLayer.CLI import environment
from SoftLayer import config
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_request(self, request):
return request

def __repr__(self):
return f"BasicAuthentication(username={self.username})"
return f"BasicAuthentication(username={self.username})"


class BasicHTTPAuthentication(AuthenticationBase):
Expand Down
5 changes: 4 additions & 1 deletion SoftLayer/transports/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def __init__(self):
#: API Parameters.
self.args = tuple()

#: URL Parameters, used for the REST Transport
self.params = None

#: API headers, used for authentication, masks, limits, offsets, etc.
self.headers = {}

Expand Down Expand Up @@ -117,7 +120,7 @@ def special_rest_params(self):
Added this method here since it was a little easier to change the data as needed this way.
"""
if len(self.args) == 0 or self.params:
return None
return
if self.method == "getEncryptedSessionToken" and self.service == "SoftLayer_User_Employee":
self.params = {"remoteToken": self.args[0]}
self.args = []
Expand Down