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:
- 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.
- 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.
Comment From: akuma8
Hi @jzheaux, can I take this one? Can you give me the 'how to' link? Thanks
Comment From: jzheaux
Sure, @akuma8, happy to help. What do you mean by "how to" link? The contribution guide is good to read before getting started with code changes.
Comment From: zeeshanadnan
@jzheaux and @akuma8 if no one is working on this i would like to contribute on this one.
Comment From: akuma8
@zeeshanadnan There are other kind of issues here https://github.com/spring-projects/spring-security/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+first-timers-only%22 You can take the first one.
Comment From: zeeshanadnan
@akuma8 thanks. Waiting for confirmation from @jzheaux
Comment From: jzheaux
@zeeshanadnan thanks for reaching out - I think that @akuma8 is working on this one. (I see you found another ticket, too, which is great!)