summaryrefslogtreecommitdiff
path: root/passlib/apps.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2013-12-22 15:25:02 -0500
committerEli Collins <elic@assurancetechnologies.com>2013-12-22 15:25:02 -0500
commitbffea42e623aa7229311f9b59144f600a8093815 (patch)
tree5d1f92c84cb84e5390f24282271255862f159f4d /passlib/apps.py
parentd48644569397bfe529bc05a68ecd21d031550fa6 (diff)
downloadpasslib-bffea42e623aa7229311f9b59144f600a8093815.tar.gz
django compatibility part 2
* added implementation of django 1.6's bcrypt_sha256 hasher, and UTs * added django16 premade context to passlib.apps, made it default django_context * test_ext_django now makes use of django16_context * passlib.ext.django.utils.get_preset_config() now uses django16_context * tox 'django' and 'django-py3' now test bcrypt integration
Diffstat (limited to 'passlib/apps.py')
-rw-r--r--passlib/apps.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/passlib/apps.py b/passlib/apps.py
index 0afb73a..96308a4 100644
--- a/passlib/apps.py
+++ b/passlib/apps.py
@@ -99,14 +99,22 @@ django10_context = LazyCryptContext(
deprecated=["hex_md5"],
)
+_django14_schemes = ["django_pbkdf2_sha256", "django_pbkdf2_sha1",
+ "django_bcrypt"] + _django10_schemes
django14_context = LazyCryptContext(
- schemes=["django_pbkdf2_sha256", "django_pbkdf2_sha1", "django_bcrypt"] \
- + _django10_schemes,
+ schemes=_django14_schemes,
+ deprecated=_django10_schemes,
+)
+
+_django16_schemes = _django14_schemes[:]
+_django16_schemes.insert(1, "django_bcrypt_sha256")
+django16_context = LazyCryptContext(
+ schemes=_django16_schemes,
deprecated=_django10_schemes,
)
# this will always point to latest version
-django_context = django14_context
+django_context = django16_context
#=============================================================================
# ldap