From c6debfde8753895553a46ec62bbeb6720fbd0559 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 5 Apr 2023 18:06:58 +0200 Subject: Add default auth validator --- example_project/settings.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'example_project') diff --git a/example_project/settings.py b/example_project/settings.py index 705e92154..7e0b8a0da 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -485,3 +485,19 @@ if ISHTAR_STRONG_PASSWORD_POLICY and not AUTH_PASSWORD_VALIDATORS: 'NAME': 'ishtar_common.utils.EachCharacterTypeValidator', }, ] + +if not AUTH_PASSWORD_VALIDATORS: + AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + 'OPTIONS': { + 'min_length': 8, + } + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + ] -- cgit v1.2.3