secure

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

Adds a channel security rule.

Parameters

matches

the RequestMatcher to match incoming requests against

attribute

the configuration attribute to secure the matching request (i.e. "REQUIRES_SECURE_CHANNEL")


fun secure(pattern: 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.

Parameters

pattern

the pattern to match incoming requests against.

attribute

the configuration attribute to secure the matching request (i.e. "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.

Parameters

pattern

the pattern to match incoming requests against.

servletPath

the servlet path to match incoming requests against. This only applies when using an MVC pattern matcher.

attribute

the configuration attribute to secure the matching request (i.e. "REQUIRES_SECURE_CHANNEL")