#23896: set_password
------------------------------+--------------------
     Reporter:  adontz        |      Owner:  nobody
         Type:  New feature   |     Status:  new
    Component:  contrib.auth  |    Version:  1.7
     Severity:  Normal        |   Keywords:
 Triage Stage:  Unreviewed    |  Has patch:  0
Easy pickings:  0             |      UI/UX:  0
------------------------------+--------------------
 Recently I've implemented LDAP auth backend by myself and was confused by
 not being able to add change_password/set_password functionality without
 adding custom User model. Actually I think it is very common to delegate
 password validation to some external service, like LDAP, SMTP, HTTP, etc.
 while keeping User model as is. Also, providing custom user model will
 force all applications to reference settings.AUTH_USER_MODEL which is
 definitely correct, but forcing to do even correct thing does not look
 nice for me.

 So, the thing I want to discuss is support of some special methods on auth
 backends like

 {{{#!python
 """ user is for User model instance here, not username string """
 def set_password(user, new_password):
     pass

 """ user is for User model instance here, not username string """
 def change_password(user, old_password, new_password):
     pass
 }}}

 User model to call auth backend methods if defined.

 So do I miss anything? Is my proposal correct?

--
Ticket URL: <https://code.djangoproject.com/ticket/23896>
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.184110b69b9ee63b918d2755ba1bd21d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to