From c8bac4ec6ee6f556b7b3d5ee3c666135d816a311 Mon Sep 17 00:00:00 2001 From: yurem Date: Mon, 27 Sep 2021 18:38:10 +0300 Subject: [PATCH] fix: consent Gathering Script is not working in 4.3.0 version. #1549 --- .../gluu/oxauth/authorize/ws/rs/ConsentGathererService.java | 6 +++++- Server/src/main/webapp/authz/authorize.xhtml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGathererService.java b/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGathererService.java index 651086edf3..deb48d4187 100644 --- a/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGathererService.java +++ b/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGathererService.java @@ -304,7 +304,11 @@ public ConsentGatheringContext getContext() { return context; } - public List getScopes(ConsentGatheringContext context) { + public List getScopes() { + if (context == null) { + return Collections.emptyList(); + } + SessionId authenticatedSessionId = sessionIdService.getSessionId(); // Fix the list of scopes in the authorization page. oxAuth #739 Set grantedScopes = scopeChecker.checkScopesPolicy(context.getClient(), authenticatedSessionId.getSessionAttributes().get(AuthorizeRequestParam.SCOPE)); diff --git a/Server/src/main/webapp/authz/authorize.xhtml b/Server/src/main/webapp/authz/authorize.xhtml index b1bf6cf84d..27555af2eb 100644 --- a/Server/src/main/webapp/authz/authorize.xhtml +++ b/Server/src/main/webapp/authz/authorize.xhtml @@ -11,7 +11,7 @@ - +