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.
- openid_auth_contrib.diff 3.84KB
Comment #1
Posted on Aug 14, 2007 by Quick Camelurls.py was missing in the diff. here it is.
- urls.py 316
Comment #2
Posted on Aug 14, 2007 by Quick Camelnew 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.
Comment #3
Posted on Aug 15, 2007 by Quick CamelI 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.
- openid_withauth-20070815.diff 20.83KB
Comment #4
Posted on Aug 15, 2007 by Quick CamelNew 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 :)
- openid_withauth-20070815-2.diff 21.84KB
Comment #5
Posted on Aug 18, 2007 by Quick Camelquickfix against my previous patch. Now when register is called directly with no openid, return to signin page.
- view.py.diff 984
Comment #6
Posted on Sep 4, 2007 by Happy MonkeyIs 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 CamelComment deleted
Status: New
Labels:
Type-Defect
Priority-Medium