diff --git a/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java b/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java index 8197001..a67f742 100644 --- a/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java +++ b/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java @@ -74,12 +74,11 @@ public class SmartGearsPortalValve extends ValveBase { // user cannot be null otherwise also the getCurrentUsername(request) returned null username in previous lines _log.debug("Getting current session"); HttpSession session = request.getSession(false); - if (session == null) { - _log.debug("Session is null, cannot continue"); - return; - } else { + if (session != null) { OIDCUmaUtil.checkUMATicketAndProvideInThreadLocal(request, (HttpServletResponse) resp, user, session, scope); + } else { + _log.debug("Session is null, cannot continue"); } //_log.trace("Security token set OK for " + username + " in scope " + scope);