nullauthenticator: relative imports, entrypoint, doc

This commit is contained in:
Simon Li
2021-09-23 20:28:47 +01:00
parent 2bb9f4f444
commit 2ade7328d1
2 changed files with 10 additions and 11 deletions

View File

@@ -1,16 +1,7 @@
"""Null Authenticator for JupyterHub
For cases where authentication should be disabled,
e.g. only allowing access via API tokens.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from jupyterhub.auth import Authenticator
from jupyterhub.handlers.base import BaseHandler
__version__ = '1.0.0.dev'
from .auth import Authenticator
from .handlers.base import BaseHandler
class NullLoginHandler(BaseHandler):
@@ -19,6 +10,13 @@ class NullLoginHandler(BaseHandler):
class NullAuthenticator(Authenticator):
"""Null Authenticator for JupyterHub
For cases where authentication should be disabled,
e.g. only allowing access via API tokens.
.. versionadded:: 2.0
"""
# auto_login skips 'Login with...' page on Hub 0.8
auto_login = True

View File

@@ -100,6 +100,7 @@ setup_args = dict(
'default = jupyterhub.auth:PAMAuthenticator',
'pam = jupyterhub.auth:PAMAuthenticator',
'dummy = jupyterhub.auth:DummyAuthenticator',
"null = jupyterhub.nullauthenticator:NullAuthenticator",
],
'jupyterhub.proxies': [
'default = jupyterhub.proxy:ConfigurableHTTPProxy',