Skip to content

Commit

Permalink
Update auth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Jan 16, 2025
1 parent 8bb7afb commit 56de2bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/authx/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,11 @@ def remove_user_from_opa(user_name):

def add_pending_user_to_opa(user_token):
# NB: any user that has been authenticated by the IDP should be able to add themselves to the pending user list
logger.debug("hello")
response, status_code = get_service_store_secret("opa", key=f"pending_users")
if status_code != 200:
return response, status_code

logger.debug("hi again")
user_name = get_user_id(None, token=user_token)
if user_name is None:
return {"error": "Could not verify jwt or obtain user ID"}, 403
Expand Down

0 comments on commit 56de2bd

Please sign in to comment.