-
Notifications
You must be signed in to change notification settings - Fork 1.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 RESTful Dubbo Integration with Spring Security and OAuth2 Sample #1193
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.
The path might not be right.
LGTM |
|
||
assertEquals("\"Hello, World\"", userResponse, "error"); | ||
} catch (RestClientResponseException e) { | ||
System.err.println("Error Response: " + e.getResponseBodyAsString()); |
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.
This catch will cause the result of the exception to succeed
String accessToken = jsonNode.get("access_token").asText(); | ||
|
||
// Use the access token to authenticate the request to the /user endpoint | ||
assert accessToken != null; |
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.
Please also add a scenario when the accessToken is invalid
This pull request introduces a sample project that demonstrates how to integrate Dubbo with RESTful APIs, incorporating Spring Security and OAuth2 for authentication and authorization. The sample showcases the following key functionalities: