httpBasic
Enables HTTP basic authentication.
Example:
@Configuration
@EnableWebSecurity
class SecurityConfig {
@Bean
fun securityFilterChain(http: HttpSecurity): SecurityFilterChain {
http {
httpBasic {
realmName = "Custom Realm"
}
}
return http.build()
}
}Content copied to clipboard
Parameters
httpBasicConfiguration
custom configurations to be applied to the HTTP basic authentication