https://github.com/zonca/cilogonauthenticator
https://github.com/zonca/cilogonauthenticator
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zonca/cilogonauthenticator
- Owner: zonca
- License: bsd-3-clause
- Created: 2015-06-17T06:13:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-17T06:16:36.000Z (almost 10 years ago)
- Last Synced: 2025-01-13T10:30:51.880Z (5 months ago)
- Language: Python
- Size: 145 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# OAuthenticator
GitHub OAuth + JuptyerHub Authenticator = OAuthenticator
## Examples
For an example docker image using OAuthenticator, see the [example](example)
directory.There is [another
example](https://github.com/jupyter/dockerspawner/tree/master/examples/oauth)
for using GitHub OAuth to spawn each user's server in a separate docker
container.## Installation
First, install dependencies:
pip install -r requirements.txt
Then, install the package:
python setup.py install
## Setup
First, you'll need to create a [GitHub OAuth
application](https://github.com/settings/applications/new). Make sure the
callback URL is:http[s]://[your-host]/hub/oauth_callback
Where `[your-host]` is where your server will be running. Such as
`example.com:8000`.Then, add the following to your `jupyterhub_config.py` file:
c.JupyterHub.authenticator_class = 'oauthenticator.GitHubOAuthenticator'
(you can also use `LocalGitHubOAuthenticator` to handle both local and GitHub
auth).You will additionally need to specify the OAuth callback URL, the client ID, and
the client secret (you should have gotten these when you created your OAuth app
on GitHub). For example, if these values are in the environment variables
`$OAUTH_CALLBACK_URL`, `$GITHUB_CLIENT_ID` and `$GITHUB_CLIENT_SECRET`, you
should add the following to your `jupyterhub_config.py`:c.GitHubOAuthenticator.oauth_callback_url = os.environ['OAUTH_CALLBACK_URL']
c.GitHubOAuthenticator.github_client_id = os.environ['GITHUB_CLIENT_ID']
c.GitHubOAuthenticator.github_client_secret = os.environ['GITHUB_CLIENT_SECRET']