How to use the oauthenticator.github.LocalGitHubOAuthenticator function in oauthenticator

To help you get started, we’ve selected a few oauthenticator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mcrowson / minecraft_jupyterhub / jupyterhub / jupyterhub_config.py View on Github external
from oauthenticator.github import LocalGitHubOAuthenticator
import os

c.JupyterHub.authenticator_class = LocalGitHubOAuthenticator
c.LocalGitHubOAuthenticator.create_system_users = True
c.JupyterHub.admin_access = True
c.Spawner.cmd = ['jupyter-labhub']
c.Authenticator.whitelist = set(os.environ.get('JUPYTERHUB_ADMIN', '').split(','))
c.Authenticator.admin_users = set(os.environ.get('JUPYTERHUB_ADMIN', '').split(','))
github jupyterhub / oauthenticator / examples / full / jupyterhub_config.py View on Github external
# Configuration file for Jupyter Hub

c = get_config()

c.JupyterHub.log_level = 10
from oauthenticator.github import LocalGitHubOAuthenticator
c.JupyterHub.authenticator_class = LocalGitHubOAuthenticator

c.LocalGitHubOAuthenticator.create_system_users = True

c.Authenticator.whitelist = whitelist = set()
c.JupyterHub.admin_users = admin = set()

import os
import sys

join = os.path.join

here = os.path.dirname(__file__)
root = os.environ.get('OAUTHENTICATOR_DIR', here)
sys.path.insert(0, root)

with open(join(root, 'userlist')) as f: