Move boilerplate to the bottom

This commit is contained in:
YuviPanda
2023-09-06 09:41:24 -07:00
parent 53c5a5001b
commit 3865df7db0

View File

@@ -1,16 +1,5 @@
import os import os
# Allow anyone to authenticate
from jupyterhub.auth import DummyAuthenticator
c.JupyterHub.authenticator_class = DummyAuthenticator
# Optionally set a global password that all users must use
# c.DummyAuthenticator.password = "your_password"
# only listen on localhost for testing.
c.JupyterHub.bind_url = 'http://127.0.0.1:8000'
# get the oauth client's API token. # get the oauth client's API token.
# this could come from anywhere # this could come from anywhere
api_token = os.getenv("JUPYTERHUB_API_TOKEN") api_token = os.getenv("JUPYTERHUB_API_TOKEN")
@@ -38,3 +27,17 @@ c.JupyterHub.load_roles = [
} }
] ]
# Boilerplate to make sure the example runs - this is not relevant
# to external oauth services.
# Allow authentication with any username and any password
from jupyterhub.auth import DummyAuthenticator
c.JupyterHub.authenticator_class = DummyAuthenticator
# Optionally set a global password that all users must use
# c.DummyAuthenticator.password = "your_password"
# only listen on localhost for testing.
c.JupyterHub.bind_url = 'http://127.0.0.1:8000'