summaryrefslogtreecommitdiff
path: root/example_project
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-04-05 18:06:58 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-04-17 15:47:16 +0200
commitc6debfde8753895553a46ec62bbeb6720fbd0559 (patch)
tree6b7986c3c8dedb84fe19c5b95e90d0bfbfaa4584 /example_project
parente18f4fe5053adebc4f63519946775e488d41ffbf (diff)
downloadIshtar-c6debfde8753895553a46ec62bbeb6720fbd0559.tar.bz2
Ishtar-c6debfde8753895553a46ec62bbeb6720fbd0559.zip
Add default auth validator
Diffstat (limited to 'example_project')
-rw-r--r--example_project/settings.py16
1 files changed, 16 insertions, 0 deletions
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',
+ },
+ ]