#21503 Update threadlocal-vars-cleaner to support AccessTokenProvider

This commit is contained in:
Massimiliano Assante 2021-05-25 16:29:28 +02:00
parent 58641ac4a4
commit 0ef38bfbcd
3 changed files with 8 additions and 5 deletions

View File

@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.3.1-SNAPSHOT] - 2021-05-25
- Feature #21503 Update threadlocal-vars-cleaner to support AccessTokenProvider
## [v2.3.0] - 2021-05-03 ## [v2.3.0] - 2021-05-03
- Fix Bug #20591 Keycloak-LR 6.2 Integration: portlet calls in landing page have not UMA token set - Fix Bug #20591 Keycloak-LR 6.2 Integration: portlet calls in landing page have not UMA token set

View File

@ -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.3.0</version> <version>2.3.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>
@ -32,7 +32,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
<version>3.6.1</version> <version>3.6.2-SNAPSHOT</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -63,7 +63,6 @@
<dependency> <dependency>
<groupId>org.gcube.portal</groupId> <groupId>org.gcube.portal</groupId>
<artifactId>oidc-library-portal</artifactId> <artifactId>oidc-library-portal</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -15,9 +15,9 @@ import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response; import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase; import org.apache.catalina.valves.ValveBase;
import org.gcube.common.authorization.client.exceptions.ObjectNotFound; import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
import org.gcube.common.authorization.library.provider.AccessTokenProvider;
import org.gcube.common.authorization.library.provider.AuthorizationProvider; import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.authorization.library.provider.UmaJWTProvider;
import org.gcube.common.authorization.library.provider.UserInfo; import org.gcube.common.authorization.library.provider.UserInfo;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
@ -46,7 +46,7 @@ public class SmartGearsPortalValve extends ValveBase {
SecurityTokenProvider.instance.reset(); SecurityTokenProvider.instance.reset();
ScopeProvider.instance.reset(); ScopeProvider.instance.reset();
AuthorizationProvider.instance.reset(); AuthorizationProvider.instance.reset();
UmaJWTProvider.instance.reset(); AccessTokenProvider.instance.reset();
//_log.trace("SmartGearsPortalValve SecurityTokenProvider and AuthorizationProvider reset OK"); //_log.trace("SmartGearsPortalValve SecurityTokenProvider and AuthorizationProvider reset OK");
if (req instanceof HttpServletRequest) { if (req instanceof HttpServletRequest) {
HttpServletRequest request = (HttpServletRequest) req; HttpServletRequest request = (HttpServletRequest) req;