Authenticator for JupyterHub
that allows all user logins against a url that returns a response indicating
if the login should succeed. If the response from the URL POST includes the
same username
as in the data
coming to the authenticator.authenticate
method, the login should succeed.
Used yuvipanda's jupyterhub-dummy-authenticator as an example. Thanks for making that available.
After installation, you can then use the authenticator by adding the following
lines to your jupyterhub_config.py
(replacing square bracket items with your
values):
c.JupyterHub.authenticator_class = 'urlauthenticator.UrlAuthenticator'
c.UrlAuthenticator.server_address = 'http://[address]'
c.UrlAuthenticator.server_port = [port]
# This does no magic with slashes. If you require a trailing one and it's not
# provided, this will error now. Same with leading slash (NEEDED FOR NOW)
c.UrlAuthenticator.login_route = '[/path/to/login/service]'
pip install [-e] git+git://github.com/thecaffiend/jupyterhub-urlauthenticator.git
It has no additional dependencies beyond JupyterHub (tornado is installed by jupyterhub).
- get this on pypi
- make authenticator smarter about trailing/leading slashes in URL/routes
- add a way to specify header values (right now json only)
- Add error handling.
- tests
- better code/auto doc