RequiresChannelDsl

Deprecated

since 6.5 use redirectToHttps instead

A Kotlin DSL to configure HttpSecurity channel security using idiomatic Kotlin code.

Author

Eleftheria Stein

Since

5.3

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val anyRequest: RequestMatcher

Matches any request.

Link copied to clipboard
var channelProcessors: List<ChannelProcessor>?

the ChannelProcessor instances to use in ChannelDecisionManagerImpl

Link copied to clipboard

Specify channel security is inactive.

Link copied to clipboard

Specify channel security is active.

Functions

Link copied to clipboard
fun secure(pattern: String, attribute: String = "REQUIRES_SECURE_CHANNEL")
fun secure(pattern: String, servletPath: String, attribute: String = "REQUIRES_SECURE_CHANNEL")

Adds a request authorization rule for an endpoint matching the provided pattern. If Spring MVC is not an the classpath, it will use an ant matcher. If Spring MVC is on the classpath, it will use an MVC matcher. The MVC will use the same rules that Spring MVC uses for matching. For example, often times a mapping of the path "/path" will match on "/path", "/path/", "/path.html", etc. If the current request will not be processed by Spring MVC, a reasonable default using the pattern as an ant pattern will be used.

fun secure(matches: RequestMatcher = AnyRequestMatcher.INSTANCE, attribute: String = "REQUIRES_SECURE_CHANNEL")

Adds a channel security rule.