#30226: Add base authentication backend to ease custom backend creation.
---------------------------------+------------------------------------
Reporter: Tobias Bengfort | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Description changed by Tobias Bengfort:
Old description:
> Currently, writing a new authentication backend requires quite some
> boilerplate e.g. `has_perm()` can be derived from `get_all_permissions()`
> which in turn can be derived from `get_user_permissions()` and
> `get_group_permissions()`. Additionally, `authenticate()` and
> `get_user()` should always return `None` for backends that only handle
> permissions.
>
> Also note that `get_all_permissions()` and `get_group_permissions()`
> exist on the User model, but `get_user_permissions()` does not. I think
> this is confisuing for backend authors.
>
> Mailinglist thread: https://groups.google.com/forum/#!topic/django-
> developers/CNmz22gEsCc
> Pull request: https://github.com/django/django/pull/11037
New description:
Currently, writing a new authentication backend requires quite some
boilerplate e.g. `has_perm()` can be derived from `get_all_permissions()`
which in turn can be derived from `get_user_permissions()` and
`get_group_permissions()`. Additionally, `authenticate()` and `get_user()`
should always return `None` for backends that only handle permissions.
Also note that `get_all_permissions()` and `get_group_permissions()` exist
on the User model, but `get_user_permissions()` does not. I think this is
confusing for backend authors.
Mailinglist thread: https://groups.google.com/forum/#!topic/django-
developers/CNmz22gEsCc
Pull request: https://github.com/django/django/pull/11037
--
--
Ticket URL: <https://code.djangoproject.com/ticket/30226#comment:5>
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/060.297090025339e184811a7e56ea65e771%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.