Reputation: 21
I connect only to Auth server and i need the JWT, by console is all ok, but not RestTemplate, i haven't idea how to do.
What would be the equivalent of the following:
curl -u secretId:secret http://localhost:9999/uaa/oauth/token -d username=user-d password=password -d grant_type=password
I need to use Spring RestTemplate, any idea how to?.
thanks and regards
Upvotes: 0
Views: 439
Reputation: 291
Some references: 1. How to use OAuth2RestTemplate?. 2. http://websystique.com/spring-security/secure-spring-rest-api-using-oauth2/ 3.http://howtodoinjava.com/spring/spring-restful/spring-restful-client-resttemplate-example/
Upvotes: 0