summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config
diff options
context:
space:
mode:
authorKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-05-14 17:19:51 -0400
committerKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-05-25 13:39:38 -0400
commit2845910b34682056c1949f82e39d9205a26554e9 (patch)
tree825474a899dc5783e6ea8c4aefd26b6d4c881dfd /ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config
parent485296388748c1efb5737cf7ae9d4a8254681552 (diff)
Bulk upload changes and music health check apis
Issue-ID: PORTAL-290, PORTAL-291 Bulk upload changes and music health check apis Change-Id: I63d289d75420658ff4a14385a5106838fa8c32b2 Signed-off-by: Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java
index 9f561b05..5354fa39 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java
@@ -41,11 +41,11 @@ import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
+import org.onap.portalapp.portal.utils.MusicCookieCsrfTokenRepository;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
import org.springframework.security.web.util.matcher.RegexRequestMatcher;
import org.springframework.security.web.util.matcher.RequestMatcher;
@@ -61,14 +61,12 @@ public class ExternalSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public boolean matches(HttpServletRequest request) {
if(allowedMethods.matcher(request.getMethod()).matches())
- return false;
-
+ return false;
if(requestMatcher.matches(request))
- return true;
-
+ return true;
return false;
}
};
- http.csrf().csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()).requireCsrfProtectionMatcher(csrfRequestMatcher);
+ http.csrf().csrfTokenRepository(MusicCookieCsrfTokenRepository.withHttpOnlyFalse()).requireCsrfProtectionMatcher(csrfRequestMatcher);
}
}