Class AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry
- Enclosing class:
- AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder<H>>
RequestMatcher
to an AuthorizationManager
.-
Method Summary
Modifier and TypeMethodDescriptionand()
Return theHttpSecurityBuilder
when done using theAuthorizeHttpRequestsConfigurer
.protected AuthorizeHttpRequestsConfigurer<H>.AuthorizedUrl
chainRequestMatchers
(List<RequestMatcher> requestMatchers) Subclasses should implement this method for returning the object that is chained to the creation of theRequestMatcher
instances.mvcMatchers
(String... mvcPatterns) Maps anMvcRequestMatcher
that does not care whichHttpMethod
is used.mvcMatchers
(org.springframework.http.HttpMethod method, String... mvcPatterns) Maps anMvcRequestMatcher
that also specifies a specificHttpMethod
to match on.shouldFilterAllDispatcherTypes
(boolean shouldFilter) Sets whether all dispatcher types should be filtered.withObjectPostProcessor
(ObjectPostProcessor<?> objectPostProcessor) Adds anObjectPostProcessor
for this class.Methods inherited from class org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry
antMatchers, antMatchers, antMatchers, anyRequest, createMvcMatchers, dispatcherTypeMatchers, dispatcherTypeMatchers, getApplicationContext, regexMatchers, regexMatchers, requestMatchers, setApplicationContext
-
Method Details
-
mvcMatchers
public AuthorizeHttpRequestsConfigurer<H>.MvcMatchersAuthorizedUrl mvcMatchers(String... mvcPatterns) Description copied from class:AbstractRequestMatcherRegistry
Maps an
MvcRequestMatcher
that does not care whichHttpMethod
is used. This matcher 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 a ant pattern will be used.
- Specified by:
mvcMatchers
in classAbstractRequestMatcherRegistry<AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder<H>>.AuthorizedUrl>
- Parameters:
mvcPatterns
- the patterns to match on. The rules for matching are defined by Spring MVC- Returns:
- the object that is chained after creating the
RequestMatcher
.
-
mvcMatchers
public AuthorizeHttpRequestsConfigurer<H>.MvcMatchersAuthorizedUrl mvcMatchers(org.springframework.http.HttpMethod method, String... mvcPatterns) Description copied from class:AbstractRequestMatcherRegistry
Maps an
MvcRequestMatcher
that also specifies a specificHttpMethod
to match on. This matcher 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 a ant pattern will be used.
- Specified by:
mvcMatchers
in classAbstractRequestMatcherRegistry<AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder<H>>.AuthorizedUrl>
- Parameters:
method
- the HTTP method to match onmvcPatterns
- the patterns to match on. The rules for matching are defined by Spring MVC- Returns:
- the object that is chained after creating the
RequestMatcher
.
-
chainRequestMatchers
protected AuthorizeHttpRequestsConfigurer<H>.AuthorizedUrl chainRequestMatchers(List<RequestMatcher> requestMatchers) Description copied from class:AbstractRequestMatcherRegistry
Subclasses should implement this method for returning the object that is chained to the creation of theRequestMatcher
instances.- Specified by:
chainRequestMatchers
in classAbstractRequestMatcherRegistry<AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder<H>>.AuthorizedUrl>
- Parameters:
requestMatchers
- theRequestMatcher
instances that were created- Returns:
- the chained Object for the subclass which allows association of something
else to the
RequestMatcher
-
withObjectPostProcessor
public AuthorizeHttpRequestsConfigurer<H>.AuthorizationManagerRequestMatcherRegistry withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) Adds anObjectPostProcessor
for this class.- Parameters:
objectPostProcessor
- theObjectPostProcessor
to use- Returns:
- the
AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder<H>>.AuthorizationManagerRequestMatcherRegistry
for further customizations
-
shouldFilterAllDispatcherTypes
public AuthorizeHttpRequestsConfigurer<H>.AuthorizationManagerRequestMatcherRegistry shouldFilterAllDispatcherTypes(boolean shouldFilter) Sets whether all dispatcher types should be filtered.- Parameters:
shouldFilter
- should filter all dispatcher types. Default istrue
- Returns:
- the
AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder<H>>.AuthorizationManagerRequestMatcherRegistry
for further customizations - Since:
- 5.7
-
and
Return theHttpSecurityBuilder
when done using theAuthorizeHttpRequestsConfigurer
. This is useful for method chaining.- Returns:
- the
HttpSecurityBuilder
for further customizations
-