Implements password validation via the native Django framework.
This commit is contained in:
parent
f455041211
commit
ddf01d1631
3 changed files with 74 additions and 0 deletions
|
|
@ -802,6 +802,29 @@ INSTALLED_APPS = (
|
|||
# This should usually not be changed.
|
||||
AUTH_USER_MODEL = "accounts.AccountDB"
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.11/ref/settings/#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',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'evennia.contrib.security.validators.EvenniaPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
# Use a custom test runner that just tests Evennia-specific apps.
|
||||
TEST_RUNNER = 'evennia.server.tests.EvenniaTestSuiteRunner'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue