From f7f0a4a2a4663ffeebd98e72ee7128d9b6e45f85 Mon Sep 17 00:00:00 2001 From: pasindu Date: Fri, 2 Feb 2024 23:46:47 +0530 Subject: [PATCH] Fix user scopes payload issue --- .../core/ui/request/interceptor/PermissionScopeHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/PermissionScopeHandler.java b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/PermissionScopeHandler.java index 42b06124f8..b6e6ddd293 100644 --- a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/PermissionScopeHandler.java +++ b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/PermissionScopeHandler.java @@ -63,8 +63,8 @@ public class PermissionScopeHandler extends HttpServlet { JsonNode authDataScope = authData.getScope(); ObjectMapper mapper = new ObjectMapper(); - Map nodeMap = new HashMap<>(); - nodeMap.put(HandlerConstants.USER_SCOPES, authDataScope); + Map nodeMap = new HashMap<>(); + nodeMap.put(HandlerConstants.USER_SCOPES, authDataScope.asText().replace("\"", "")); proxyResponse.setCode(HttpStatus.SC_OK); proxyResponse.setStatus(ProxyResponse.Status.SUCCESS); proxyResponse.setData(mapper.convertValue(nodeMap, JsonNode.class));