Skip to content

Commit 6ad4e49

Browse files
committed
fix(auth): No basic auth when Authorization header is passed
1 parent 45c4576 commit 6ad4e49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ibm_cloud_sdk_core/base_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def request(self, method, url, accept_json=False, headers=None,
368368
if self.token_manager:
369369
access_token = self.token_manager.get_token()
370370
headers['Authorization'] = '{0} {1}'.format(self.BEARER, access_token)
371-
if self.username and self.password:
371+
elif self.username and self.password:
372372
auth = (self.username, self.password)
373373

374374
# Use a one minute timeout when our caller doesn't give a timeout.

0 commit comments

Comments
 (0)