You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Thanks for the report @adamu.
I agree that with your suggestion of being able to specify the HTTP method in authorize.
We would need to add 2 additional functions authorize(method: HttpMethod, pattern: String, access: String) and authorize(method: HttpMethod, pattern: String, servletPath: String, access: String).
Would you be interested in submitting a PR?
Hi @eleftherias. To be honest I'm not sure how a good implementation would look. It looks like re-using createMvcMatchers() would be a good idea, but that method is protected, so it may be necessary to duplicate it?
Summary
AbstractRequestMatcherRegistry
provides themvcMatchers(HttpMethod method, String... mvcPatterns)
function to allow creation of anMvcMatcher
for a specific HTTP verb, but there is no correspondingauthorize()
function inAuthorizeRequestsDsl
.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 protectedcreateMvcMatchers()
method, or otherwise use the non-DSLauthorizeRequests()
Expected Behavior
Should be able to specify the HTTP method using the
authorize()
function:Version
5.3.0.RELEASE
The text was updated successfully, but these errors were encountered: