Skip to content

Commit

Permalink
update DEX_TOKEN to be the pachyderm ID_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Yang committed Jan 16, 2024
1 parent e9d2774 commit 37e2125
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jupyter-extension/jupyterlab_pachyderm/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
PACH_CONFIG = os.environ.get("PACH_CONFIG", Path.home() / ".pachyderm/config.json")
PFS_MOUNT_DIR = os.environ.get("PFS_MOUNT_DIR", "/pfs")
PACHD_ADDRESS = os.environ.get("PACHD_ADDRESS", None)
DEX_TOKEN = os.environ.get("DEX_TOKEN", None)
DEX_TOKEN = os.environ.get("DEX_TOKEN", None) # If specified, this is the ID_TOKEN used in auth

PACHYDERM_EXT_DEBUG = strtobool(os.environ.get("PACHYDERM_EXT_DEBUG", "False").lower())
if PACHYDERM_EXT_DEBUG:
Expand Down
4 changes: 3 additions & 1 deletion jupyter-extension/jupyterlab_pachyderm/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ def setup_handlers(web_app):
)
except FileNotFoundError:
if PACHD_ADDRESS:
client = Client().from_pachd_address(pachd_address=PACHD_ADDRESS, auth_token=DEX_TOKEN)
client = Client().from_pachd_address(pachd_address=PACHD_ADDRESS)
if DEX_TOKEN:
client.auth_token = client.auth.authenticate(id_token=DEX_TOKEN).pach_token
else:
client = Client()
get_logger().debug(
Expand Down

0 comments on commit 37e2125

Please sign in to comment.