Fix user scopes payload issue

This commit is contained in:
Lasantha Dharmakeerthi 2024-02-02 18:28:04 +00:00
commit d57c0a2ab1

View File

@ -63,8 +63,8 @@ public class PermissionScopeHandler extends HttpServlet {
JsonNode authDataScope = authData.getScope();
ObjectMapper mapper = new ObjectMapper();
Map<String, Object> nodeMap = new HashMap<>();
nodeMap.put(HandlerConstants.USER_SCOPES, authDataScope);
Map<String, String> 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));