Google应用引擎联合(openid)登录localhost

时间:2010-12-19 15:17:57

标签: google-app-engine authentication openid

我正在尝试使用this脚本与Google的应用引擎进行联合登录。这适用于部署的应用程序引擎,但使用localhost时会出现此错误:

Traceback (most recent call last):
  File "/workspace/python/app_en/google_appengine/google/appengine/ext/webapp/__init__.py", line 515, in __call__
    handler.get(*groups)
  File "/workspace/python/app_en/bingousie/helloworld.py", line 23, in get
    p['login_url'] = users.create_login_url(federated_identity=p_url)
  File "/workspace/python/app_en/google_appengine/google/appengine/api/users.py", line 216, in create_login_url
    apiproxy_stub_map.MakeSyncCall('user', 'CreateLoginURL', req, resp)
  File "/workspace/python/app_en/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 86, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "/workspace/python/app_en/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 286, in MakeSyncCall
    rpc.CheckSuccess()
  File "/workspace/python/app_en/google_appengine/google/appengine/api/apiproxy_rpc.py", line 149, in _WaitImpl
    self.request, self.response)
  File "/workspace/python/app_en/google_appengine/google/appengine/api/apiproxy_stub.py", line 73, in MakeSyncCall
    if request.ByteSize() > self.__max_request_size:
  File "/workspace/python/app_en/google_appengine/google/appengine/api/user_service_pb.py", line 178, in ByteSize
    n += self.lengthString(len(self.destination_url_))
TypeError: object of type 'NoneType' has no len()

这是因为openid服务器不允许登录本地站点吗?如果是,那么它为什么不至少与myopenid.com一起工作(我在本地服务器上使用它进行我的django openid认证)。

1 个答案:

答案 0 :(得分:4)

create_login_url电话中,您应指定dest_url参数。

  

dest_url可以是完整的URL或路径   相对于您的应用程序的域。

我遇到了同样的问题here