Class RequestMatcherDelegatingAuthorizationManager.Builder
java.lang.Object
org.springframework.security.web.access.intercept.RequestMatcherDelegatingAuthorizationManager.Builder
- Enclosing class:
- RequestMatcherDelegatingAuthorizationManager
A builder for
RequestMatcherDelegatingAuthorizationManager.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classAn object that allows configuring theAuthorizationManagerforRequestMatchers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(RequestMatcher matcher, AuthorizationManager<RequestAuthorizationContext> manager) Maps aRequestMatcherto anAuthorizationManager.Maps any request.build()Creates aRequestMatcherDelegatingAuthorizationManagerinstance.mappings(Consumer<List<RequestMatcherEntry<AuthorizationManager<RequestAuthorizationContext>>>> mappingsConsumer) Allows to configure theRequestMatchertoAuthorizationManagermappings.requestMatchers(RequestMatcher... matchers) MapsRequestMatchers toAuthorizationManager.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
add
public RequestMatcherDelegatingAuthorizationManager.Builder add(RequestMatcher matcher, AuthorizationManager<RequestAuthorizationContext> manager) Maps aRequestMatcherto anAuthorizationManager.- Parameters:
matcher- theRequestMatcherto usemanager- theAuthorizationManagerto use- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builderfor further customizations
-
mappings
public RequestMatcherDelegatingAuthorizationManager.Builder mappings(Consumer<List<RequestMatcherEntry<AuthorizationManager<RequestAuthorizationContext>>>> mappingsConsumer) Allows to configure theRequestMatchertoAuthorizationManagermappings.- Parameters:
mappingsConsumer- used to configure theRequestMatchertoAuthorizationManagermappings.- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builderfor further customizations - Since:
- 5.7
-
anyRequest
Maps any request.- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrlfor further customizations - Since:
- 6.2
-
requestMatchers
public RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl requestMatchers(RequestMatcher... matchers) MapsRequestMatchers toAuthorizationManager.- Parameters:
matchers- theRequestMatchers to map- Returns:
- the
RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrlfor further customizations - Since:
- 6.2
-
build
Creates aRequestMatcherDelegatingAuthorizationManagerinstance.- Returns:
- the
RequestMatcherDelegatingAuthorizationManagerinstance
-