mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-31 06:38:42 +00:00 
			
		
		
		
	Merge branch '6.0.x'
Closes gh-13103
This commit is contained in:
		
						commit
						42cd19fcee
					
				| @ -95,6 +95,8 @@ public class HelloWebfluxSecurityConfig { | |||||||
| .Kotlin | .Kotlin | ||||||
| [source,kotlin,role="secondary"] | [source,kotlin,role="secondary"] | ||||||
| ----- | ----- | ||||||
|  | import org.springframework.security.config.web.server.invoke | ||||||
|  | 
 | ||||||
| @Configuration | @Configuration | ||||||
| @EnableWebFluxSecurity | @EnableWebFluxSecurity | ||||||
| class HelloWebfluxSecurityConfig { | class HelloWebfluxSecurityConfig { | ||||||
| @ -123,6 +125,9 @@ class HelloWebfluxSecurityConfig { | |||||||
| ----- | ----- | ||||||
| ==== | ==== | ||||||
| 
 | 
 | ||||||
|  | [NOTE] | ||||||
|  | Make sure that you import the `invoke` function in your Kotlin class, sometimes the IDE will not auto-import it causing compilation issues. | ||||||
|  | 
 | ||||||
| This configuration explicitly sets up all the same things as our minimal configuration. | This configuration explicitly sets up all the same things as our minimal configuration. | ||||||
| From here, you can more easily make changes to the defaults. | From here, you can more easily make changes to the defaults. | ||||||
| 
 | 
 | ||||||
| @ -177,6 +182,8 @@ static class MultiSecurityHttpConfig { | |||||||
| .Kotlin | .Kotlin | ||||||
| [source,kotlin,role="secondary"] | [source,kotlin,role="secondary"] | ||||||
| ---- | ---- | ||||||
|  | import org.springframework.security.config.web.server.invoke | ||||||
|  | 
 | ||||||
| @Configuration | @Configuration | ||||||
| @EnableWebFluxSecurity | @EnableWebFluxSecurity | ||||||
| open class MultiSecurityHttpConfig { | open class MultiSecurityHttpConfig { | ||||||
|  | |||||||
| @ -20,6 +20,8 @@ It is configured with the following default implementation: | |||||||
| ==== | ==== | ||||||
| [source,kotlin] | [source,kotlin] | ||||||
| ---- | ---- | ||||||
|  | import org.springframework.security.config.annotation.web.invoke | ||||||
|  | 
 | ||||||
| @Bean | @Bean | ||||||
| open fun filterChain(http: HttpSecurity): SecurityFilterChain { | open fun filterChain(http: HttpSecurity): SecurityFilterChain { | ||||||
|    http { |    http { | ||||||
| @ -34,6 +36,9 @@ open fun filterChain(http: HttpSecurity): SecurityFilterChain { | |||||||
| ---- | ---- | ||||||
| ==== | ==== | ||||||
| 
 | 
 | ||||||
|  | [NOTE] | ||||||
|  | Make sure that import the `invoke` function in your class, sometimes the IDE will not auto-import it causing compilation issues. | ||||||
|  | 
 | ||||||
| The default configuration (shown in the preceding listing): | The default configuration (shown in the preceding listing): | ||||||
| 
 | 
 | ||||||
| * Ensures that any request to our application requires the user to be authenticated | * Ensures that any request to our application requires the user to be authenticated | ||||||
| @ -63,6 +68,8 @@ The following example has a different configuration for URL's that start with `/ | |||||||
| [source,kotlin] | [source,kotlin] | ||||||
| ---- | ---- | ||||||
| @Configuration | @Configuration | ||||||
|  | import org.springframework.security.config.annotation.web.invoke | ||||||
|  | 
 | ||||||
| @EnableWebSecurity | @EnableWebSecurity | ||||||
| class MultiHttpSecurityConfig { | class MultiHttpSecurityConfig { | ||||||
|     @Bean                                                            <1> |     @Bean                                                            <1> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user