Changed according to renamed classes method names

This commit is contained in:
Mauro Mugnaini 2020-07-03 18:45:41 +02:00
parent be0860d928
commit 6b86a0700b
2 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.portal</groupId>
<artifactId>threadlocal-vars-cleaner</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>threadlocal-vars-cleaner</name>
<description>This component clean the Smartgears ThreadLocal variables each time a new Thread is assigned to a request from tomcat thread pool</description>
@ -64,7 +64,7 @@
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>oidc-library-portal</artifactId>
<version>0.2-SNAPSHOT</version>
<version>0.2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -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) {