fix for AuthZ framework, added tomcta filter for incoming and outcoming calls to the servlet, Feature #1496
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@120360 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
324fe66e12
commit
a9b5772604
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
<artifactId>rmp-common-library</artifactId>
|
<artifactId>rmp-common-library</artifactId>
|
||||||
<version>2.5.0-SNAPSHOT</version>
|
<version>2.6.0-SNAPSHOT</version>
|
||||||
<name>Resource Management Library</name>
|
<name>Resource Management Library</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Resource Management Library is a common library containing shared code for Information System Operations
|
gCube Resource Management Library is a common library containing shared code for Information System Operations
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package org.gcube.resourcemanagement.support.shared.util;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import javax.servlet.Filter;
|
||||||
|
import javax.servlet.FilterChain;
|
||||||
|
import javax.servlet.FilterConfig;
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.ServletRequest;
|
||||||
|
import javax.servlet.ServletResponse;
|
||||||
|
|
||||||
|
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||||
|
|
||||||
|
public class TokenFilter implements Filter {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(FilterConfig filterConfig) throws ServletException {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||||
|
SecurityTokenProvider.instance.reset();
|
||||||
|
chain.doFilter(request, response);
|
||||||
|
SecurityTokenProvider.instance.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue