diff options
Diffstat (limited to 'common/src/main/java/org/onap/so/security/CorsWebSecurityConfigurerAdapter.java')
-rw-r--r-- | common/src/main/java/org/onap/so/security/CorsWebSecurityConfigurerAdapter.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/common/src/main/java/org/onap/so/security/CorsWebSecurityConfigurerAdapter.java b/common/src/main/java/org/onap/so/security/CorsWebSecurityConfigurerAdapter.java new file mode 100644 index 0000000000..08ecd0c578 --- /dev/null +++ b/common/src/main/java/org/onap/so/security/CorsWebSecurityConfigurerAdapter.java @@ -0,0 +1,24 @@ +package org.onap.so.security; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.core.annotation.Order; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; + +@EnableWebSecurity +@Configuration +@Order(1) +@Profile({"cors"}) +public class CorsWebSecurityConfigurerAdapter extends BaseWebSecurityConfigurerAdapter { + @Autowired + @Qualifier("cors") + protected HttpSecurityConfigurer httpSecurityConfigurer; + + @Override + HttpSecurityConfigurer getHttpSecurityConfigurer() { + return httpSecurityConfigurer; + } +} |