Class RequestMatcherDelegatingAuthorizationManager.Builder
java.lang.Object
org.springframework.security.web.access.intercept.RequestMatcherDelegatingAuthorizationManager.Builder
- Enclosing class:
- RequestMatcherDelegatingAuthorizationManager
A builder for
RequestMatcherDelegatingAuthorizationManager
.-
Nested Class Summary
Modifier and TypeClassDescriptionfinal class
An object that allows configuring theAuthorizationManager
forRequestMatcher
s. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(RequestMatcher matcher, AuthorizationManager<RequestAuthorizationContext> manager) Maps aRequestMatcher
to anAuthorizationManager
.Maps any request.build()
Creates aRequestMatcherDelegatingAuthorizationManager
instance.mappings
(Consumer<List<RequestMatcherEntry<AuthorizationManager<RequestAuthorizationContext>>>> mappingsConsumer) Allows to configure theRequestMatcher
toAuthorizationManager
mappings.requestMatchers
(RequestMatcher... matchers) MapsRequestMatcher
s toAuthorizationManager
.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
add
public RequestMatcherDelegatingAuthorizationManager.Builder add(RequestMatcher matcher, AuthorizationManager<RequestAuthorizationContext> manager) Maps aRequestMatcher
to anAuthorizationManager
.- Parameters:
matcher
- theRequestMatcher
to usemanager
- theAuthorizationManager
to use- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builder
for further customizations
-
mappings
public RequestMatcherDelegatingAuthorizationManager.Builder mappings(Consumer<List<RequestMatcherEntry<AuthorizationManager<RequestAuthorizationContext>>>> mappingsConsumer) Allows to configure theRequestMatcher
toAuthorizationManager
mappings.- Parameters:
mappingsConsumer
- used to configure theRequestMatcher
toAuthorizationManager
mappings.- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builder
for further customizations - Since:
- 5.7
-
anyRequest
Maps any request.- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl
for further customizations - Since:
- 6.2
-
requestMatchers
public RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl requestMatchers(RequestMatcher... matchers) MapsRequestMatcher
s toAuthorizationManager
.- Parameters:
matchers
- theRequestMatcher
s to map- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl
for further customizations - Since:
- 6.2
-
build
Creates aRequestMatcherDelegatingAuthorizationManager
instance.- Returns:
- the
RequestMatcherDelegatingAuthorizationManager
instance
-