bistri/scribe-java — pull request #2 by tfredrich (2012-06-14 19:05:56+00:00)
Title: Added grant_type to query string in OAuth20ServiceImpl.getAccessToken()

Thanks for your work on scribe-java for Google OAuth2! In using it, I found that Google requires grant_type within the request to get the access token per: https://developers.google.com/accounts/docs/OAuth2WebServer which states...

After the web server receives the authorization code, it may exchange the authorization code for an access token and a refresh token. This request is an HTTPs post, and includes the following parameters:
code The authorization code returned from the initial request
client_id The client_id obtained during application registration
client_secret The client secret obtained during application registration
redirect_uri The URI registered with the application
grant_type As defined in the OAuth 2.0 specification, this field must contain a value of authorization_code

Made the one-line change to make that happen, checking config.hasGrantType() first. If there's a better way to do it or another place that's better, I'm certainly open to hearing it.

Also, updated to version 1.3.2-patched just so I could keep things straight...

I see that you've already made a pull request to fernandezpablo85/scribe-java for your Google 2.0 changes. I'm hoping this will get pulled along also.

Thanks again,
--Todd