Skip to content

Commit e11ed2d

Browse files
Siddharth1605sjohnr
authored andcommitted
Updated the Configuration examples in docs
Closes gh-14384
1 parent 79eef6c commit e11ed2d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/modules/ROOT/pages/servlet/configuration/java.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ It is configured with the following default implementation:
173173
@Bean
174174
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
175175
http
176-
.authorizeRequests(authorize -> authorize
176+
.authorizeHttpRequests(authorize -> authorize
177177
.anyRequest().authenticated()
178178
)
179179
.formLogin(withDefaults())
@@ -290,7 +290,7 @@ public class MyCustomDsl extends AbstractHttpConfigurer<MyCustomDsl, HttpSecurit
290290

291291
[NOTE]
292292
====
293-
This is actually how methods like `HttpSecurity.authorizeRequests()` are implemented.
293+
This is actually how methods like `HttpSecurity.authorizeHttpRequests()` are implemented.
294294
====
295295

296296
You can then use the custom DSL:
@@ -360,7 +360,7 @@ For example, to configure the `filterSecurityPublishAuthorizationSuccess` proper
360360
@Bean
361361
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
362362
http
363-
.authorizeRequests(authorize -> authorize
363+
.authorizeHttpRequests(authorize -> authorize
364364
.anyRequest().authenticated()
365365
.withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() {
366366
public <O extends FilterSecurityInterceptor> O postProcess(

docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import org.springframework.security.config.annotation.web.invoke
2424
@Bean
2525
open fun filterChain(http: HttpSecurity): SecurityFilterChain {
2626
http {
27-
authorizeRequests {
27+
authorizeHttpRequests {
2828
authorize(anyRequest, authenticated)
2929
}
3030
formLogin { }
@@ -81,7 +81,7 @@ class MultiHttpSecurityConfig {
8181
open fun apiFilterChain(http: HttpSecurity): SecurityFilterChain {
8282
http {
8383
securityMatcher("/api/**") <3>
84-
authorizeRequests {
84+
authorizeHttpRequests {
8585
authorize(anyRequest, hasRole("ADMIN"))
8686
}
8787
httpBasic { }
@@ -92,7 +92,7 @@ class MultiHttpSecurityConfig {
9292
@Bean <4>
9393
open fun formLoginFilterChain(http: HttpSecurity): SecurityFilterChain {
9494
http {
95-
authorizeRequests {
95+
authorizeHttpRequests {
9696
authorize(anyRequest, authenticated)
9797
}
9898
formLogin { }

0 commit comments

Comments
 (0)