Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultAuthenticationEventPublisher should be configurable via Map #7824

Closed
jzheaux opened this issue Jan 13, 2020 · 6 comments
Closed

DefaultAuthenticationEventPublisher should be configurable via Map #7824

jzheaux opened this issue Jan 13, 2020 · 6 comments
Assignees
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Jan 13, 2020

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.

@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement status: first-timers-only An issue that can only be worked on by brand new contributors labels Jan 13, 2020
@jzheaux jzheaux self-assigned this Jan 13, 2020
@akuma8
Copy link
Contributor

akuma8 commented Jan 31, 2020

Hi @jzheaux, can I take this one? Can you give me the 'how to' link? Thanks

@jzheaux
Copy link
Contributor Author

jzheaux commented Jan 31, 2020

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.

@zeeshanadnan
Copy link
Contributor

@jzheaux and @akuma8 if no one is working on this i would like to contribute on this one.

@akuma8
Copy link
Contributor

akuma8 commented Feb 3, 2020

@zeeshanadnan
Copy link
Contributor

@akuma8 thanks. Waiting for confirmation from @jzheaux

@jzheaux
Copy link
Contributor Author

jzheaux commented Feb 4, 2020

@zeeshanadnan thanks for reaching out - I think that @akuma8 is working on this one. (I see you found another ticket, too, which is great!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants