Can somebody provide some sample code for the oauth 2 Resource Owner Password Grant Type?
68 views
Skip to first unread message
john....@gmail.com
unread,
Feb 3, 2015, 4:18:32 PM2/3/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-oauth...@googlegroups.com
I would like to use the google-oauth-java client to use the Resource Owner Password Grant Type.
So it would need to do something like this:
curl -v -X POST curl -v -X POST -d client_id=someclient&client_secret=xxx&grant_type=password&sername=admin&password=adminhttps://localhost:9443/oauth2/token
and from then on use the received access_token or if necessary the refresh_token?
Can this useless be done with the google-oauth-java client library?
Daniel Wang
unread,
Feb 3, 2015, 5:01:52 PM2/3/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-oauth...@googlegroups.com
Yes, Resource Owner Password Credentials Grant is implemented in this library. The Javadoc for PasswordTokenRequest has an example that does pretty much exactly what you are asking for: