-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Add BearerTokenAuthenticationConverter #14791
base: main
Are you sure you want to change the base?
Conversation
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.
Will you please change BearerTokenAuthenticationFilter
to accept an AuthenticationConverter
? Also, OAuth2ResourceServerConfigurer
should configure this in the same way as BearerTokenResolver
. Will you please add that?
Finally, please add tests both for the new authentication converter and corresponding tests in OAuth2ResourceServerConfigurerTests
.
* @author Rob Winch | ||
* @since 6.3 | ||
*/ | ||
public abstract class AbstractBearerTokenAuthenticationConverter<R> { |
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.
I'd prefer to keep these object hierarchies separate. It reduces the possibility of package tangles. Will you please remove this abstract class?
Hi @jzheaux! Thanks for your feedback! I would like some advice on the best way to do this. I can add
But there are several problems.
Even if i declare method
And use it only when a custom
Not the most beautiful method, but it partially solves the problem. Next you will need to do something with
But I'm not sure about this solution. In addition, there may be a problem with |
42b96ff
to
e91cbc1
Compare
e91cbc1
to
3317b0d
Compare
Hi @jzheaux! I have added
Now it works with authenticationConverter or with bearerTokenResolver, but not with both. If a
In
Tests work as is. |
Hi @jzheaux ! Maybe it’s worth adding |
@CrazyParanoid, thanks for your patience as I have been out of town. We certainly want to remain passive and don't want to change behavior unnecessarily. Also, though, we don't typically add filter components that cannot be used by existing filters. I'll take a look at the PR this week and see if I can find a way to simplify things. Thank you for all your research details. |
Closes gh-14750