#24874: Why does "AbstractBaseUser" contain "password" and "last_login" fields?
--------------------------------------+--------------------
Reporter: christopherdcunha | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+--------------------
Why does "AbstractBaseUser" contain "password" and "last_login" fields?
The
[https://github.com/django/django/blob/master/django/contrib/auth/base_user.py#L1-L4
module docstring] and the
[https://docs.djangoproject.com/en/1.8/topics/auth/customizing
/#specifying-custom-user-model documentation] suggest that
AbstractBaseUser should be inherited when creating custom user models. Why
are these attributes expected to be common to all custom user models?
My immediate use case is that I want a custom user model for a delegated
auth setup (Opend ID Connect in my case), so I don't have any passwords
and last_login per se. At the same time, I'd like to use a "Django
supported" base user model to know that I support the exact API that the
User model needs. The only way I can see to do this is to re-implement
AbstractBaseUser without these fields.
--
Ticket URL: <https://code.djangoproject.com/ticket/24874>
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.c3f22ada5d9420365bddfdd15c6a3f51%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.