From f01b32e7e0a23d5de03a7b1c393caf780a87855e Mon Sep 17 00:00:00 2001 From: Stella Margonar Date: Fri, 21 Jan 2022 17:19:57 +0100 Subject: [PATCH 1/2] add call to validation endpoint in auto_oidc --- auth_oidc/models/res_users.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/auth_oidc/models/res_users.py b/auth_oidc/models/res_users.py index c487504e2a..2ad5a4eee3 100644 --- a/auth_oidc/models/res_users.py +++ b/auth_oidc/models/res_users.py @@ -63,6 +63,10 @@ def auth_oauth(self, provider, params): _logger.error("No id_token in response.") raise AccessDenied() validation = oauth_provider._parse_id_token(id_token, access_token) + + if oauth_provider.validation_endpoint: + validation.update(self._auth_oauth_validate(oauth_provider, access_token)) + # required check if not validation.get("user_id"): _logger.error("user_id claim not found in id_token (after mapping).") From 9d0959312d03d7c1ffe8c0d8ee9fb302650d8e94 Mon Sep 17 00:00:00 2001 From: Stella Margonar Date: Thu, 10 Mar 2022 16:39:00 +0100 Subject: [PATCH 2/2] fix provider --- auth_oidc/models/res_users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_oidc/models/res_users.py b/auth_oidc/models/res_users.py index 2ad5a4eee3..0394076658 100644 --- a/auth_oidc/models/res_users.py +++ b/auth_oidc/models/res_users.py @@ -65,7 +65,7 @@ def auth_oauth(self, provider, params): validation = oauth_provider._parse_id_token(id_token, access_token) if oauth_provider.validation_endpoint: - validation.update(self._auth_oauth_validate(oauth_provider, access_token)) + validation.update(self._auth_oauth_validate(provider, access_token)) # required check if not validation.get("user_id"):