Skip to content
Snippets Groups Projects
Commit 99a76d8e authored by Robert Latta's avatar Robert Latta
Browse files

updated authorization header

parent e5a59df0
Branches
Tags
No related merge requests found
...@@ -115,7 +115,7 @@ class IMS(object): ...@@ -115,7 +115,7 @@ class IMS(object):
auth=(username, password)) auth=(username, password))
response.raise_for_status() response.raise_for_status()
cls.bearer_token_init_time = re_init_time cls.bearer_token_init_time = re_init_time
cls.bearer_token = response.json() cls.bearer_token = response.text
def _get_entity( def _get_entity(
self, self,
...@@ -159,7 +159,7 @@ class IMS(object): ...@@ -159,7 +159,7 @@ class IMS(object):
while True: while True:
response = requests.get( response = requests.get(
url, url,
headers={'Authorization': self.bearer_token}, headers={'Authorization': f'Bearer {self.bearer_token}'},
params=params) params=params)
if _is_invalid_login_state(response): if _is_invalid_login_state(response):
IMS._init_bearer_token(self.username, self.password) IMS._init_bearer_token(self.username, self.password)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment