#32030: Make Token Generator more universal
----------------------------------------+------------------------
               Reporter:  Ilya Chichak  |          Owner:  nobody
                   Type:  New feature   |         Status:  new
              Component:  contrib.auth  |        Version:  3.1
               Severity:  Normal        |       Keywords:
           Triage Stage:  Unreviewed    |      Has patch:  0
    Needs documentation:  0             |    Needs tests:  0
Patch needs improvement:  0             |  Easy pickings:  0
                  UI/UX:  0             |
----------------------------------------+------------------------
 I suggest to split current `PasswordResetTokenGenerator` into
 `BaseTokenGenerator` and it's implementation `PasswordResetTokenGenerator`

 To make `BaseTokenGenerator` more universal, it should contain class
 variable `TOKEN_TIMEOUT` with token timeout and `_make_hash_value` method
 public and abstract.

 It will make possible to make email confirmation tokens, one time enter
 tokens and other with reimplementing `make_hash_value` method and setting
 separate timeout for each token generator. Current
 `PasswordResetTokenGenerator` will be implementation of
 `BaseTokenGenerator` where `TOKEN_TIMEOUT` will be
 `settings.PASSWORD_RESET_TIMEOUT`. So, for all logic, that uses
 `PasswordResetTokenGenerator` nothing will be changed.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32030>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.a59c4d2902e93a644881cb45e5372a59%40djangoproject.com.

Reply via email to