-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Expose RestOperations in DefaultOAuth2UserService and CustomUserTypesOAuth2UserService #5641
Conversation
f875912
to
53027f6
Compare
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.
My initial round of feedback is the same as #5656 (comment)
53027f6
to
86dc84a
Compare
|
||
// A Bearer Token Error may be in the WWW-Authenticate response header | ||
// See https://tools.ietf.org/html/rfc6750#section-3 | ||
OAuth2Error oauth2Error = this.readErrorFromWwwAuthenticate(response.getHeaders()); |
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.
GitHub doesn't show it, but there is a tab between OAuth2Error oauth2Error
. Please change this to a space to be consistent formatting.
|
||
@Before | ||
public void setup() { | ||
ClientRegistration clientRegistration = ClientRegistration.withRegistrationId("registration-1") |
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.
Could use leverage TestClientRegistrations here?
this.userRequest.getAccessToken().getTokenValue()); | ||
} | ||
|
||
private ClientRegistration.Builder from(ClientRegistration registration) { |
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 could remove this method by creating a ClientRegistration.Builder as a member variable and then you can modify it in the tests before building. Alternatively, you could also directly use TestClientRegistrations and modify it. I'd probably prefer the layer of indirection with the member variable so refactoring would be easier.
@rwinch I applied the updates based on your feedback. |
Fixes gh-5600, Fixes gh-5602