hgoebl / DavidWebb

Lightweight Java HTTP-Client for calling JSON REST-Services (especially for Android)
https://hgoebl.github.io/DavidWebb/
MIT License
127 stars 41 forks source link

Oauth2 #34

Closed mariobuc closed 5 years ago

mariobuc commented 5 years ago

Goodnight.

I need to consume rest services that are protected by oauth2. Does this library help me to consume these services? Can I, with her, for example, make a post to my authentication server by sending the clientid and the secret in the authorization, and in the body the username, password, and type of grant type? to get a token, and things about these?

thank you

hgoebl commented 5 years ago

The lib is able to make HTTP(S) requests, set headers, follow redirects and so on. OAuth is just an application of that. So short answer: yes, it should be possible to use it for this purpose.

For learning how to use OAuth2, please consult the documentation or ask on StackOverflow.