saml2Login

fun saml2Login(saml2LoginConfiguration: Saml2Dsl.() -> Unit)

Configures authentication support using a SAML 2.0 Service Provider. A RelyingPartyRegistrationRepository is required and must be registered with the ApplicationContext or configured via Saml2Dsl.relyingPartyRegistrationRepository

Example:

@Configuration
@EnableWebSecurity
class SecurityConfig {

@Bean
fun securityFilterChain(http: HttpSecurity): SecurityFilterChain {
http {
saml2Login {
relyingPartyRegistration = getSaml2RelyingPartyRegistration()
}
}
return http.build()
}
}

Parameters

saml2LoginConfiguration

custom configuration to configure the SAML2 service provider

See also