|
|
@ -130,12 +130,10 @@ public class SecurityAutoConfiguration {
|
|
|
|
if (this.security.getBasic().isEnabled()) {
|
|
|
|
if (this.security.getBasic().isEnabled()) {
|
|
|
|
|
|
|
|
|
|
|
|
String[] paths = getSecurePaths();
|
|
|
|
String[] paths = getSecurePaths();
|
|
|
|
|
|
|
|
http.exceptionHandling().authenticationEntryPoint(entryPoint()).and()
|
|
|
|
HttpConfiguration matcher = http.requestMatchers().antMatchers(paths);
|
|
|
|
.requestMatchers().antMatchers(paths);
|
|
|
|
matcher.authenticationEntryPoint(entryPoint()).httpBasic()
|
|
|
|
http.httpBasic().and().anonymous().disable();
|
|
|
|
.authenticationEntryPoint(entryPoint()).and().anonymous()
|
|
|
|
http.authorizeUrls().anyRequest()
|
|
|
|
.disable();
|
|
|
|
|
|
|
|
matcher.authorizeUrls().anyRequest()
|
|
|
|
|
|
|
|
.hasRole(this.security.getBasic().getRole());
|
|
|
|
.hasRole(this.security.getBasic().getRole());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|