From 528c82cae5edd2a5ed9501f3114f82c340649635 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Mon, 29 Apr 2024 16:43:34 +0200 Subject: [PATCH] setting USER_ID_ATTR_NAME --- .../server/GeoportalExporterActionServlet.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalExporterActionServlet.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalExporterActionServlet.java index de4f014..633ea00 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalExporterActionServlet.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalExporterActionServlet.java @@ -64,6 +64,9 @@ public class GeoportalExporterActionServlet extends HttpServlet { String userID = req.getParameter(GeoportalDataViewerConstants.USER_ID_PARAMETER); logger.info("doGet called with [projectID: " + projectID + ", ucdID: " + ucdID + ", contextID: " + contextID + ", userID: " + userID + "]"); + + System.out.println("doGet called with [projectID: " + projectID + ", ucdID: " + ucdID + ", contextID: " + contextID + + ", userID: " + userID + "]"); if (contextID == null || contextID.isEmpty()) sendError(resp, "Bad Request. No context found!"); @@ -76,7 +79,7 @@ public class GeoportalExporterActionServlet extends HttpServlet { //Setting header required to {@PortalContext} MutableHttpServletRequest mutableRequest = new MutableHttpServletRequest(req); mutableRequest.putHeader(PortalContext.VRE_ID_ATTR_NAME, contextID); - // mutableRequest.putHeader(PortalContext.USER_ID_ATTR_NAME, contextID); + mutableRequest.putHeader(PortalContext.USER_ID_ATTR_NAME, userID); ScopeProvider.instance.set(scope); GeoportalServiceIdentityProxy identity = new GeoportalServiceIdentityProxy(mutableRequest); String theToken = identity.getToken();