带有rpxnow的Google App Engine的db.UserProperty [英] Google App Engine's db.UserProperty with rpxnow

查看:42
本文介绍了带有rpxnow的Google App Engine的db.UserProperty的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Django项目,该项目在Google App Engine上运行,并在几种模型中使用了 db.UserProperty .我们没有自己的用户模型.

We have a Django project which runs on Google App Engine and used db.UserProperty in several models. We don't have an own User model.

我的老板想使用RPXNow(Janrain)进行身份验证,但是在将其集成后, users.get_current_user()方法返回了 None .这是有道理的,因为没有Google对我进行身份验证.但是,我应该对 db.UserProperty 属性使用什么?可以使用rpxnow并且仍然可以拥有Google的User对象吗?

My boss would like to use RPXNow (Janrain) for authentication, but after I integrated it, the users.get_current_user() method returned None. It makes sense, because not Google authenticated me. But what should I use for db.UserProperty attributes? Is it possible to use rpxnow and still can have Google's User object as well?

此后,我尝试在应用程序中使用OpenID身份验证(具有联合登录名),并且效果很好:我仍然有 users.get_current_user()对象.据我所知,rpxnow也使用openID,这(对我而言)意味着可以使用rpxnow获取User对象.但是如何?

After this I tried to use OpenID authentication (with federated login) in my application, and it works pretty good: I still have users.get_current_user() object. As far as I know, rpxnow using openID as well, which means (for me) that is should be possible to get User objects with rpxnow. But how?

干杯,psmith

推荐答案

如果使用内置身份验证方法之一,则只能获取User对象.用户对象提供了与用户API的接口,该接口由App Engine基础结构处理.如果您使用自己的身份验证库,则无论使用哪种协议,都必须以不同的方式存储用户信息.

You can only get a User object if you're using one of the built-in authentication methods. User objects provide an interface to the Users API, which is handled by the App Engine infrastructure. If you're using your own authentication library, regardless of what protocol it uses, you will have to store user information differently.

这篇关于带有rpxnow的Google App Engine的db.UserProperty的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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