class documentation

class UserAttributeSimilarityValidator: (source)

View In Hierarchy

Validate that the password is sufficiently different from the user's attributes. If no specific attributes are provided, look at a sensible list of defaults. Attributes that don't exist are ignored. Comparison is made to not only the full attribute value, but also its components, so that, for example, a password is validated against either part of an email address, as well as the full address.

Method __init__ Undocumented
Method get_help_text Undocumented
Method validate Undocumented
Constant DEFAULT_USER_ATTRIBUTES Undocumented
Instance Variable max_similarity Undocumented
Instance Variable user_attributes Undocumented
def __init__(self, user_attributes=DEFAULT_USER_ATTRIBUTES, max_similarity=0.7): (source)

Undocumented

def get_help_text(self): (source)

Undocumented

def validate(self, password, user=None): (source)

Undocumented

DEFAULT_USER_ATTRIBUTES: tuple[str, ...] = (source)

Undocumented

Value
('username', 'first_name', 'last_name', 'email')
max_similarity = (source)

Undocumented

user_attributes = (source)

Undocumented