Undocumented
Class | CommonPasswordValidator |
Validate whether the password is a common password. |
Class | MinimumLengthValidator |
Validate whether the password is of a minimum length. |
Class | NumericPasswordValidator |
Validate whether the password is alphanumeric. |
Class | UserAttributeSimilarityValidator |
Validate whether the password is sufficiently different from the user's attributes. |
Function | get_password_validators |
Undocumented |
Function | password_changed |
Inform all validators that have implemented a password_changed() method that the password has been changed. |
Function | password_validators_help_texts |
Return a list of all help texts of all configured validators. |
Function | validate_password |
Validate whether the password meets all validator requirements. |
Variable | password_validators_help_text_html |
Undocumented |
Function | _password_validators_help_text_html |
Return an HTML string with all help texts of all configured validators in an <ul>. |
Function | exceeds_maximum_length_ratio |
Test that value is within a reasonable range of password. |
Function | get_default_password_validators |
Undocumented |
Validate whether the password meets all validator requirements.
If the password is valid, return None. If the password is invalid, raise ValidationError with all error messages.
Test that value is within a reasonable range of password.
The following ratio calculations are based on testing SequenceMatcher like this:
which yields:
1 1.0 10 0.18181818181818182 100 0.019801980198019802 1000 0.001998001998001998 10000 0.00019998000199980003 100000 1.999980000199998e-05
This means a length_ratio of 10 should never yield a similarity higher than 0.2, for 100 this is down to 0.02 and for 1000 it is 0.002. This can be calculated via 2 / length_ratio. As a result we avoid the potentially expensive sequence matching.