<!--
Copyright © Idiap Research Institute <contact@idiap.ch>
SPDX-License-Identifier: BSD-3-Clause
-->
# JupyterHub OAuthenticator + LDAPAuthenticator ++... = MultiAuthenticator ❤️
The MultiAuthenticator is multiplexer authenticator class that allows to use
more than one authentication option with JupyterHub.
## Installation
```
$ pip install git+https://github.com/idiap/multiauthenticator
$ pip install jupyter-multiauthenticator
```
## Configuration
The MultiAuthenticator class only has one configuration point: authenticators.
This property shall contain a list of tuple with the following content:
- Authenticator class (i.e. GitLabAuthenticator, LDAPAuthenticator)
- The URL scope (i.e. /gitlab, /ldap)
- A dictionary with the authenticator's configuration
As an example:
```python
from jupyterhub.auth import PAMAuthenticator
class MyPamAutenticator(PAMAuthenticator):
login_service = "PAM"
c.MultiAuthenticator.authenticators = [
{
"authenticator_class": 'github',
"url_prefix": '/github',
"config": {
'client_id': 'XXXX',
'client_secret': 'YYYY',
'oauth_callback_url': 'https://jupyterhub.example.com/hub/github/oauth_callback'
}
},
{
"authenticator_class": 'google',
"url_prefix": '/google',
"config": {
'client_id': 'xxxx',
'client_secret': 'yyyy',
'oauth_callback_url': 'https://jupyterhub.example.com/hub/google/oauth_callback'
}
},
{
"authenticator_class": 'gitlab',
"url_prefix": '/gitlab',
"config": {
'client_id': 'ZZZZ',
'client_secret': 'AAAA',
'oauth_callback_url': 'https://jupyterhub.example.com/hub/gitlab/oauth_callback'
"gitlab_url": "https://gitlab.example.com"
}
},
{
"authenticator_class": MyPamAuthenticator,
"url_prefix": "/pam",
},
]
c.JupyterHub.authenticator_class = 'multiauthenticator'
```
Raw data
{
"_id": null,
"home_page": null,
"name": "jupyterhub-multiauthenticator",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "JupyterHub, Authenticator",
"author": null,
"author_email": "Samuel Gaist <samuel.gaist@idiap.ch>",
"download_url": "https://files.pythonhosted.org/packages/ac/d8/fff3e1bd023dee0a7a5bd2849bb577741d4349410c9a986e4b35fd0d3ca2/jupyterhub_multiauthenticator-0.4.0.tar.gz",
"platform": null,
"description": "<!--\nCopyright \u00a9 Idiap Research Institute <contact@idiap.ch>\n\nSPDX-License-Identifier: BSD-3-Clause\n-->\n\n# JupyterHub OAuthenticator + LDAPAuthenticator ++... = MultiAuthenticator \u2764\ufe0f\n\nThe MultiAuthenticator is multiplexer authenticator class that allows to use\nmore than one authentication option with JupyterHub.\n\n## Installation\n\n```\n$ pip install git+https://github.com/idiap/multiauthenticator\n$ pip install jupyter-multiauthenticator\n```\n\n## Configuration\n\nThe MultiAuthenticator class only has one configuration point: authenticators.\n\nThis property shall contain a list of tuple with the following content:\n\n- Authenticator class (i.e. GitLabAuthenticator, LDAPAuthenticator)\n- The URL scope (i.e. /gitlab, /ldap)\n- A dictionary with the authenticator's configuration\n\nAs an example:\n\n```python\nfrom jupyterhub.auth import PAMAuthenticator\n\nclass MyPamAutenticator(PAMAuthenticator):\n login_service = \"PAM\"\n\nc.MultiAuthenticator.authenticators = [\n {\n \"authenticator_class\": 'github',\n \"url_prefix\": '/github',\n \"config\": {\n 'client_id': 'XXXX',\n 'client_secret': 'YYYY',\n 'oauth_callback_url': 'https://jupyterhub.example.com/hub/github/oauth_callback'\n }\n },\n {\n \"authenticator_class\": 'google',\n \"url_prefix\": '/google',\n \"config\": {\n 'client_id': 'xxxx',\n 'client_secret': 'yyyy',\n 'oauth_callback_url': 'https://jupyterhub.example.com/hub/google/oauth_callback'\n }\n },\n {\n \"authenticator_class\": 'gitlab',\n \"url_prefix\": '/gitlab',\n \"config\": {\n 'client_id': 'ZZZZ',\n 'client_secret': 'AAAA',\n 'oauth_callback_url': 'https://jupyterhub.example.com/hub/gitlab/oauth_callback'\n \"gitlab_url\": \"https://gitlab.example.com\"\n }\n },\n {\n \"authenticator_class\": MyPamAuthenticator,\n \"url_prefix\": \"/pam\",\n },\n]\n\nc.JupyterHub.authenticator_class = 'multiauthenticator'\n```\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Authenticator multiplexer for JupyterHub",
"version": "0.4.0",
"project_urls": null,
"split_keywords": [
"jupyterhub",
" authenticator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d6406f001657520f99c37a1703fab95dcb3eee3b69da2672fdd830a6ec23937d",
"md5": "b8307d489db4af7a11b943af43ef3273",
"sha256": "363a94081bbaaf8035dd9a57c82f7da65ce8fa0d3dd1ce69886777b78fd04946"
},
"downloads": -1,
"filename": "jupyterhub_multiauthenticator-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b8307d489db4af7a11b943af43ef3273",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5402,
"upload_time": "2024-10-20T20:04:12",
"upload_time_iso_8601": "2024-10-20T20:04:12.617395Z",
"url": "https://files.pythonhosted.org/packages/d6/40/6f001657520f99c37a1703fab95dcb3eee3b69da2672fdd830a6ec23937d/jupyterhub_multiauthenticator-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "acd8fff3e1bd023dee0a7a5bd2849bb577741d4349410c9a986e4b35fd0d3ca2",
"md5": "dad5057ed34398753bb80510f1df887e",
"sha256": "56f44742cef11f2bc82c688d48de3917a2ef04a73ec2f720a5a48ed23db4085c"
},
"downloads": -1,
"filename": "jupyterhub_multiauthenticator-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "dad5057ed34398753bb80510f1df887e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5744,
"upload_time": "2024-10-20T20:04:13",
"upload_time_iso_8601": "2024-10-20T20:04:13.556781Z",
"url": "https://files.pythonhosted.org/packages/ac/d8/fff3e1bd023dee0a7a5bd2849bb577741d4349410c9a986e4b35fd0d3ca2/jupyterhub_multiauthenticator-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-20 20:04:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "jupyterhub-multiauthenticator"
}