Temporarily remove security matchers

Temporarily back out `SpringBootSecurity` to enable easier
package refactoring.

See gh-10261
This commit is contained in:
Phillip Webb
2017-09-04 23:52:03 -07:00
parent ecb8461e8c
commit 0f99b29b1a
7 changed files with 27 additions and 390 deletions

View File

@@ -1,6 +1,5 @@
package sample.secure.oauth2.actuator;
import org.springframework.boot.autoconfigure.security.SpringBootSecurity;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -15,19 +14,14 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
@Order(2) // before the resource server configuration
public class ActuatorSecurityConfiguration extends WebSecurityConfigurerAdapter {
private final SpringBootSecurity springBootSecurity;
public ActuatorSecurityConfiguration(SpringBootSecurity springBootSecurity) {
this.springBootSecurity = springBootSecurity;
}
@Override
protected void configure(HttpSecurity http) throws Exception {
// FIXME
// @formatter:off
http.requestMatcher(this.springBootSecurity.endpointIds(SpringBootSecurity.ALL_ENDPOINTS)).authorizeRequests()
.antMatchers("/**").authenticated()
.and()
.httpBasic();
// http.requestMatcher(ALL_ENDPOINTS).authorizeRequests()
// .antMatchers("/**").authenticated()
// .and()
// .httpBasic();
// @formatter:on
}