Export to GitHub

django-openid - issue #9

support of user contrib


Posted on Aug 14, 2007 by Quick Camel

I started to implement the support of user contrib application in django-openid.

Basically it create a user with openid as username (without http) and create user session. If openid is already registered it only create the session.

What need to be done : - find a way to fille firstname and lastname. - authentification backend ? For now backend isn't set in session. It use a custom login function.

Attachments

Comment #1

Posted on Aug 14, 2007 by Quick Camel

urls.py was missing in the diff. here it is.

Attachments

Comment #2

Posted on Aug 14, 2007 by Quick Camel

new version of my patch. Changes : - you could enable/disable use of django-openid with OPENID_WITH_AUTH setting. By default it is true. - user backend is set to basic backend. - use of default login function - delete from sreg nickname and email if they are presents.

It works well yet. This patch is against trunk btw.

Attachments

Comment #3

Posted on Aug 15, 2007 by Quick Camel

I imporoved my previous diff. Now it use the ma.gnolia workflow (http://ma.gnolia.com/signin) to work with auth:

-User can sign ins with hi username or openid on signin form. - If openid isn't associated to a username he could associated it with a previous registered user or create a new one. BY default nickname and email are get from openid account.

Changes : - openid can still be used alone with OPENID_WITH_AUTH - redirect url (/complete or custom) is now get from urls patterns - new view for openid association. - forms are based now on newsforms. - started t make it multilingual

Find diff attached.

Attachments

Comment #4

Posted on Aug 15, 2007 by Quick Camel

New diff with fixed bug and some code refactoring in view of reducing it.

Bugs fixed: - User authentificated is now rerouted to next page automatically - On signin page, forms are now validated. - On complete page : test if email is already registered. Now validate errors in forms

Refactoring: - Now only one signin template. - 2 forms are used on signin form to easy validation. Code is also easier to read.

Tested. Seems to work well here. Now waiting for comment :)

Attachments

Comment #5

Posted on Aug 18, 2007 by Quick Camel

quickfix against my previous patch. Now when register is called directly with no openid, return to signin page.

Attachments

Comment #6

Posted on Sep 4, 2007 by Happy Monkey

Is there any documentation for the patch? The comments seem promising but without the documentation it is not usable.

Comment #7

Posted on Sep 6, 2007 by Quick Camel

Comment deleted

Status: New

Labels:
Type-Defect Priority-Medium