Skip to content

Simplify RequestMatcherDelegatingAuthorizationManager.Builder matcher registration #11624

Closed
@jzheaux

Description

@jzheaux

It would be easier to use RequestMatcherDelegatingAuthorizationManager.Builder if it used builder methods similar to MessageMatcherDelegatingAuthorizationManager.Builder.

Specifically, it would be nice to be able to do things like the following:

RequestMatcherDelegatingAuthorizationManager.builder()
    .requestMatchers(new RegexRequestMatcher(...)).hasAuthority("message:read")
    .requestMatchers(new RegexRequestMatcher(...)).hasAuthority("message:read")
    .anyRequest().authenticated()
    .build();

Then, when applications need to decorate AuthorizationManager behavior, they can still take advantage of the authorization DSL.

Given #11347, this ticket should only introduce anyRequest and requestMatchers.

Metadata

Metadata

Labels

in: webAn issue in web modules (web, webmvc)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions