Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
67 views
in Technique[技术] by (71.8m points)

python - Custom authentication in 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?

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

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

question from:https://stackoverflow.com/questions/1020736/custom-authentication-in-google-app-engine

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

There is a session utility in http://gaeutilities.appspot.com/

http://gaeutilities.appspot.com/session

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

Or,

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

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.

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

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 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...