A reusable Django app that will invalidate all active sessions after change password.
Project description
Installation
Install a package.
$ pip install django-password-session
Add “password_session” to your INSTALLED_APPS setting:
INSTALLED_APPS = (
...
'password_session',
)
Add middleware:
MIDDLEWARE_CLASSES = (
...
'password_session.middleware.CheckPasswordHash',
),
Make sure that you have the following settings:
INSTALLED_APPS = (
...
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
)
AUTHENTICATION_BACKENDS = (
...
'django.contrib.auth.backends.ModelBackend',
)
MIDDLEWARE_CLASSES = (
...
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
Settings
Default application settings can be overriden in settings.py:
PASSWORD_SESSION_PASSWORD_HASH_KEY = 'password_session_password_hash_key' # default key stored in session
PASSWORD_SESSION_PASSWORD_HASH_LENGTH = 4 # default key length
Requirements
Python 2.6+ or 3+
Django 1.3+
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-password-session-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 212e47a2d7e398a0c7b5a2007085bb4988f20c03aa161573c5421699349f2843 |
|
MD5 | e6fad35735a97a33c0d68e5b1e48b355 |
|
BLAKE2b-256 | 6102eaccfdfee69372c471c1b46eace4cf958eff50fb13f5174a0e279e0f3be2 |