From 6b86a0700bd7866a9510b6c06d79afcbced1652b Mon Sep 17 00:00:00 2001 From: Mauro Mugnaini Date: Fri, 3 Jul 2020 18:45:41 +0200 Subject: [PATCH] Changed according to renamed classes method names --- pom.xml | 4 ++-- .../threadlocalexec/SmartGearsPortalValve.java | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 2aa7a6c..b122a68 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gcube.portal threadlocal-vars-cleaner - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT jar threadlocal-vars-cleaner This component clean the Smartgears ThreadLocal variables each time a new Thread is assigned to a request from tomcat thread pool @@ -64,7 +64,7 @@ org.gcube.portal oidc-library-portal - 0.2-SNAPSHOT + 0.2.1-SNAPSHOT provided diff --git a/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java b/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java index 9ab758f..5d7974c 100644 --- a/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java +++ b/src/main/java/org/gcube/portal/threadlocalexec/SmartGearsPortalValve.java @@ -25,9 +25,9 @@ import org.gcube.common.scope.api.ScopeProvider; import org.gcube.oidc.rest.JWTToken; import org.gcube.oidc.rest.OpenIdConnectConfiguration; import org.gcube.oidc.rest.OpenIdConnectRESTHelper; +import org.gcube.portal.oidc.lr62.JWTCacheProxy; import org.gcube.portal.oidc.lr62.JWTTokenUtil; import org.gcube.portal.oidc.lr62.LiferayOpenIdConnectConfiguration; -import org.gcube.portal.oidc.lr62.OIDCTokenCacheProxy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -110,7 +110,7 @@ public class SmartGearsPortalValve extends ValveBase { return; } _log.debug("Trying to get UMA token from cache proxy"); - umaToken = OIDCTokenCacheProxy.getInstance().getUMAToken(user, session); + umaToken = JWTCacheProxy.getInstance().getUMAToken(user, session); } if (umaToken == null || !umaToken.getAud().contains(urlEncodedScope)) { if (umaToken == null) { @@ -130,7 +130,7 @@ public class SmartGearsPortalValve extends ValveBase { JWTToken authToken = JWTTokenUtil.getOIDCFromSession(session); if (authToken == null) { _log.debug("OIDC token not found in session. Trying to get it from cache proxy"); - authToken = OIDCTokenCacheProxy.getInstance().getOIDCToken(user, session); + authToken = JWTCacheProxy.getInstance().getOIDCToken(user, session); if (authToken == null) { _log.warn("OIDC token is null also in cache proxy, cannot continue!"); return; @@ -150,7 +150,7 @@ public class SmartGearsPortalValve extends ValveBase { return; } _log.debug("Setting refreshed OIDC token in cache proxy"); - OIDCTokenCacheProxy.getInstance().setOIDCToken(user, session, authToken); + JWTCacheProxy.getInstance().setOIDCToken(user, session, authToken); _log.debug("Setting refreshed OIDC token in session"); JWTTokenUtil.putOIDCInSession(authToken, session); } @@ -162,7 +162,7 @@ public class SmartGearsPortalValve extends ValveBase { return; } _log.debug("Setting UMA token in cache proxy"); - OIDCTokenCacheProxy.getInstance().setRPTToken(user, session, umaToken); + JWTCacheProxy.getInstance().setUMAToken(user, session, umaToken); _log.debug("Setting UMA token in session"); JWTTokenUtil.putUMAInSession(umaToken, session); } else { @@ -176,7 +176,7 @@ public class SmartGearsPortalValve extends ValveBase { return; } _log.debug("Setting refreshed UMA token in cache proxy"); - OIDCTokenCacheProxy.getInstance().setRPTToken(getCurrentUser(request), session, umaToken); + JWTCacheProxy.getInstance().setUMAToken(getCurrentUser(request), session, umaToken); _log.debug("Setting refreshed UMA token in session"); JWTTokenUtil.putUMAInSession(umaToken, session); } else if (JWTTokenUtil.getUMAFromSession(session) == null) {