是否可以在开发服务器上测试Google App Engine OpenID身份验证? [英] Is it possible to test Google App Engine OpenID authentication on development Server?

查看:108
本文介绍了是否可以在开发服务器上测试Google App Engine OpenID身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试 OpenID 支持谷歌上的小项目我有我的计算机上,但应用程序引擎时,我打电话:



users.create_login_url(federated_identity = PROVIDER_URL)

我收到此错误:

  google_appengine / google /应用服务引擎/ API / user_service_pb.py,线178,在ByteSize 
N + = self.lengthString(LEN(self.destination_url_))
类型错误:类型为 'NoneType' 对象没有LEN()

provider_url < https://www.google.com/accounts/o8/id



任何线索?

解决方案

你通常应该通过一个 DEST_URL 参数 create_login_url ,除非你肯定有一个 当前请求,其显然,后者的条件并没有获得,所以目的地的网址保留,这会导致您正在观察的问题。传递一个明确的 dest_url 应该可以解决它。


I'm trying OpenID support for Google App Engine on a small project i have on my machine but when i call:

users.create_login_url(federated_identity = provider_url)

i get this error:

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()

provider_url is https://www.google.com/accounts/o8/id

any clue?

解决方案

You should normally pass a dest_url parameter to create_login_url, unless you're certain that there is a "current request" whose url you want to use instead. Apparently, the latter condition does not obtain, so the destination url stays None, which causes the problem you're observing. Passing an explicit dest_url should fix it.

这篇关于是否可以在开发服务器上测试Google App Engine OpenID身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆