Skip to content

Commit

Permalink
Polish HttpSecurity Formatting
Browse files Browse the repository at this point in the history
Issue gh-11360
  • Loading branch information
jzheaux committed Jul 14, 2022
1 parent 400cd60 commit 5dff157
Showing 1 changed file with 14 additions and 19 deletions.
Expand Up @@ -945,13 +945,11 @@ static class FullyAuthenticatedConfig {
SecurityFilterChain chain(HttpSecurity http) throws Exception {
// @formatter:off
http
.httpBasic()
.and()
.rememberMe()
.and()
.authorizeHttpRequests((requests) -> requests
.anyRequest().fullyAuthenticated()
);
.httpBasic(withDefaults())
.rememberMe(withDefaults())
.authorizeHttpRequests((requests) -> requests
.anyRequest().fullyAuthenticated()
);
// @formatter:on
return http.build();
}
Expand All @@ -970,13 +968,11 @@ static class RememberMeConfig {
SecurityFilterChain chain(HttpSecurity http) throws Exception {
// @formatter:off
http
.httpBasic()
.and()
.rememberMe()
.and()
.authorizeHttpRequests((requests) -> requests
.anyRequest().rememberMe()
);
.httpBasic(withDefaults())
.rememberMe(withDefaults())
.authorizeHttpRequests((requests) -> requests
.anyRequest().rememberMe()
);
// @formatter:on
return http.build();
}
Expand All @@ -995,11 +991,10 @@ static class AnonymousConfig {
SecurityFilterChain chain(HttpSecurity http) throws Exception {
// @formatter:off
http
.httpBasic()
.and()
.authorizeHttpRequests((requests) -> requests
.anyRequest().anonymous()
);
.httpBasic(withDefaults())
.authorizeHttpRequests((requests) -> requests
.anyRequest().anonymous()
);
// @formatter:on
return http.build();
}
Expand Down

0 comments on commit 5dff157

Please sign in to comment.