Closed
Description
Summary
AbstractRequestMatcherRegistry
provides the mvcMatchers(HttpMethod method, String... mvcPatterns)
function to allow creation of an MvcMatcher
for a specific HTTP verb, but there is no corresponding authorize()
function in AuthorizeRequestsDsl
.
Actual Behavior
If we want to create an MvcMatcher that matches an HTTP Verb for use with the DSL, we have to construct the matcher manually using a similar method to AbstractRequestMatcherRegistry
's protected createMvcMatchers()
method, or otherwise use the non-DSL authorizeRequests()
Expected Behavior
Should be able to specify the HTTP method using the authorize()
function:
authorizeRequests {
authorize(POST, "/admin/**", hasRole("ADMIN"))
}
Version
5.3.0.RELEASE