From 4915ea4f30e49125d8f7d7a459744340435c78c7 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Wed, 17 Jan 2024 15:55:42 +0100 Subject: [PATCH] set api_token --- jupyter/base/values/values.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jupyter/base/values/values.yaml b/jupyter/base/values/values.yaml index 48f2afe..fe87f2c 100644 --- a/jupyter/base/values/values.yaml +++ b/jupyter/base/values/values.yaml @@ -168,12 +168,13 @@ hub: from tornado.ioloop import IOLoop from tornado.log import app_log from tornado.web import Application, RequestHandler, authenticated - from jupyterhub.services.auth import HubOAuthenticated + from jupyterhub.services.auth import HubAuthenticated - class RefreshHandler(HubOAuthenticated, RequestHandler): + class RefreshHandler(HubAuthenticated, RequestHandler): def initialize(self): - self.hub_auth = self.get_current_user() + self.api_token = os.environ.get('JUPYTERHUB_API_TOKEN', 'THIS IS A DUMMY THING') + app_log.info(f"DEBUG: In refresh initialize {self.api_token}") @authenticated def get(self): # app_log.info(f"DEBUG: In refresh get {os.environ}")