Dj-Corps / gwt-oauth2

Automatically exported from code.google.com/p/gwt-oauth2
Apache License 2.0
0 stars 0 forks source link

requesting authorization code instead of access token #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to request authorization code instead of access token as return 
value?

My application needs to run a long-running job in the backend server that 
should access user's Google Spreadsheet once a day.

In such a case authorization code works better than access token, as the 
following (See "Response_type parameter") mentions.
http://code.google.com/apis/accounts/docs/OAuth2Login.html

Thanks!
Hyun

Original issue reported on code.google.com by hy...@google.com on 15 Feb 2012 at 7:07

GoogleCodeExporter commented 9 years ago
In that case you will need to use a server-based approach. The spec doesn't
support getting a code from a pure JS environment.

Original comment by jasonhall@google.com on 15 Feb 2012 at 7:30

GoogleCodeExporter commented 9 years ago
I need this feature too. I want to get a "code" response_type instead of a 
"token" response-type in order to get a refresh token in the backend site of my 
GWT app. See https://developers.google.com/accounts/docs/OAuth2WebServer

I try yo override "toURL" method to do this but the Auth.URLCodex class is not 
visible in my code package. It would be great if the "token" parameter could be 
override by a method or something like that.

Thanks

Original comment by mima...@gmail.com on 16 Jul 2012 at 12:05