oauthenticator.cilogon#
CILogon OAuthAuthenticator for JupyterHub
Uses OAuth 2.0 with cilogon.org (override with CILOGON_HOST)
Caveats:
For allowed user list /admin purposes, username will be the ePPN by default. This is typically an email address and may not work as a Unix userid. Normalization may be required to turn the JupyterHub username into a Unix username.
Default username_claim of ePPN does not work for all providers, e.g. generic OAuth such as Google. Use c.CILogonOAuthenticator.username_claim = ‘email’ to use email instead of ePPN as the JupyterHub username.
- class oauthenticator.cilogon.CILogonOAuthenticator(**kwargs: Any)#
- additional_username_claims c.CILogonOAuthenticator.additional_username_claims = List()#
Additional claims to check if the username_claim fails.
This is useful for linked identities where not all of them return the primary username_claim.
- admin_users c.CILogonOAuthenticator.admin_users = Set()#
Set of users that will have admin rights on this JupyterHub.
Note: As of JupyterHub 2.0, full admin rights should not be required, and more precise permissions can be managed via roles.
- Admin users have extra privileges:
Use the admin panel to see list of users logged in
Add / remove users in some authenticators
Restart / halt the hub
Start / stop users’ single-user servers
Can access each individual users’ single-user server (if configured)
Admin access should be treated the same way root access is.
Defaults to an empty set, in which case no user has admin access.
- allowed_idps c.CILogonOAuthenticator.allowed_idps = Dict()#
A dictionary of the only entity IDs that will be allowed to be used as login options. See https://cilogon.org/idplist for the list of EntityIDs of each IdP.
It can be used to enable domain stripping, adding prefixes to the usernames and to specify an identity provider specific username claim.
For example:
allowed_idps = { "https://idpz.utorauth.utoronto.ca/shibboleth": { "username_derivation": { "username_claim": "email", "action": "strip_idp_domain", "domain": "utoronto.ca", } }, "https://github.com/login/oauth/authorize": { "username_derivation": { "username_claim": "username", "action": "prefix", "prefix": "gh" } } "http://google.com/accounts/o8/id": { "username_derivation": { "username_claim": "username", } "allowed_domains": ["uni.edu", "something.org"] } }
- Where username_derivation defines:
username_claim
: stringThe claim in the userinfo response from which to get the JupyterHub username. Examples include: eppn, email. What keys are available will depend on the scopes requested. It will overwrite any value set through CILogonOAuthenticator.username_claim for this identity provider.
action
: stringWhat action to perform on the username. Available options are “strip_idp_domain”, which will strip the domain from the username if specified and “prefix”, which will prefix the hub username with “prefix:”.
domain:
stringThe domain after “@” which will be stripped from the username if it exists and if the action is “strip_idp_domain”.
prefix
: stringThe prefix which will be added at the beginning of the username followed by a semi-column “:”, if the action is “prefix”.
allowed_domains
: stringIt defines which domains will be allowed to login using the specific identity provider.
- Requirements:
if username_derivation.action is strip_idp_domain, then username_derivation.domain must also be specified
if username_derivation.action is prefix, then username_derivation.prefix must also be specified.
username_claim must be provided for each idp in allowed_idps
Changed in version 15.0.0: CILogonOAuthenticaor.allowed_idps changed type from list to dict
- allowed_users c.CILogonOAuthenticator.allowed_users = Set()#
Set of usernames that are allowed to log in.
Use this with supported authenticators to restrict which users can log in. This is an additional list that further restricts users, beyond whatever restrictions the authenticator has in place. Any user in this list is granted the ‘user’ role on hub startup.
If empty, does not perform any additional restriction.
Changed in version 1.2: Authenticator.whitelist renamed to allowed_users
- auth_refresh_age c.CILogonOAuthenticator.auth_refresh_age = Int(300)#
The max age (in seconds) of authentication info before forcing a refresh of user auth info.
Refreshing auth info allows, e.g. requesting/re-validating auth tokens.
See
refresh_user()
for what happens when user auth info is refreshed (nothing by default).
- authorize_url c.CILogonOAuthenticator.authorize_url = Unicode('')#
The authenticate url for initiating oauth
- auto_login c.CILogonOAuthenticator.auto_login = Bool(False)#
Automatically begin the login process
rather than starting with a “Login with…” link at /hub/login
To work, .login_url() must give a URL other than the default /hub/login, such as an oauth handler or another automatic login handler, registered with .get_handlers().
New in version 0.8.
- auto_login_oauth2_authorize c.CILogonOAuthenticator.auto_login_oauth2_authorize = Bool(False)#
Automatically begin login process for OAuth2 authorization requests
When another application is using JupyterHub as OAuth2 provider, it sends users to /hub/api/oauth2/authorize. If the user isn’t logged in already, and auto_login is not set, the user will be dumped on the hub’s home page, without any context on what to do next.
Setting this to true will automatically redirect users to login if they aren’t logged in only on the /hub/api/oauth2/authorize endpoint.
New in version 1.5.
- basic_auth c.CILogonOAuthenticator.basic_auth = Bool(False)#
Whether or not to use basic authentication for access token request
- blocked_users c.CILogonOAuthenticator.blocked_users = Set()#
Set of usernames that are not allowed to log in.
Use this with supported authenticators to restrict which users can not log in. This is an additional block list that further restricts users, beyond whatever restrictions the authenticator has in place.
If empty, does not perform any additional restriction.
Changed in version 1.2: Authenticator.blacklist renamed to blocked_users
- cilogon_host c.CILogonOAuthenticator.cilogon_host = Unicode('cilogon.org')#
No help string is provided.
- client_id c.CILogonOAuthenticator.client_id = Unicode('')#
No help string is provided.
- client_secret c.CILogonOAuthenticator.client_secret = Unicode('')#
No help string is provided.
- custom_403_message c.CILogonOAuthenticator.custom_403_message = Unicode('Sorry, you are not currently authorized to use this hub. Please contact the hub administrator.')#
The message to be shown when user was not allowed
- delete_invalid_users c.CILogonOAuthenticator.delete_invalid_users = Bool(False)#
Delete any users from the database that do not pass validation
When JupyterHub starts, .add_user will be called on each user in the database to verify that all users are still valid.
If delete_invalid_users is True, any users that do not pass validation will be deleted from the database. Use this if users might be deleted from an external system, such as local user accounts.
If False (default), invalid users remain in the Hub’s database and a warning will be issued. This is the default to avoid data loss due to config changes.
- enable_auth_state c.CILogonOAuthenticator.enable_auth_state = Bool(False)#
Enable persisting auth_state (if available).
auth_state will be encrypted and stored in the Hub’s database. This can include things like authentication tokens, etc. to be passed to Spawners as environment variables.
Encrypting auth_state requires the cryptography package.
Additionally, the JUPYTERHUB_CRYPT_KEY environment variable must contain one (or more, separated by ;) 32B encryption keys. These can be either base64 or hex-encoded.
If encryption is unavailable, auth_state cannot be persisted.
New in JupyterHub 0.8
- extra_authorize_params c.CILogonOAuthenticator.extra_authorize_params = Dict()#
Extra GET params to send along with the initial OAuth request to the OAuth provider.
- http_request_kwargs c.CILogonOAuthenticator.http_request_kwargs = Dict()#
Extra default kwargs passed to all HTTPRequests.
For example, to use a HTTP proxy for all requests:
c.OAuthenticator.http_request_kwargs = {“proxy_host”: “proxy.example.com”, “proxy_port”: 8080}
See the tornado.httpclient.HTTPRequest documentation for all options and limitations: https://www.tornadoweb.org/en/stable/httpclient.html#tornado.httpclient.HTTPRequest
Note that some of these are dependent on the httpclient implementation.
- idp c.CILogonOAuthenticator.idp = Unicode('')#
Deprecated, use CILogonOAuthenticator.shown_idps.
- idp_whitelist c.CILogonOAuthenticator.idp_whitelist = List()#
Deprecated, use CIlogonOAuthenticator.allowed_idps
- login_handler#
alias of
CILogonLoginHandler
- logout_redirect_url c.CILogonOAuthenticator.logout_redirect_url = Unicode('')#
URL for logging out of Auth0
- manage_groups c.CILogonOAuthenticator.manage_groups = Bool(False)#
Let authenticator manage user groups
If True, Authenticator.authenticate and/or .refresh_user may return a list of group names in the ‘groups’ field, which will be assigned to the user.
All group-assignment APIs are disabled if this is True.
- oauth_callback_url c.CILogonOAuthenticator.oauth_callback_url = Unicode('')#
Callback URL to use. Typically https://{host}/hub/oauth_callback
- post_auth_hook c.CILogonOAuthenticator.post_auth_hook = Any(None)#
An optional hook function that you can implement to do some bootstrapping work during authentication. For example, loading user account details from an external system.
This function is called after the user has passed all authentication checks and is ready to successfully authenticate. This function must return the authentication dict reguardless of changes to it.
This maybe a coroutine.
Example:
import os, pwd def my_hook(authenticator, handler, authentication): user_data = pwd.getpwnam(authentication['name']) spawn_data = { 'pw_data': user_data 'gid_list': os.getgrouplist(authentication['name'], user_data.pw_gid) } if authentication['auth_state'] is None: authentication['auth_state'] = {} authentication['auth_state']['spawn_data'] = spawn_data return authentication c.Authenticator.post_auth_hook = my_hook
- refresh_pre_spawn c.CILogonOAuthenticator.refresh_pre_spawn = Bool(False)#
Force refresh of auth prior to spawn.
This forces
refresh_user()
to be called prior to launching a server, to ensure that auth state is up-to-date.This can be important when e.g. auth tokens that may have expired are passed to the spawner via environment variables from auth_state.
If refresh_user cannot refresh the user auth data, launch will fail until the user logs in again.
- scope c.CILogonOAuthenticator.scope = List()#
The OAuth scopes to request.
See cilogon_scope.md for details. At least ‘openid’ is required.
- shown_idps c.CILogonOAuthenticator.shown_idps = List()#
A list of identity providers to be shown as login options. The idp attribute is the SAML Entity ID of the user’s selected identity provider.
See https://cilogon.org/include/idplist.xml for the list of identity providers supported by CILogon.
- skin c.CILogonOAuthenticator.skin = Unicode('')#
The skin attribute is the name of the custom CILogon interface skin for your application.
Contact help@cilogon.org to request a custom skin.
- strip_idp_domain c.CILogonOAuthenticator.strip_idp_domain = Bool(False)#
Deprecated, use CILogonOAuthenticator.allowed_idps[“username_derivation”][“action”] = “strip_idp_domain” to enable it and CIlogonOAuthenticator.allowed_idps[“username_derivation”][“domain”] to list the domain which will be stripped
- token_params c.CILogonOAuthenticator.token_params = Dict()#
Extra parameters for first POST request exchanging the OAuth code for an Access Token
- token_url c.CILogonOAuthenticator.token_url = Unicode('')#
The url retrieving an access token at the completion of oauth
- async update_auth_model(auth_model)#
Updates auth_model dict if any fields have changed or additional information is available or returns the unchanged auth_model.
Returns the model unchanged by default.
Should be overridden to take into account changes like group/admin membership.
- Args: auth_model - the auth model dictionary dict instead, containing:
the name key holding the username
- the auth_state key, the dictionary of of auth state
returned by
oauthenticator.OAuthenticator.build_auth_state_dict()
Called by the
oauthenticator.OAuthenticator.authenticate()
- user_info_to_username(user_info)#
Gets the self.username_claim key’s value from the user_info dictionary. This is equivalent to the JupyterHub username.
Should be overridden by the authenticators for which the hub username cannot be extracted this way and needs extra processing.
- Parameters:
user_info – the dictionary returned by the userdata request
- Returns:
user_info[“self.username_claim”] or raises an error if such value isn’t found.
Called by the
oauthenticator.OAuthenticator.authenticate()
- async user_is_authorized(auth_model)#
Checks if the user that is authenticating should be authorized or not and False otherwise. Should be overridden with any relevant logic specific to each oauthenticator.
Returns True by default.
Called by the
oauthenticator.OAuthenticator.authenticate()
- userdata_params c.CILogonOAuthenticator.userdata_params = Dict()#
Userdata params to get user data login information
- userdata_token_method c.CILogonOAuthenticator.userdata_token_method = Unicode('header')#
Method for sending access token in userdata request. Supported methods: header, url. Default: header
- userdata_url c.CILogonOAuthenticator.userdata_url = Unicode('')#
The url for retrieving user data with a completed access token
- username_claim c.CILogonOAuthenticator.username_claim = Unicode('username')#
Field in userdata reply to use for username The field in the userdata response from which to get the JupyterHub username. Examples include: email, username, nickname
What keys are available will depend on the scopes requested and the authenticator used.
- username_map c.CILogonOAuthenticator.username_map = Dict()#
Dictionary mapping authenticator usernames to JupyterHub users.
Primarily used to normalize OAuth user names to local users.
- username_pattern c.CILogonOAuthenticator.username_pattern = Unicode('')#
Regular expression pattern that all valid usernames must match.
If a username does not match the pattern specified here, authentication will not be attempted.
If not set, allow any username.
- validate_server_cert c.CILogonOAuthenticator.validate_server_cert = Bool(False)#
No help string is provided.
- whitelist c.CILogonOAuthenticator.whitelist = Set()#
Deprecated, use Authenticator.allowed_users
- class oauthenticator.cilogon.LocalCILogonOAuthenticator(**kwargs: Any)#
A version that mixes in local system user creation
- add_user_cmd c.LocalCILogonOAuthenticator.add_user_cmd = Command()#
The command to use for creating users as a list of strings
For each element in the list, the string USERNAME will be replaced with the user’s username. The username will also be appended as the final argument.
For Linux, the default value is:
[‘adduser’, ‘-q’, ‘–gecos’, ‘””’, ‘–disabled-password’]
To specify a custom home directory, set this to:
[‘adduser’, ‘-q’, ‘–gecos’, ‘””’, ‘–home’, ‘/customhome/USERNAME’, ‘–disabled-password’]
This will run the command:
adduser -q –gecos “” –home /customhome/river –disabled-password river
when the user ‘river’ is created.
- additional_username_claims c.LocalCILogonOAuthenticator.additional_username_claims = List()#
Additional claims to check if the username_claim fails.
This is useful for linked identities where not all of them return the primary username_claim.
- admin_users c.LocalCILogonOAuthenticator.admin_users = Set()#
Set of users that will have admin rights on this JupyterHub.
Note: As of JupyterHub 2.0, full admin rights should not be required, and more precise permissions can be managed via roles.
- Admin users have extra privileges:
Use the admin panel to see list of users logged in
Add / remove users in some authenticators
Restart / halt the hub
Start / stop users’ single-user servers
Can access each individual users’ single-user server (if configured)
Admin access should be treated the same way root access is.
Defaults to an empty set, in which case no user has admin access.
- allowed_groups c.LocalCILogonOAuthenticator.allowed_groups = Set()#
Allow login from all users in these UNIX groups.
If set, allowed username set is ignored.
- allowed_idps c.LocalCILogonOAuthenticator.allowed_idps = Dict()#
A dictionary of the only entity IDs that will be allowed to be used as login options. See https://cilogon.org/idplist for the list of EntityIDs of each IdP.
It can be used to enable domain stripping, adding prefixes to the usernames and to specify an identity provider specific username claim.
For example:
allowed_idps = { "https://idpz.utorauth.utoronto.ca/shibboleth": { "username_derivation": { "username_claim": "email", "action": "strip_idp_domain", "domain": "utoronto.ca", } }, "https://github.com/login/oauth/authorize": { "username_derivation": { "username_claim": "username", "action": "prefix", "prefix": "gh" } } "http://google.com/accounts/o8/id": { "username_derivation": { "username_claim": "username", } "allowed_domains": ["uni.edu", "something.org"] } }
- Where username_derivation defines:
username_claim
: stringThe claim in the userinfo response from which to get the JupyterHub username. Examples include: eppn, email. What keys are available will depend on the scopes requested. It will overwrite any value set through CILogonOAuthenticator.username_claim for this identity provider.
action
: stringWhat action to perform on the username. Available options are “strip_idp_domain”, which will strip the domain from the username if specified and “prefix”, which will prefix the hub username with “prefix:”.
domain:
stringThe domain after “@” which will be stripped from the username if it exists and if the action is “strip_idp_domain”.
prefix
: stringThe prefix which will be added at the beginning of the username followed by a semi-column “:”, if the action is “prefix”.
allowed_domains
: stringIt defines which domains will be allowed to login using the specific identity provider.
- Requirements:
if username_derivation.action is strip_idp_domain, then username_derivation.domain must also be specified
if username_derivation.action is prefix, then username_derivation.prefix must also be specified.
username_claim must be provided for each idp in allowed_idps
Changed in version 15.0.0: CILogonOAuthenticaor.allowed_idps changed type from list to dict
- allowed_users c.LocalCILogonOAuthenticator.allowed_users = Set()#
Set of usernames that are allowed to log in.
Use this with supported authenticators to restrict which users can log in. This is an additional list that further restricts users, beyond whatever restrictions the authenticator has in place. Any user in this list is granted the ‘user’ role on hub startup.
If empty, does not perform any additional restriction.
Changed in version 1.2: Authenticator.whitelist renamed to allowed_users
- auth_refresh_age c.LocalCILogonOAuthenticator.auth_refresh_age = Int(300)#
The max age (in seconds) of authentication info before forcing a refresh of user auth info.
Refreshing auth info allows, e.g. requesting/re-validating auth tokens.
See
refresh_user()
for what happens when user auth info is refreshed (nothing by default).
- authorize_url c.LocalCILogonOAuthenticator.authorize_url = Unicode('')#
The authenticate url for initiating oauth
- auto_login c.LocalCILogonOAuthenticator.auto_login = Bool(False)#
Automatically begin the login process
rather than starting with a “Login with…” link at /hub/login
To work, .login_url() must give a URL other than the default /hub/login, such as an oauth handler or another automatic login handler, registered with .get_handlers().
New in version 0.8.
- auto_login_oauth2_authorize c.LocalCILogonOAuthenticator.auto_login_oauth2_authorize = Bool(False)#
Automatically begin login process for OAuth2 authorization requests
When another application is using JupyterHub as OAuth2 provider, it sends users to /hub/api/oauth2/authorize. If the user isn’t logged in already, and auto_login is not set, the user will be dumped on the hub’s home page, without any context on what to do next.
Setting this to true will automatically redirect users to login if they aren’t logged in only on the /hub/api/oauth2/authorize endpoint.
New in version 1.5.
- basic_auth c.LocalCILogonOAuthenticator.basic_auth = Bool(False)#
Whether or not to use basic authentication for access token request
- blocked_users c.LocalCILogonOAuthenticator.blocked_users = Set()#
Set of usernames that are not allowed to log in.
Use this with supported authenticators to restrict which users can not log in. This is an additional block list that further restricts users, beyond whatever restrictions the authenticator has in place.
If empty, does not perform any additional restriction.
Changed in version 1.2: Authenticator.blacklist renamed to blocked_users
- cilogon_host c.LocalCILogonOAuthenticator.cilogon_host = Unicode('cilogon.org')#
No help string is provided.
- client_id c.LocalCILogonOAuthenticator.client_id = Unicode('')#
No help string is provided.
- client_secret c.LocalCILogonOAuthenticator.client_secret = Unicode('')#
No help string is provided.
- create_system_users c.LocalCILogonOAuthenticator.create_system_users = Bool(False)#
If set to True, will attempt to create local system users if they do not exist already.
Supports Linux and BSD variants only.
- custom_403_message c.LocalCILogonOAuthenticator.custom_403_message = Unicode('Sorry, you are not currently authorized to use this hub. Please contact the hub administrator.')#
The message to be shown when user was not allowed
- delete_invalid_users c.LocalCILogonOAuthenticator.delete_invalid_users = Bool(False)#
Delete any users from the database that do not pass validation
When JupyterHub starts, .add_user will be called on each user in the database to verify that all users are still valid.
If delete_invalid_users is True, any users that do not pass validation will be deleted from the database. Use this if users might be deleted from an external system, such as local user accounts.
If False (default), invalid users remain in the Hub’s database and a warning will be issued. This is the default to avoid data loss due to config changes.
- enable_auth_state c.LocalCILogonOAuthenticator.enable_auth_state = Bool(False)#
Enable persisting auth_state (if available).
auth_state will be encrypted and stored in the Hub’s database. This can include things like authentication tokens, etc. to be passed to Spawners as environment variables.
Encrypting auth_state requires the cryptography package.
Additionally, the JUPYTERHUB_CRYPT_KEY environment variable must contain one (or more, separated by ;) 32B encryption keys. These can be either base64 or hex-encoded.
If encryption is unavailable, auth_state cannot be persisted.
New in JupyterHub 0.8
- extra_authorize_params c.LocalCILogonOAuthenticator.extra_authorize_params = Dict()#
Extra GET params to send along with the initial OAuth request to the OAuth provider.
- group_whitelist c.LocalCILogonOAuthenticator.group_whitelist = Set()#
DEPRECATED: use allowed_groups
- http_request_kwargs c.LocalCILogonOAuthenticator.http_request_kwargs = Dict()#
Extra default kwargs passed to all HTTPRequests.
For example, to use a HTTP proxy for all requests:
c.OAuthenticator.http_request_kwargs = {“proxy_host”: “proxy.example.com”, “proxy_port”: 8080}
See the tornado.httpclient.HTTPRequest documentation for all options and limitations: https://www.tornadoweb.org/en/stable/httpclient.html#tornado.httpclient.HTTPRequest
Note that some of these are dependent on the httpclient implementation.
- idp c.LocalCILogonOAuthenticator.idp = Unicode('')#
Deprecated, use CILogonOAuthenticator.shown_idps.
- idp_whitelist c.LocalCILogonOAuthenticator.idp_whitelist = List()#
Deprecated, use CIlogonOAuthenticator.allowed_idps
- logout_redirect_url c.LocalCILogonOAuthenticator.logout_redirect_url = Unicode('')#
URL for logging out of Auth0
- manage_groups c.LocalCILogonOAuthenticator.manage_groups = Bool(False)#
Let authenticator manage user groups
If True, Authenticator.authenticate and/or .refresh_user may return a list of group names in the ‘groups’ field, which will be assigned to the user.
All group-assignment APIs are disabled if this is True.
- oauth_callback_url c.LocalCILogonOAuthenticator.oauth_callback_url = Unicode('')#
Callback URL to use. Typically https://{host}/hub/oauth_callback
- post_auth_hook c.LocalCILogonOAuthenticator.post_auth_hook = Any(None)#
An optional hook function that you can implement to do some bootstrapping work during authentication. For example, loading user account details from an external system.
This function is called after the user has passed all authentication checks and is ready to successfully authenticate. This function must return the authentication dict reguardless of changes to it.
This maybe a coroutine.
Example:
import os, pwd def my_hook(authenticator, handler, authentication): user_data = pwd.getpwnam(authentication['name']) spawn_data = { 'pw_data': user_data 'gid_list': os.getgrouplist(authentication['name'], user_data.pw_gid) } if authentication['auth_state'] is None: authentication['auth_state'] = {} authentication['auth_state']['spawn_data'] = spawn_data return authentication c.Authenticator.post_auth_hook = my_hook
- refresh_pre_spawn c.LocalCILogonOAuthenticator.refresh_pre_spawn = Bool(False)#
Force refresh of auth prior to spawn.
This forces
refresh_user()
to be called prior to launching a server, to ensure that auth state is up-to-date.This can be important when e.g. auth tokens that may have expired are passed to the spawner via environment variables from auth_state.
If refresh_user cannot refresh the user auth data, launch will fail until the user logs in again.
- scope c.LocalCILogonOAuthenticator.scope = List()#
The OAuth scopes to request.
See cilogon_scope.md for details. At least ‘openid’ is required.
- shown_idps c.LocalCILogonOAuthenticator.shown_idps = List()#
A list of identity providers to be shown as login options. The idp attribute is the SAML Entity ID of the user’s selected identity provider.
See https://cilogon.org/include/idplist.xml for the list of identity providers supported by CILogon.
- skin c.LocalCILogonOAuthenticator.skin = Unicode('')#
The skin attribute is the name of the custom CILogon interface skin for your application.
Contact help@cilogon.org to request a custom skin.
- strip_idp_domain c.LocalCILogonOAuthenticator.strip_idp_domain = Bool(False)#
Deprecated, use CILogonOAuthenticator.allowed_idps[“username_derivation”][“action”] = “strip_idp_domain” to enable it and CIlogonOAuthenticator.allowed_idps[“username_derivation”][“domain”] to list the domain which will be stripped
- token_params c.LocalCILogonOAuthenticator.token_params = Dict()#
Extra parameters for first POST request exchanging the OAuth code for an Access Token
- token_url c.LocalCILogonOAuthenticator.token_url = Unicode('')#
The url retrieving an access token at the completion of oauth
- uids c.LocalCILogonOAuthenticator.uids = Dict()#
Dictionary of uids to use at user creation time. This helps ensure that users created from the database get the same uid each time they are created in temporary deployments or containers.
- userdata_params c.LocalCILogonOAuthenticator.userdata_params = Dict()#
Userdata params to get user data login information
- userdata_token_method c.LocalCILogonOAuthenticator.userdata_token_method = Unicode('header')#
Method for sending access token in userdata request. Supported methods: header, url. Default: header
- userdata_url c.LocalCILogonOAuthenticator.userdata_url = Unicode('')#
The url for retrieving user data with a completed access token
- username_claim c.LocalCILogonOAuthenticator.username_claim = Unicode('username')#
Field in userdata reply to use for username The field in the userdata response from which to get the JupyterHub username. Examples include: email, username, nickname
What keys are available will depend on the scopes requested and the authenticator used.
- username_map c.LocalCILogonOAuthenticator.username_map = Dict()#
Dictionary mapping authenticator usernames to JupyterHub users.
Primarily used to normalize OAuth user names to local users.
- username_pattern c.LocalCILogonOAuthenticator.username_pattern = Unicode('')#
Regular expression pattern that all valid usernames must match.
If a username does not match the pattern specified here, authentication will not be attempted.
If not set, allow any username.
- validate_server_cert c.LocalCILogonOAuthenticator.validate_server_cert = Bool(False)#
No help string is provided.
- whitelist c.LocalCILogonOAuthenticator.whitelist = Set()#
Deprecated, use Authenticator.allowed_users