Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/322.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 从联合身份生成唯一的数据存储密钥_Python_Google App Engine_Authentication - Fatal编程技术网

Python 从联合身份生成唯一的数据存储密钥

Python 从联合身份生成唯一的数据存储密钥,python,google-app-engine,authentication,Python,Google App Engine,Authentication,我需要一个唯一的数据存储密钥,供用户使用谷歌应用程序引擎的Python2.7运行时通过openid进行身份验证 我应该使用User.federated\u identity()还是User.federated\u provider()+User.federated\u identity() 换句话说,User.federated\u identity()对所有提供者都是唯一的,还是只对一个特定的提供者是唯一的 User.federated_identity()“返回用户的OpenID标识符。”,

我需要一个唯一的数据存储密钥,供用户使用谷歌应用程序引擎的Python2.7运行时通过openid进行身份验证

我应该使用
User.federated\u identity()
还是
User.federated\u provider()+User.federated\u identity()


换句话说,
User.federated\u identity()
对所有提供者都是唯一的,还是只对一个特定的提供者是唯一的

User.federated_identity()
“返回用户的OpenID标识符。”,该标识符在定义上是唯一的(它是唯一标识用户的URL)。

感谢您的响应。我对GAE文档感到困惑,该文档声明User.User_id()对于非google帐户将不返回任何值。至少在我最初的(云)测试中,它似乎为所有开放id提供者返回了一个值。因为我使用的是惯用语“.user\u id()或.federated\u id()”,所以我从来没有看到实际的federated\u id值。在开发服务器上时,我将逻辑更改为user-user\u-id,否则更改为federated\u-id,现在我可以看到它们显然是唯一的。