Files changed (16)
Url : [http://bitbucket.org/benoitc/django-authopenid/](http://bitbucket.org/benoitc/django-authopenid/)
-If the user connect with an openid he could associate it with its legaccy account or just create a new django account. When the user is connected you could manage him like you usually do with auth contrib or [django-registration](http://bitbucket.org/ubernostrum/django-registration/):
-To use django_authopenid add `django_authopenid.middleware.OpenIDMiddleware` to MIDDLEWARE_CLASSES and
def signin(request, template_name='authopenid/signin.html', redirect_field_name=REDIRECT_FIELD_NAME,
+ """Signin page. It manage the legacy authentification (user/password) and authentification with openid.
+ :attr template_name: string, name of template to use, 'authopenid/password_change_form.html' by default
+ :attr set_password_form: form use to create a new password. By default ``django.contrib.auth.forms.SetPasswordForm``
+ by default `django.contrib.auth.forms.SetPasswordForm.PasswordChangeForm` form auser auth contrib.
+ :attr openid_form: form use enter openid url. By default ``django_authopenid.forms.AssociateOpenID``
+ :attr on_failure: callable, function used when openid auth failed. by default ``django_authopenid.views.associate_failure`
+ :attr extra_context: A dictionary of variables to add to the template context. A callable object in this dictionary will be called to produce the end result which appears in the context.
Empty file added.
Empty file added.
Empty file added.
+4. Set `LOGIN_REDIRECT_URL` settings for default redirection of user after user edit. For example `/account/profile` (witch is the default).
+* ``authopenid/associate_email.txt`` is used for the body of the email sent when you associate an account to a new openid.
+* ``authopenid/associate_email_subject.txt`` is used for the subject of the email sent when you associate an account to a new openid.
+* ``authopenid/complete.html`` display the final register form for user that signed with their openid.
+* ``authopenid/dissociate.html`` display the form to confirm dissociation of an openid from an account.
+* ``authopenid/password_change_form.html`` display the form allowing a user to create a password for his account or change the password.
+.. seealso:: :ref:`views-ref` and consult `the Django authentication documentation <http://www.djangoproject.com/documentation/authentication/>`_ and `django-registration documentation <http://bitbucket.org/ubernostrum/django-registration/>`_ for details on the templates and contexts used by views of these modules.
+Using the recommanded default configuration, the url `/account/signin` will map to the view ``django_authopenid.views.signin`` which display a signin form using instances of ``django.contrib.auth.forms.AuthenticationForm`` for legacy authentification (username/password) and ``django_authopenid.forms.OpenidSigninForm`` for openid authentidcation. This will ask for a legacy account that could be registred by going on `/account/signup` (which will use django-registration module for registration) or an openid. Signing with openid will redirect the user to its openid provider and after he processed authentification to `/account/complete`
+If the user signin with its openid and is already registred he will be finally redirected to its home page (the one defined in `settings.LOGIN_REDIRECT_URL` by default). If not he will be redirected to `account/register` page.
+On `account/register` page the user could choose to create a new user or associate this openid to a "legacy" account (one registered with username/password). If he chooses to create a new user a new instance of ``django.contrib.models.auth.User`` is created with a non usable password which mean that at this step the user could only signin to your django project with its openid. He could later add a password if he wants.
+.. seealso:: `django-registration documentation <http://bitbucket.org/ubernostrum/django-registration/>`_ for details of legacy account registration.
+.. django_authopenid documentation master file, created by sphinx-quickstart on Fri Mar 27 19:15:59 2009.
+**django-authopenid** is a Django_ application that allow you to authenticate your users while using the django auth contrib.
+If the user connect with an openid he could associate it with its legaccy account or just create a new django account. When the user is connected you could manage him like you usually do with `auth contrib <http://www.djangoproject.com/documentation/authentication/>`_ or `django-registration <http://bitbucket.org/ubernostrum/django-registration/>`_ which is the default.
+Made by `Enki Multimedia <http://www.e-engura.org>`_ for one of our project and we decided to make it public.
+* Report bugs, report features and browse the source through `Tracker <http://hg.e-engura.org/django-authopenid/issues/>`_.
+In django-authopenid we create a special openid store (an instance of ``django_authopenid.openid_store.DjangoOpenIDStore`` using Django ORM. It use theses classes to store associations and nonces.
+.. seealso:: `python-openid documentation <http://openidenabled.com/python-openid/>`_ and `django-registration models documentation <http://bitbucket.org/ubernostrum/django-registration/src/tip/docs/models.txt>`_ for more informations