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

查看:34
本文介绍了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?

推荐答案

今天在 Google AppEngine 上更新了 django 1.0.但是您可以像其他任何事情一样进行用户身份验证,因为它非常庞大,因此您无法真正使用会话.

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/ 中有一个会话实用程序

There is a session utility in 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 配置文件 (http://code.google.com/p/openid-selector/).

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天全站免登陆