updated code

This commit is contained in:
Francesco Mangiacrapa 2024-04-29 15:11:57 +02:00
parent c2a930b112
commit 2fae3ee31a
1 changed files with 3 additions and 3 deletions

View File

@ -68,16 +68,16 @@ public class GeoportalExporterActionServlet extends HttpServlet {
sendError(resp, "Bad Request. No context found!");
PortalContext pContext = PortalContext.getConfiguration();
GCubeUser gcubeUser = pContext.getCurrentUser(req);
String scope = pContext.getCurrentScope(contextID);
logger.info("User caller fullname is {}, scope {}", gcubeUser.getFullname(), scope);
logger.info("The scope is {}", scope);
try {
ScopeProvider.instance.set(scope);
GeoportalServiceIdentityProxy identity = new GeoportalServiceIdentityProxy(req);
String theToken = identity.getToken();
String theIdentity = identity.getIdentity();
logger.info("The identity is {}", theIdentity);
GeoportalExporterAPI geoportalExporterAPI = new GeoportalExporterAPI();
URL urlRequest = geoportalExporterAPI.exportProject("pdf", ucdID, projectID, false);
String urlToRedirect = urlRequest.toString();