Skip to content

Commit

Permalink
fixing username auth utils
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Nov 28, 2023
1 parent 4ae748b commit 99a2151
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions beacon/utils/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ async def resolve_token(token, requested_datasets_ids):
content_splitted= content.split(':')
authorized_datasets = content_splitted[-1]
authorized_datasets_list = authorized_datasets.split('"')
username_ = content_splitted[1]
username_list = username_.split('"')
username = username_list[1]
try:
username_ = content_splitted[1]
username_list = username_.split('"')
username = username_list[1]
except Exception:
username = ''
LOG.debug(username)
auth_datasets = []
for auth_dataset in authorized_datasets_list:
Expand Down

0 comments on commit 99a2151

Please sign in to comment.