问题描述
谷歌阅读器API今天似乎期待着什么不同的认证!
Google Reader API Seems expecting something different for authentication today!
大约一个星期前,我下载和一切工作,我要尽量端口去渣。对于我的code,它是(与您的示例的帮助下),完美的工作直到今天。我堆栈跟踪一切,我发现忽然谷歌阅读器不接受只SID的饼干。当然,我试运行示例应用程序,以及它不工作为好。
About a week ago, I downloaded this, and everything is working and I try to port that to java. For my code, it is working perfectly (with the help on your examples) until today. I stack tracing everything and I found out that suddenly the google reader is not accepting only SID as the cookie. And of course, I test run your sample application as well and it is not working as well.
然后我去篡改谷歌阅读器的数据,我删除cookie的每一个条目,除了SID,它不工作(以及它给了401,就像我的应用程序和样品);我再次测试,我发现它现在需要叫HSID,其中,比较SID(即超过100字长)另一饼干入口是约10-20字。任何一个知道我们在哪里可以得到额外的HSID?
Then I went to tamper the data of the Google Reader, and I remove every cookie entries except the SID, and it is not working (well it gives 401, just like my application and your sample); I tested again and I found that it now needs another cookie entry called HSID, which, compare to SID (which is more than 100 word long) it is about 10-20 words. Any one know where can we get that additional HSID?
PS我能为认证做HTTPS和谷歌将返回三个令牌(SID,LSID,AUTH)给我。但无处我可以猜到HSID是什么。
PS I can do the HTTPS for authentication and google is returning three tokens (SID, LSID, AUTH) to me. But nowhere I can guess what the HSID is.
推荐答案
我做到了。
是的,国家林业局提供的是正确的。但格式是有点过于混乱。
以下是我如何做到这一点。
I did it.Yes, the link provided by sfa is right. But the format is sort of too confusing.Here's how I do it.
- 发布到,提供登录凭据。
- 在回报,三个令牌将如果正确的登录进行传递:
一个。 SID
湾LSID
C。验证 - 保存验证某处的应用。忘掉SID和LSID(我猜他们可能会删除它们以后)
-
在每一项要求,添加在标题下面:
headername:授权
值:AUTH的GoogleLogin {=字符串验证}
例如(在Java)
- Post to https://www.google.com/accounts/ClientLogin with login credentials.
- In return, three tokens will be passed if correct login:a. SIDb. LSIDc. Auth
- Save the Auth somewhere in application. Forget about SID and LSID (I guess they might remove them later on)
In every request, add following in the header:headername: Authorizationvalue: GoogleLogin auth={Auth string}e.g. (in java)
HTTPGET方法=新HTTPGET(CommandUrl +查询字符串);
method.addHeader(授权,权威性的GoogleLogin =+验证);
HttpGet method = new HttpGet(CommandUrl + QueryString);method.addHeader("Authorization", "GoogleLogin auth=" + Auth);
这工作。感谢国家林业局的链接。
This works. Thanks sfa for the link.
这篇关于谷歌阅读器的身份验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!