Skip to content

Commit

Permalink
On login, log idp and username
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-ide committed Jun 6, 2024
1 parent 7a68caa commit 8b3d42c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions webapp/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ def login():
# log_info(f"cname: {cname}")
if auth_token is not None and cname is not None:
pasta_token = PastaToken(auth_token)
decoded_bytes = base64.b64decode(auth_token)
decoded_str = decoded_bytes.decode("utf-8")
try:
username = decoded_str.split("-")[0].split('*')[0]
except:
username = ''
username = ''
# decoded_bytes = base64.b64decode(auth_token)
# decoded_str = decoded_bytes.decode("utf-8")
# try:
# username = decoded_str.split("-")[0].split('*')[0]
# except:
# username = ''
uid = pasta_token.uid
log_info(f"uid: {uid}")
session_id = cname + "*" + uid
Expand Down

0 comments on commit 8b3d42c

Please sign in to comment.