Skip to content

Commit b5b2100

Browse files
committed
formatter fix
1 parent 4e14e90 commit b5b2100

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

spring-boot-admin-samples/spring-boot-admin-sample-servlet/src/main/java/de/codecentric/boot/admin/SecuritySecureConfig.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,25 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
6161
successHandler.setTargetUrlParameter("redirectTo");
6262
successHandler.setDefaultTargetUrl(this.adminServer.path("/"));
6363

64-
http.authorizeHttpRequests((authorizeRequests) -> authorizeRequests
64+
http.authorizeHttpRequests((authorizeRequests) -> authorizeRequests //
6565
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/assets/**"))).permitAll() // <1>
6666
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/variables.css"))).permitAll()
6767
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/actuator/info"))).permitAll()
68-
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/actuator/health"))).permitAll()
68+
.requestMatchers(new AntPathRequestMatcher(adminServer.path("/actuator/health"))).permitAll()
6969
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/login"))).permitAll()
7070
.dispatcherTypeMatchers(DispatcherType.ASYNC).permitAll() // https://github.com/spring-projects/spring-security/issues/11027
7171
.anyRequest().authenticated()) // <2>
72-
.formLogin((formLogin) -> formLogin.loginPage(this.adminServer.path("/login"))
73-
.successHandler(successHandler)) // <3>
74-
.logout((logout) -> logout.logoutUrl(this.adminServer.path("/logout")))
75-
.httpBasic(Customizer.withDefaults()) // <4>
76-
.csrf((csrf) -> csrf.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) // <5>
77-
.ignoringRequestMatchers(
78-
new AntPathRequestMatcher(this.adminServer.path("/instances"), POST.toString()), // <6>
79-
new AntPathRequestMatcher(this.adminServer.path("/instances/*"), DELETE.toString()), // <6>
80-
new AntPathRequestMatcher(this.adminServer.path("/actuator/**")) // <7>
81-
))
82-
.rememberMe((rememberMe) -> rememberMe.key(UUID.randomUUID().toString()).tokenValiditySeconds(1209600));
72+
.formLogin((formLogin) -> formLogin.loginPage(this.adminServer.path("/login"))
73+
.successHandler(successHandler)) // <3>
74+
.logout((logout) -> logout.logoutUrl(this.adminServer.path("/logout")))
75+
.httpBasic(Customizer.withDefaults()) // <4>
76+
.csrf((csrf) -> csrf.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) // <5>
77+
.ignoringRequestMatchers(
78+
new AntPathRequestMatcher(this.adminServer.path("/instances"), POST.toString()), // <6>
79+
new AntPathRequestMatcher(this.adminServer.path("/instances/*"), DELETE.toString()), // <6>
80+
new AntPathRequestMatcher(this.adminServer.path("/actuator/**")) // <7>
81+
))
82+
.rememberMe((rememberMe) -> rememberMe.key(UUID.randomUUID().toString()).tokenValiditySeconds(1209600));
8383
return http.build();
8484

8585
}

0 commit comments

Comments
 (0)