Skip to content

Commit

Permalink
log user from service token
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech committed Jan 7, 2024
1 parent a0817ba commit 5f0a514
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jhub_apps/service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,20 @@ async def conda_environments(user: User = Depends(get_current_user)):
logging.info(f"Getting conda environments for user: {user}")
config = get_jupyterhub_config()
conda_envs = get_conda_envs(config)
hclient = HubClient()
logger.info("#"*100)
logger.info(f"USER FROM HUB CLIENT: {hclient.get_user(user.name)}")
logger.info("#"*100)
logger.info(f"Found conda environments: {conda_envs}")
return conda_envs


@router.get("/spawner-profiles/", description="Get all spawner profiles")
async def spawner_profiles(user: User = Depends(get_current_user)):
hclient = HubClient()
logger.info("*"*100)
logger.info(f"USER FROM HUB CLIENT: {hclient.get_user(user.name)}")
logger.info("*"*100)
logging.info(f"Getting spawner profiles for user: {user}")
config = get_jupyterhub_config()
spawner_profiles_ = await get_spawner_profiles(config)
Expand Down

0 comments on commit 5f0a514

Please sign in to comment.