I tried running a web debugging proxy tool. And here's what I got.
1. First, I visited http://localhost:8080/app/google/test
Proxy showed the request/response:
Request:
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Cookie: JSESSIONID=114C691A27CC1BC66DDAF8695E665046
Response:
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: https://accounts.google.com/o/oauth2...y&state=A72Yqi
Content-Length: 0
Date: Mon, 11 Jun 2012 13:10:27 GMT
2. Then the browser window showed the Google Analytics authentication page. The browser's URL box shows the following URL:
https://accounts.google.com/o/oauth2...y&state=A72Yqi
3. Then I clicked on allow/authorize button
Proxy showed the request/response:
Request:
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Cookie: JSESSIONID=114C691A27CC1BC66DDAF8695E665046
Response:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Date: Mon, 11 Jun 2012 13:11:20 GMT
Connection: close
4. Then the browser should the following exception:
Code:
error="access_denied", error_description="Access token denied."
org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport.retrieveToken(OAuth2AccessTokenSupport.java:93)
org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeAccessTokenProvider.obtainAccessToken(AuthorizationCodeAccessTokenProvider.java:161)
org.springframework.security.oauth2.client.token.AccessTokenProviderChain.obtainNewAccessTokenInternal(AccessTokenProviderChain.java:120)
Code:
error="invalid_request", error_description="invalid_request"
org.springframework.security.oauth2.common.exceptions.OAuth2ExceptionDeserializer.deserialize(OAuth2ExceptionDeserializer.java:81)
org.springframework.security.oauth2.common.exceptions.OAuth2ExceptionDeserializer.deserialize(OAuth2ExceptionDeserializer.java:30)
org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2391)
org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1651)
Unfortunately I can't get much from proxying accounts.google.com (maybe due to some security scheme). However I noticed the following status:
https://ssl.google-analytics.com
Failed
SSLHandshake: Received fatal alert: bad_certificate
I don't know if that has something to do with the Proxy tool I'm using or it's a server issue or an app issue.
I'm sorry though I tried setting that use-current-uri="false" but with the same issue.
Do you think it would help if I provide you a barebones Maven project with this current issue. Of course, you might need to create your own Google Analytics account and register an ID via the Google API Console? If this would help, I would gladly provide one.
Or file a JIRA? But at what title and error type?