mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-01 14:59:50 +00:00
Merge branch '4.0.x'
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
package org.springframework.boot.docs.web.security.saml2.relyingparty
|
||||
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity
|
||||
import org.springframework.security.config.annotation.web.invoke
|
||||
import org.springframework.security.web.SecurityFilterChain
|
||||
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
open class MySamlRelyingPartyConfiguration {
|
||||
|
||||
@Bean
|
||||
open fun securityFilterChain(http: HttpSecurity): SecurityFilterChain {
|
||||
http {
|
||||
authorizeHttpRequests {
|
||||
authorize(anyRequest, authenticated)
|
||||
}
|
||||
saml2Login { }
|
||||
saml2Logout {
|
||||
logoutRequest { logoutUrl = "/SLOService.saml2" }
|
||||
logoutResponse { logoutUrl = "/SLOService.saml2" }
|
||||
}
|
||||
}
|
||||
return http.build()
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user