Skip to content

Updated the Configuration examples in docs #14391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/servlet/configuration/java.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ It is configured with the following default implementation:
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.authorizeRequests(authorize -> authorize
.authorizeHttpRequests(authorize -> authorize
.anyRequest().authenticated()
)
.formLogin(withDefaults())
Expand Down Expand Up @@ -326,7 +326,7 @@ class MyCustomDsl : AbstractHttpConfigurer<MyCustomDsl, HttpSecurity>() {

[NOTE]
====
This is actually how methods like `HttpSecurity.authorizeRequests()` are implemented.
This is actually how methods like `HttpSecurity.authorizeHttpRequests()` are implemented.
====

You can then use the custom DSL:
Expand Down Expand Up @@ -451,7 +451,7 @@ For example, to configure the `filterSecurityPublishAuthorizationSuccess` proper
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.authorizeRequests(authorize -> authorize
.authorizeHttpRequests(authorize -> authorize
.anyRequest().authenticated()
.withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() {
public <O extends FilterSecurityInterceptor> O postProcess(
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.springframework.security.config.annotation.web.invoke
@Bean
open fun filterChain(http: HttpSecurity): SecurityFilterChain {
http {
authorizeRequests {
authorizeHttpRequests {
authorize(anyRequest, authenticated)
}
formLogin { }
Expand Down Expand Up @@ -81,7 +81,7 @@ class MultiHttpSecurityConfig {
open fun apiFilterChain(http: HttpSecurity): SecurityFilterChain {
http {
securityMatcher("/api/**") <3>
authorizeRequests {
authorizeHttpRequests {
authorize(anyRequest, hasRole("ADMIN"))
}
httpBasic { }
Expand All @@ -92,7 +92,7 @@ class MultiHttpSecurityConfig {
@Bean <4>
open fun formLoginFilterChain(http: HttpSecurity): SecurityFilterChain {
http {
authorizeRequests {
authorizeHttpRequests {
authorize(anyRequest, authenticated)
}
formLogin { }
Expand Down