#24855: Allow the use of django.contrib.auth.login without credentials
(authentication)
------------------------------+--------------------
Reporter: poiati | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------
As it is we need to call `authenticate` before `login` because we need to
set the authentication backend in the user model. We can use login without
authenticate if we set the backend attr manually, but this need some
implementation knowledge of how authentication works.
The proposal is to change the `login` function signature to:
`login(request, user, backend=None)`
The following rules will apply:
1. Use the value of the `backend` argument, if provided.
2. Use the value of the `user.backend` annotation, if present.
3. Use the only configured backend, if there is only one.
4. Raise ValueError("You have multiple authentication backends configured;
you must provide the backend argument to login.") otherwise.
More information can be found in the mailing list topic:
https://groups.google.com/forum/#!topic/django-developers/_I0BW5L7Z58
--
Ticket URL: <https://code.djangoproject.com/ticket/24855>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.09435e1f4749d88455764d64f26997ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.