Hello,
I am trying to use spring-security-oauth's OAuth2 support to integrate with Google, and I am facing a couple of issues. Can someone please share some inputs?
1) It seems Google returns access tokens with token type as "Bearer". OAuth2ClientHttpRequestFactory cannot handle it, as it only handles the cases where token type comes as "OAuth2", or doesn't come at all.
2) It seems that Google uses "authorization" header as "OAuth <access token>". If I use bearerTokenMethod as "header", then the spring-security-oauth library sends the header as "OAuth2 <access token>", which Google does not understand. And if I use the bearerTokenMethod as "query", then the problem is that the library URL encodes the token value - so a token issued by Google as "1/Whxxxxx" becomes "1%252FWhxxxxx", and the authorization still fails.
Can anyone more experienced throw some light on it please?
Thanks,
Roshan


Reply With Quote
