-
Notifications
You must be signed in to change notification settings - Fork 6k
Add Request AuthenticationManagerResolvers #7366
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
Conversation
@bdemers I remember you saying that you were taking a look at choosing JWT vs Opaque Token based on path. Will you take a look at this PR and see whether it would be helpful for what you are trying to do? |
@jzheaux This is great! I just had a chance to play around with this! One thing that feels odd is configuring the path matching in two different places. Line 63 in 2a3f03a
and again here: Lines 76 to 77 in 2a3f03a
These types of use-case may not be common enough to worry about that (and the OAuth configs are at the top level of Any idea of how this type of strategy will play with Boot's autoconfigure classes/properties ( That said, I'd love to use this as is today :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@jzheaux I was playing around with this again today, and noticed what the That seems to remove my concern about the paths being defined twice. I could do something like: LinkedHashMap<RequestMatcher, AuthenticationManager> authenticationManagers = new LinkedHashMap<>();
authenticationManagers.put(new AntPathRequestMatcher("/opaque/**"), opaque());
RequestMatchingAuthenticationManagerResolver authenticationManagerResolver = new RequestMatchingAuthenticationManagerResolver(authenticationManagers);
authenticationManagerResolver.setDefaultAuthenticationManager(jwt());
return authenticationManagerResolver; Assuming I'm seeing this correctly, this would (more or less) function the same way as the out of the box JWT Decoding (with some configuration differences). Where all paths are handled by the JWT decoder, except the special handling Very cool stuff! |
Woot!! |
Fixes gh-6762