#3011: Allow for extendable auth_user module
-------------------------------+------------------------------------
Reporter: nowell strite | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version:
Severity: Normal | Resolution:
Keywords: auth_user | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by clay):
* cc: clay (added)
Comment:
Here's a fork of 1.4rc1 that allows for pluggable auth apps using the
strategy some have already suggested in this ticket, namely, defining User
at run-time to be either the default implementation or a user-provided
implementation:
https://github.com/claymation/django/compare/pluggable-auth-apps
In addition to User, all of the companion models, forms, backends,
decorators, and middleware classes that depend on User are similarly
defined at run-time. The complete set of objects defined in this manner
represents what I consider to be the public interface to the existing
auth.User model:
{{{
models: User, UserManager, AnonymousUser, Group, Permission,
SiteProfileNotAvailable
admin: UserAdmin, GroupAdmin
backends: ModelBackend, RemoteUserBackend
decorators: user_passes_test, login_required, permission_required
middleware: RemoteUserMiddleware
forms: AuthenticationForm, UserCreationForm, UserChangeForm,
AdminPasswordChangeForm, PasswordChangeForm,
PasswordResetForm, SetPasswordForm
}}}
Developers are free to define their own pluggable auth apps, by setting
AUTH_APP and adding the app to INSTALLED_APPS, following the COMMENTS_APP
pattern. Here is one such pluggable auth app, which provides a User model
with no username field and forms/backends/middleware that allow users to
login with their email address:
https://github.com/claymation/django_email_auth
Is this the same approach that has been rejected for inclusion in core
previously, and if so, why?
--
Ticket URL: <https://code.djangoproject.com/ticket/3011#comment:106>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.