|
3 | 3 | c.Spawner.default_url = '/lab' |
4 | 4 |
|
5 | 5 | ## Authenticator |
6 | | -from oauthenticator.oauth2 import OAuthLoginHandler |
7 | | -from oauthenticator.generic import GenericOAuthenticator |
8 | | -from tornado.auth import OAuth2Mixin |
9 | | - |
10 | | -class UVSQMixin(OAuth2Mixin): |
11 | | - _OAUTH_AUTHORIZE_URL = 'https://jupyter.ens.uvsq.fr/c2o2b/login' |
12 | | - _OAUTH_ACCESS_TOKEN_URL = 'https://jupyter.ens.uvsq.fr/c2o2b/token' |
13 | | - |
14 | | -class UVSQLoginHandler(OAuthLoginHandler, UVSQMixin): |
15 | | - pass |
16 | | - |
17 | | -class UVSQAuthenticator(GenericOAuthenticator): |
18 | | - login_service = 'UVSQ' |
19 | | - login_handler = UVSQLoginHandler |
20 | | - client_id = '0' |
21 | | - client_secret = '' |
22 | | - userdata_url = 'https://jupyter.ens.uvsq.fr/c2o2b/userdata' |
23 | | - token_url = 'https://jupyter.ens.uvsq.fr/c2o2b/token' |
24 | | - oauth_callback_url = 'https://jupyter.ens.uvsq.fr/hub/oauth_callback' |
25 | | - |
26 | | -c.JupyterHub.authenticator_class = UVSQAuthenticator |
| 6 | +from jhub_cas_authenticator.cas_auth import CASAuthenticator |
| 7 | +c.JupyterHub.authenticator_class = CASAuthenticator |
| 8 | + |
| 9 | +# The CAS URLs to redirect (un)authenticated users to. |
| 10 | +c.CASAuthenticator.cas_login_url = 'https://cas.uvsq.fr/login' |
| 11 | +c.CASLocalAuthenticator.cas_logout_url = 'https://cas.uvsq/logout' |
| 12 | + |
| 13 | +# The CAS endpoint for validating service tickets. |
| 14 | +c.CASAuthenticator.cas_service_validate_url = 'https://cas.uvsq.fr/serviceValidate' |
| 15 | + |
| 16 | +# The service URL the CAS server will redirect the browser back to on successful authentication. |
| 17 | +c.CASAuthenticator.cas_service_url = 'https://sage.prism.uvsq.fr/hub/login' |
27 | 18 |
|
28 | 19 | c.Authenticator.admin_users = { 'lucadefe' } |
29 | 20 |
|
|
0 commit comments