diff --git a/docs/howto/auth/awscognito.md b/docs/howto/auth/awscognito.md index 3827189..2e89fa4 100644 --- a/docs/howto/auth/awscognito.md +++ b/docs/howto/auth/awscognito.md @@ -149,9 +149,10 @@ If it is not provided as array, there is an easy fix. Just add these lines to your `awscognito.py`: ```python -def claim_groups_key_func(user_data_resp_json): - return [user_data_resp_json['custom:department']] +def groups_key_func(auth_state): + return [auth_state['oauth_user']['custom:department']] -c.GenericOAuthenticator.claim_groups_key = claim_groups_key_func +c.GenericOAuthenticator.manage_groups = True +c.GenericOAuthenticator.auth_state_groups_key = groups_key_func c.GenericOAuthenticator.allowed_groups = ["AA BB CC", "AA BB DD"] ``` diff --git a/tljh/requirements-hub-env.txt b/tljh/requirements-hub-env.txt index 3a9c004..25b29de 100644 --- a/tljh/requirements-hub-env.txt +++ b/tljh/requirements-hub-env.txt @@ -14,7 +14,7 @@ jupyterhub-firstuseauthenticator>=1.0.0,<2 jupyterhub-nativeauthenticator>=1.2.0,<2 jupyterhub-ldapauthenticator>=1.3.2,<2 jupyterhub-tmpauthenticator>=1.0.0,<2 -oauthenticator[azuread]>=16.0.4,<17 +oauthenticator>=17,<18 jupyterhub-idle-culler>=1.2.1,<2 # pycurl is installed to improve reliability and performance for when JupyterHub