Upgrading your OAuthenticator to version 16.0#
The following section describes what to pay attention to when upgrading to OAuthenticator 16.0.
Breaking changes#
username_key
replaced byusername_claim
in all oauthenticatorsGenericOAuthenticator.username_key
is deprecated and replaced byOAuthenticator.username_claim
.Auth0OAuthenticator.username_key
is deprecated and replaced byOAuthenticator.username_claim
.
Note
The
username_claim
and the deprecatedusername_key
refers to the field in theuserdata
response from which to get the JupyterHub username. Examples include: email, username, nickname. What keys are available depend on the scopes requested and the authenticator used.GenericOAuthenticator.extra_params
is deprecated and replaced byOAuthenticator.token_params
.The following public functions were removed:
OkpyOAuthenticator.get_auth_request(self, code)
OkpyOAuthenticator.get_user_info_request(self, access_token)
New#
The name of the user key expected to be present in
auth_state
is now configurable throughOAuthenticator.user_auth_state_key
for all oauthenticators, and it defaults to their prior specific values.The
Authenticator.refresh_pre_spawn
option is enabled by default ifOAuthenticator.enable_auth_state
is set.The userdata query parameters
OAuthenticator.userdata_params
to be added to the request sent toOAuthenticator.userdata_url
to get user data login information is now a configurable feature of all the oauthenticators.Note
Previously, a GenericOAuthenticator only trait.
The method used for sending the
access token
in the userdata request[1], calledOAuthenticator.userdata_token_method
, is now a configurable feature of all the oauthenticators.Note
Previously, a GenericOAuthenticator only trait.
It is now possible to pass extra parameters to the token request[2], using
OAuthenticator.token_params
for all of the oauthenticators.Note
Previously, a GenericOAuthenticator only trait.
It is now possible to set whether or not to use basic authentication for the access token request[2] using
OAuthenticator.basic_auth
for all of the oauthenticators. Currently it defaults toFalse
.Note
Previously, a GenericOAuthenticator only trait.