`
wangcheng
  • 浏览: 1454790 次
  • 性别: Icon_minigender_1
  • 来自: 青岛人在北京
社区版块
存档分类
最新评论

Google AuthenticationException: 403: Invalid AuthSub token

    博客分类:
  • java
阅读更多

给客户的网站做了Google Authentication认证,一直都好用的,这几天突然注册不上新用户了

 

com.google.gdata.util.AuthenticationException: 403: Invalid AuthSub token.
        at com.google.gdata.client.http.AuthSubUtil.exchangeForSessionToken(AuthSubUtil.java:309)
        at com.google.gdata.client.http.AuthSubUtil.exchangeForSessionToken(AuthSubUtil.java:275)

 

代码没改过,证书也没变,Googling

 

http://www.google.com/support/forum/p/apps-apis/thread?tid=16306d02c282e8d3&hl=en

 

只要添加 URLDecoder.decode 就可以了

 

	String token = request.getQueryString();
	String oneTimeUseToken = AuthSubUtil.getTokenFromReply(token);
	oneTimeUseToken = URLDecoder.decode(oneTimeUseToken, "UTF-8");
	String sessionToken = AuthSubUtil.exchangeForSessionToken(oneTimeUseToken, privateKey);
 

 

参考

 

http://code.google.com/intl/fr/apis/gdata/docs/auth/authsub.html

 

http://code.google.com/intl/fr/apis/gdata/docs/auth/overview.html

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics