mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 21:13:01 +00:00
jupyterhub-singleuser as a Jupyter Server 2.0 extension
mostly a copy (fork) of singleuser app using public APIs instead of lots of patching. opt-in via `JUPYTERHUB_SINGLEUSER_EXTENSION=1` related changes: - stop running a test single-user server in a thread. It's complicated and fragile. Instead, run it normally, and get the info we need from a custom handler registered via an extension via the `full_spawn` fixture
This commit is contained in:
@@ -243,7 +243,6 @@ class HubAuth(SingletonConfigurable):
|
||||
return 'http://127.0.0.1:8081' + url_path_join(self.hub_prefix, 'api')
|
||||
|
||||
api_token = Unicode(
|
||||
os.getenv('JUPYTERHUB_API_TOKEN', ''),
|
||||
help="""API key for accessing Hub API.
|
||||
|
||||
Default: $JUPYTERHUB_API_TOKEN
|
||||
@@ -253,6 +252,10 @@ class HubAuth(SingletonConfigurable):
|
||||
""",
|
||||
).tag(config=True)
|
||||
|
||||
@default("api_token")
|
||||
def _default_api_token(self):
|
||||
return os.getenv('JUPYTERHUB_API_TOKEN', '')
|
||||
|
||||
hub_prefix = Unicode(
|
||||
'/hub/',
|
||||
help="""The URL prefix for the Hub itself.
|
||||
|
Reference in New Issue
Block a user