From 3bd739e8dcc9e36b33ac468030d629d155866a8b Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 4 Sep 2024 13:25:10 +0200 Subject: [PATCH] update oauthenticator to 17 azuread no longer has its own dependencies --- docs/howto/auth/awscognito.md | 7 ++++--- tljh/requirements-hub-env.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/howto/auth/awscognito.md b/docs/howto/auth/awscognito.md index 38271893..2e89fa4c 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 3a9c0042..25b29deb 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