set api_token

This commit is contained in:
Micke Nordin 2024-01-17 15:55:42 +01:00
parent cd4f60b564
commit 4915ea4f30
Signed by untrusted user: Micke
GPG key ID: F53C4CC83EDAB3BE

View file

@ -168,12 +168,13 @@ hub:
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
from tornado.log import app_log from tornado.log import app_log
from tornado.web import Application, RequestHandler, authenticated 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): 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 @authenticated
def get(self): def get(self):
# app_log.info(f"DEBUG: In refresh get {os.environ}") # app_log.info(f"DEBUG: In refresh get {os.environ}")