Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit c44c0f9

Browse files
committed
Update to eliminate the need to provide an empty WebSecurityConfigurerAdapter
1 parent dcfa056 commit c44c0f9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

extensions/spring/boot/stormpath-spring-security-webmvc-spring-boot-starter/src/main/java/com/stormpath/spring/boot/autoconfigure/StormpathWebSecurityAutoConfiguration.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
3434
import org.springframework.context.annotation.Bean;
3535
import org.springframework.context.annotation.Configuration;
36+
import org.springframework.core.annotation.Order;
3637
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
38+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
39+
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
3740
import org.springframework.security.web.AuthenticationEntryPoint;
3841
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
3942
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
@@ -179,4 +182,12 @@ public StormpathWrapperFilter stormpathWrapperFilter() {
179182
return super.stormpathWrapperFilter();
180183
}
181184

185+
// Fix for: https://github.com/stormpath/stormpath-sdk-java/issues/1238
186+
// If stormpath is enabled, we don't want the spring security default definition
187+
@Order // uses default of max which ensure there won't be a clash with override
188+
@Configuration
189+
protected static class SpringSecurityWebAppConfig extends WebSecurityConfigurerAdapter {
190+
@Override
191+
protected void configure(HttpSecurity http) throws Exception {}
192+
}
182193
}

0 commit comments

Comments
 (0)