From 2b20a0b766f2297acca1a870d4848a48a2385797 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Tue, 3 Jul 2018 11:54:42 -0700 Subject: [PATCH] Make firstuseauthenticator the default Fixes #14 --- tljh/configurer.py | 4 +++- tljh/installer.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tljh/configurer.py b/tljh/configurer.py index 954f185..9e8580c 100644 --- a/tljh/configurer.py +++ b/tljh/configurer.py @@ -15,7 +15,7 @@ import yaml # User provided config is merged into this default = { 'auth': { - 'type': 'dummy', + 'type': 'firstuse', 'dummy': {} }, 'users': { @@ -60,6 +60,8 @@ def update_auth(c, config): if password is not None: c.DummyAuthenticator.password = password return + elif auth['type'] == 'firstuse': + c.JupyterHub.authenticator_class = 'firstuseauthenticator.FirstUseAuthenticator' def update_userlists(c, config): diff --git a/tljh/installer.py b/tljh/installer.py index e957b60..da0db7d 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -62,6 +62,7 @@ def ensure_jupyterhub_package(prefix): conda.ensure_pip_packages(prefix, [ 'jupyterhub-dummyauthenticator==0.3.1', 'jupyterhub-systemdspawner==0.9.12', + 'jupyterhub-firstuseauthenticator==0.9' ])