Skip to content

Commit 6a2fbd5

Browse files
Polish EnableWeb(Flux)Security javadoc
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent dcd7490 commit 6a2fbd5

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
* .requestMatchers(&quot;/public/**&quot;).permitAll()
5151
* .anyRequest().hasRole(&quot;USER&quot;))
5252
* // Possibly more configuration ...
53-
* .formLogin() // enable form based log in
53+
* .formLogin((formLogin) -> formLogin // enable form based log in
5454
* // set permitAll for all URLs associated with Form Login
55-
* .permitAll();
55+
* permitAll());
5656
* return http.build();
5757
* }
5858
*

config/src/main/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurity.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@
5959
* &#064;Bean
6060
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
6161
* http
62-
* .authorizeExchange()
63-
* .anyExchange().authenticated()
64-
* .and()
65-
* .httpBasic().and()
66-
* .formLogin();
62+
* .authorizeExchange((authorize) -&gt; authorize.anyExchange().authenticated())
63+
* .httpBasic(Customizer.withDefaults())
64+
* .formLogin(Customizer.withDefaults());
6765
* return http.build();
6866
* }
6967
*

0 commit comments

Comments
 (0)