我正在开发一个使用python-openid的Django应用程序.该应用程序正在我家的开发服务器上运行.
与stackoverflow的登录机制类似,我希望用户使用他们的Google凭据登录我的网站.
我实现这个代码的代码,运行了几个星期,然后停止工作.我在以下Google网页的登录过程中遇到问题:https: //www.google.com/accounts/o8/ud并显示以下消息:"您请求的页面无效." 它将随机重新开始工作,但每隔几周就会失败一次.
通过雅虎的登录工作了几个月,今天已停止使用以下消息:"此页面已过期,请返回原始页面,请再试一次"在此页面上:https://open.login.yahooapis.com /的OpenID/OP/AUTH
以下是LiveHttpHeaders for Google捕获的请求:
https://www.google.com/accounts/o8/ud
POST /accounts/o8/ud HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042513 Ubuntu/8.04 (hardy) Firefox/3.0.10
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: 300
Connection: keep-alive
Referer: http://127.0.0.1:8000/users/login/
Content-Length:907
openid.ax.if_available=ext1&openid.mode=checkid_setup&openid.ns=http://specs.openid.net/auth/2.0&openid.realm=http://127.0.0.1:8000/accounts/login/&openid.return_to=http://127.0.0.1:8000/users/login/finish/?janrain_nonce=2009-10-05T19%3A10%3A11ZtioiRm&openid.ax.count.ext1=unlimited&openid.ax.mode=fetch_request&openid.sreg.optional=email&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.ns.sreg=http://openid.net/extensions/sreg/1.1&openid.ns.ax=http://openid.net/srv/ax/1.0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle=AOQobUcnzec0bpeZRztjqPrr5TQUA0aPL7SIuOPOMgWxex2HRAP09AyJ&openid.ax.required=ext0&openid.ax.type.ext0=http://schema.openid.net/namePerson&openid.ax.type.ext1=http://schema.openid.net/contact/web/default
HTTP/1.x 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Run Code Online (Sandbox Code Playgroud)
我不确定这里发生了什么,并希望得到一些帮助.
您使用的代码似乎生成了错误的 URL 请求。真实的 URL 是https://www.google.com/accounts/o8/id,因此请尝试修复最后的“ud”,将其更改为“id”。
希望这可以帮助!
| 归档时间: |
|
| 查看次数: |
1109 次 |
| 最近记录: |