Google App Engine中的自定义身份验证 [英] Custom authentication in Google App Engine

查看:73
本文介绍了Google App Engine中的自定义身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道或知道我可以在某个地方学习如何使用Python和Google App Engine创建自定义身份验证过程吗?

Does anyone know or know of somewhere I can learn how to create a custom authentication process using Python and Google App Engine?

我不想使用Google帐户进行身份验证,并且希望能够创建自己的用户.

I don't want to use Google accounts for authentication and want to be able to create my own users.

如果不是专门针对Google App Engine,是否有关于如何使用Python和Django实现身份验证的资源?

If not specifically for Google App Engine, any resource on how to implement authentication using Python and Django?

推荐答案

django 1.0很好,今天在Google AppEngine上进行了更新.但是,您可以使用户身份验证像其他任何您实际上不能使用的会话一样进行,因为它是如此庞大.

Well django 1.0 was updated today on Google AppEngine. But you can make user authentication like anything else you just can't really use sessions because it is so massive.

http://gaeutilities.appspot.com/

http://gaeutilities.appspot.com/session

http://code.google.com/p/gaeutilities/

或者

您必须创建自己的用户表,对哈希进行哈希处理或加密密码,然后可能创建一个令牌系统,该系统仅使用令牌哈希或uuid cookie(无论如何会话都是cookie)来模拟会话.

You have to create your own user tables and hash or encrypt passwords, then probably create a token system that mimics session with just a token hash or uuid cookie (sessions are just cookies anyways).

我已经用基本的google.webapp请求和响应标头实现了一些.我通常使用uuid作为主键作为用户ID,然后对用户密码进行加密,并让其电子邮件进行重置.

I have implemented a few with just basic google.webapp request and response headers. I typically use uuids for primary keys as the user id, then encrypt the user password and have their email for resets.

如果您想授权用户外部访问数据,可以查看OAuth进行应用程序访问.

If you want to authorize users for external access to data you could look at OAuth for application access.

如果您只想按ID存储数据,并且面向更多用户,则可以使用像stackoverflow这样的openid,然后将配置文件数据附加到该标识符(如django配置文件)(

If you just want to store data by an id and it is more consumer facing, maybe just use openid like stackoverflow and then attach profile data to that identifier like django profiles (http://code.google.com/p/openid-selector/).

django 1.0刚刚在GAE上发布,但是我认为存在相同的问题,没有会话,您必须真正创建自己的存储会话数据的

django 1.0 just came out today on GAE but I think the same problems exist, no sessions, you have to really create your own that store session data.

这篇关于Google App Engine中的自定义身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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