从基于 GAE 的应用程序获取身份验证 Cookie 的正确 URL 是什么
我有一个 Android 应用程序,我想连接到基于 Google App Engine 的服务器。我可以从 AccountManager 获取身份验证令牌。看来我接下来要做的就是与身份验证页面对话以获取 cookie。按照此处的精彩说明进行操作: http:// /blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app 我认为我的 url 应该是:
https://MYAPP.appspot.com/_ah/login?continue=http://localhost/&auth=CrAZYl000ngToken
但我收到的不是重定向,而是 500 服务器错误:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message
and the query that caused it.
这是怎么回事?我应该访问的 URL 是什么?或者也许我做错了什么?
I have an android app I want to connect to a Google App Engine based server. I can get the auth token from the AccountManager. It seems the next thing I am supposed to do is talk to an auth page to get a cookie. Following the awesome instructions here: http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app
I think my url should be:
https://MYAPP.appspot.com/_ah/login?continue=http://localhost/&auth=CrAZYl000ngToken
but rather than a redirect, I get a 500 server error:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message
and the query that caused it.
What's up with that? What is the URL I am supposed to be going to? Or maybe I'm doing something else wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,网址毕竟没有错。问题是令牌已过期。我能够通过使令牌失效并重新获取令牌来解决这个问题。
OK, the URL wasn't wrong after all. The problem was that the token was expired. I was able to solve this by invalidating and re-fetching the token.