What steps will reproduce the problem?
1. Set up apiClient using class in apiOAuth as auth class in config
2. Run authentication with redirect set to authorization method.
3. Upon receiving authorization code the authenticate method will try to make
the exchange for an access token.
4. Because the access_type is not set, no refresh_token is sent back causing a
validation error on setAccessToken()
What is the expected output? What do you see instead?
After creating the Auth url (auth/apiOAuth2 #91) for the authorization grant
and getting back the parameter "code" the authenticate method should request an
access token. When successful the setAccessToken in apiOAuth2 class should run
correctly but throws apiAuthException("Invalid token format") instead.
What version of the product are you using? On what operating system?
google-api-php-client 0.47
PHP 5.3.6
Fedora 2.6.35.14-96.fc14.i686.PAE
Please provide any additional information below.
According to the documents
(http://code.google.com/p/google-api-php-client/wiki/OAuth2), refresh_token
only returns when when access_type is set to offline on authorization. But the
setAccessToken method in apiOAuth2 throws an exception when refresh_token is
not set (auth/apiOAuth2 #107).
Original issue reported on code.google.com by ijohn...@eng.compendiumblogware.com on 10 Dec 2011 at 1:40
Original issue reported on code.google.com by
ijohn...@eng.compendiumblogware.com
on 10 Dec 2011 at 1:40