-
Notifications
You must be signed in to change notification settings - Fork 6.1k
OAuth2ResourceServerSpec should allow its ServerAuthenticationConverter to be configurable #6190
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
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.
@edeandrea This looks awesome! I left just one ask in your unit test.
Could you please also format your commit message so that the title is a bit shorter?
// @formatter:off | ||
http | ||
.authorizeExchange() | ||
.anyExchange().access(authorizationManager()) |
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.
Is there a reason you need this extra instrumentation, as opposed to something like
.anyExchange().access(authorizationManager()) | |
.anyExchange().hasAuthority("SCOPE_message:read") |
If we can, it's nice to be able to reduce the number of moving parts in a test.
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.
You are correct I can switch this test. I will issue a new commit that changes this.
@jzheaux I pushed a new commit and rebased so the commit message is better. Sorry about that! |
Also - any chance of getting this in pre 5.2? |
@edeandrea This can only get into 5.2 since bearerTokenConverter(...) is new |
@jgrandja bearerTokenConverter(...) is what I added in the PR. There aren't any new classes or anything added in this PR - just a change to the configuration DSL. |
@edeandrea The new method in the DSL is a new symbol so it cannot be added in a patch release - only a minor or major release. Makes sense? See versioning |
Got it - thanks for the explanation @jgrandja. |
Thanks for the PR, @edeandrea! This is now merged into |
Fixes gh-6186