Skip to content

DefaultAuthenticationEventPublisher should be configurable via Map #7824

Closed
@jzheaux

Description

@jzheaux

DefaultAuthenticationEventPublisher can be configured with additional exception mappings via setAdditionalExceptionMappings(Properties).

It would be nice to overload this method to take a Map instead of a Properties object since Map is an interface and is more widely used.

To complete this ticket requires two steps, then:

  1. Add a new setAdditionalExceptionMappings(Map) method, e.g.:
public void setAdditionalExceptionMappings(Map<
        Class<? extends AuthenticationException> exceptionClass,
        Class<? extends AbstractAuthenticationFailureEvent> eventClass> mappings) {
    // ...
}

which loops through the Map in a similar way to how the existing method loops through the Properties object.

  1. Add tests

We need to add tests that ensure that the class acts appropriately if invalid values are passed into that method, e.g. a null map. We also need to test this method's happy path.

Metadata

Metadata

Assignees

Labels

in: webAn issue in web modules (web, webmvc)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions