summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-10-30 18:38:41 +0100
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-10-30 18:55:58 +0100
commitda64454193928db08dc5f419cfa7766adcf49a2c (patch)
tree9f47387e09ba46ad852ad2566e222325c57b7864 /src/main/java/org
parent336b204429e32e093f156c573711a7e28d28d41a (diff)
Fix logger of camunda filter
The filter did not have the right logger set Change-Id: I1d890346d7b4e7d4567a21eb200a57c4325da291 Issue-ID: CLAMP-64 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/clamp/clds/config/CamundaAuthFilterInitializer.java21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/CamundaAuthFilterInitializer.java b/src/main/java/org/onap/clamp/clds/config/CamundaAuthFilterInitializer.java
index a411151a1..af9e695e6 100644
--- a/src/main/java/org/onap/clamp/clds/config/CamundaAuthFilterInitializer.java
+++ b/src/main/java/org/onap/clamp/clds/config/CamundaAuthFilterInitializer.java
@@ -23,6 +23,9 @@
package org.onap.clamp.clds.config;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
import java.util.EnumSet;
import java.util.Map;
@@ -34,36 +37,27 @@ import javax.servlet.ServletException;
import org.camunda.bpm.spring.boot.starter.CamundaBpmAutoConfiguration;
import org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter;
-import org.onap.clamp.clds.client.SdcCatalogServices;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.annotation.Configuration;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
@Configuration
@ConditionalOnWebApplication
@AutoConfigureAfter(CamundaBpmAutoConfiguration.class)
public class CamundaAuthFilterInitializer implements ServletContextInitializer {
-
private static final EnumSet<DispatcherType> DISPATCHER_TYPES = EnumSet.of(DispatcherType.REQUEST);
-
private ServletContext servletContext;
-
@Value("${com.att.ajsc.camunda.contextPath:/camunda}")
private String camundaSuffix;
-
- protected static final EELFLogger logger = EELFManager.getInstance()
- .getLogger(SdcCatalogServices.class);
- protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+ protected static final EELFLogger logger = EELFManager.getInstance()
+ .getLogger(CamundaAuthFilterInitializer.class);
+ protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
this.servletContext = servletContext;
-
registerFilter("Authentication Filter", AuthenticationFilter.class, camundaSuffix + "/*");
}
@@ -75,16 +69,13 @@ public class CamundaAuthFilterInitializer implements ServletContextInitializer {
private FilterRegistration registerFilter(final String filterName, final Class<? extends Filter> filterClass,
final Map<String, String> initParameters, final String... urlPatterns) {
FilterRegistration filterRegistration = servletContext.getFilterRegistration(filterName);
-
if (filterRegistration == null) {
filterRegistration = servletContext.addFilter(filterName, filterClass);
filterRegistration.addMappingForUrlPatterns(DISPATCHER_TYPES, true, urlPatterns);
-
if (initParameters != null) {
filterRegistration.setInitParameters(initParameters);
}
}
-
return filterRegistration;
}
}