Changed according to renamed classes method names
This commit is contained in:
parent
be0860d928
commit
6b86a0700b
4
pom.xml
4
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>threadlocal-vars-cleaner</artifactId>
|
<artifactId>threadlocal-vars-cleaner</artifactId>
|
||||||
<version>2.2.0-SNAPSHOT</version>
|
<version>2.2.1-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>threadlocal-vars-cleaner</name>
|
<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>
|
<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>
|
<dependency>
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>oidc-library-portal</artifactId>
|
<artifactId>oidc-library-portal</artifactId>
|
||||||
<version>0.2-SNAPSHOT</version>
|
<version>0.2.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -25,9 +25,9 @@ import org.gcube.common.scope.api.ScopeProvider;
|
||||||
import org.gcube.oidc.rest.JWTToken;
|
import org.gcube.oidc.rest.JWTToken;
|
||||||
import org.gcube.oidc.rest.OpenIdConnectConfiguration;
|
import org.gcube.oidc.rest.OpenIdConnectConfiguration;
|
||||||
import org.gcube.oidc.rest.OpenIdConnectRESTHelper;
|
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.JWTTokenUtil;
|
||||||
import org.gcube.portal.oidc.lr62.LiferayOpenIdConnectConfiguration;
|
import org.gcube.portal.oidc.lr62.LiferayOpenIdConnectConfiguration;
|
||||||
import org.gcube.portal.oidc.lr62.OIDCTokenCacheProxy;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class SmartGearsPortalValve extends ValveBase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_log.debug("Trying to get UMA token from cache proxy");
|
_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 || !umaToken.getAud().contains(urlEncodedScope)) {
|
||||||
if (umaToken == null) {
|
if (umaToken == null) {
|
||||||
|
@ -130,7 +130,7 @@ public class SmartGearsPortalValve extends ValveBase {
|
||||||
JWTToken authToken = JWTTokenUtil.getOIDCFromSession(session);
|
JWTToken authToken = JWTTokenUtil.getOIDCFromSession(session);
|
||||||
if (authToken == null) {
|
if (authToken == null) {
|
||||||
_log.debug("OIDC token not found in session. Trying to get it from cache proxy");
|
_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) {
|
if (authToken == null) {
|
||||||
_log.warn("OIDC token is null also in cache proxy, cannot continue!");
|
_log.warn("OIDC token is null also in cache proxy, cannot continue!");
|
||||||
return;
|
return;
|
||||||
|
@ -150,7 +150,7 @@ public class SmartGearsPortalValve extends ValveBase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_log.debug("Setting refreshed OIDC token in cache proxy");
|
_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");
|
_log.debug("Setting refreshed OIDC token in session");
|
||||||
JWTTokenUtil.putOIDCInSession(authToken, session);
|
JWTTokenUtil.putOIDCInSession(authToken, session);
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ public class SmartGearsPortalValve extends ValveBase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_log.debug("Setting UMA token in cache proxy");
|
_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");
|
_log.debug("Setting UMA token in session");
|
||||||
JWTTokenUtil.putUMAInSession(umaToken, session);
|
JWTTokenUtil.putUMAInSession(umaToken, session);
|
||||||
} else {
|
} else {
|
||||||
|
@ -176,7 +176,7 @@ public class SmartGearsPortalValve extends ValveBase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_log.debug("Setting refreshed UMA token in cache proxy");
|
_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");
|
_log.debug("Setting refreshed UMA token in session");
|
||||||
JWTTokenUtil.putUMAInSession(umaToken, session);
|
JWTTokenUtil.putUMAInSession(umaToken, session);
|
||||||
} else if (JWTTokenUtil.getUMAFromSession(session) == null) {
|
} else if (JWTTokenUtil.getUMAFromSession(session) == null) {
|
||||||
|
|
Loading…
Reference in New Issue