Django openid auth - first stab
Jan 6th, 2006 by Phil Dawes
I’ve been experimenting with adding openid authentication to django. I couldn’t find another software package to do this (although I did see this, which implies there is some other code out there)
Anyway - here’s mine so far.
The main problem I’ve hit is that the username column in the django authentication db schema (v0.90) only has 30 characters, so I can’t use the openid url as the username.
Instead I’m currently using the first 30 chars of an md5 hash of the url, which sucks. I probably need to create a new openid auth model which holds the openid url and adds a view for getting new users to create a unique username (or something). Or maybe I should contact the django developers about expanding this?… hmm..

Forgot to mention - the simplest way to test this is to use the example/server.py module from the python-openid package. Have updated the README in the file to reflect this.
Hey,
It’s great to see someone else messing with OpenID + Django. I’m going to be working on this same thing soon, so I’ll be interested to hear more if you find a good way to make this work. This may be helplful if you haven’t already tried it:
http://code.djangoproject.com/wiki/ExtendedUserModel
Cool - thanks. I’ll take a look
I’m pretty sure this breaks on 0.91 (possibly because of my stupidity).
This looks great! I’ll be writing my own implementation soon.
(This should be integrated into the trunk)