{ "info": { "author": "Drew Engelson", "author_email": "drew@engelson.net", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "django-pgcryptoauth\n===================\n\nDjango hasher for PostgreSQL pgcrypto encoded passwords.\n\n.. image:: https://travis-ci.org/tomatohater/django-pgcryptoauth.png?branch=master\n :target: https://travis-ci.org/tomatohater/django-pgcryptoauth\n\n.. image:: https://coveralls.io/repos/tomatohater/django-pgcryptoauth/badge.png?branch=master\n :target: https://coveralls.io/r/tomatohater/django-pgcryptoauth?branch=master\n\n.. image:: https://badge.fury.io/py/django-pgcryptoauth.png\n :target: http://badge.fury.io/py/django-pgcryptoauth\n\n``django-pgcryptoauth`` is a custom Django password hasher which is intended to provide authentication continuity for legacy passwords that were encrypted with the Postgres pgcrypto extension.\n\nSince we don't have access to the cleartext passwords, we instead just make Django understand and handle the legacy algorithm. When a user successfully logs in, Django will automatically upgrade the password to the preferred algorithm.\n\n\nSource code\n-----------\n\nhttps://github.com/tomatohater/django-pgcryptoauth\n\n\nDependencies\n------------\n\nOf course, you will need to be using a PostgreSQL database with the pgcrypto_ extension installed.\n\n\nInstallation\n------------\n\n1. Install the ``django-pgcryptoauth`` package::\n\n pip install django-pgcryptoauth\n\n\n2. Add ``pgcryptoauth`` to your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = (\n ...\n 'pgcryptoauth',\n ...\n )\n\n3. Add ``pgcryptoauth.hashers.PgCryptoPasswordHasher`` to ``PASSWORD_HASHERS`` in your Django settings::\n\n PASSWORD_HASHERS = (\n ...\n 'pgcryptoauth.hashers.PgCryptoPasswordHasher',\n )\n\nNote: This hasher should probably at the bottom of the list so that other hashers take priority. See https://docs.djangoproject.com/en/dev/topics/auth/passwords/\n\n\n\nConfiguration\n-------------\n\nBy default, `pgcryptoauth` will use your `default` database connection. However, you may instruct it to use another connection by setting `PGCRYPTOAUTH_DATABASE` to something else in your Django settings.::\n\n PGCRYPTOAUTH_DATABASE = 'another_database'\n\nOf course, this other connection must be a valid Postgres database with the pgcrypto extension and listed in your `DATABASES` setting::\n\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql',\n 'NAME': 'my_database',\n 'USER': 'my_user',\n 'PASSWORD': 'my_pass',\n 'HOST': '127.0.0.1',\n 'PORT': '',\n },\n 'another_database': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'another_database',\n 'USER': 'another_user',\n 'PASSWORD': 'another_pass',\n 'HOST': '127.0.0.1',\n 'PORT': '',\n }\n }\n\nThis may be necessary if the pgcrypto extension is not (or can't be) installed on your primary database. Especially if your primary database is not PostgreSQL!\n\n\nRunning test cases\n------------------\n\nExecute the unit test::\n\n python manage.py test pgcryptoauth\n\n\nLoading legacy data\n-------------------\n\nNote: Legacy pgcrypto hashed passwords look like ``$1$BFw5nhna$XeiE8c4FInYGp3oND2l9n1``. When migrating these passwords, we simply need to prefix the hash with the ``pgcrypto$`` algorithm::\n\n user.password = 'pgcrypto$$1$BFw5nhna$XeiE8c4FInYGp3oND2l9n1'\n user.save()\n\nIf you review that users password via the Django ``auth.user`` admin, you should see::\n\n algorithm: pgcrypto\n hash: $1$BFw******************************************\n\n\n.. _pgcrypto: http://www.postgresql.org/docs/9.1/static/pgcrypto.html\n\n\nHistory\n-------\n\nv0.3 - Adds Python 3 support, supports Django 1.8+.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tomatohater/django-pgcryptoauth", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-pgcryptoauth", "package_url": "https://pypi.org/project/django-pgcryptoauth/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-pgcryptoauth/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tomatohater/django-pgcryptoauth" }, "release_url": "https://pypi.org/project/django-pgcryptoauth/0.3/", "requires_dist": null, "requires_python": null, "summary": "Django hasher for pgcrypto encoded passwords.", "version": "0.3" }, "last_serial": 2494013, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "fdba5ef76aefbc78d37f7aa373684555", "sha256": "1520e844a91768a716bf2ef047f9757d5c4b3b5916836e51524262e9f33c00ad" }, "downloads": -1, "filename": "django-pgcryptoauth-0.2.1.tar.gz", "has_sig": false, "md5_digest": "fdba5ef76aefbc78d37f7aa373684555", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2963, "upload_time": "2012-12-05T21:44:40", "url": "https://files.pythonhosted.org/packages/06/c0/270fd3f43ad43d3073d3578af63e33c0abdcadae0ba7fbebc58ea439ee46/django-pgcryptoauth-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f4739cc748782d63a4c0e72cc39732f2", "sha256": "eb268cd9c2ad3882815e3d8eb112cd7412399067c60c26ed46de9e1fa5238d09" }, "downloads": -1, "filename": "django-pgcryptoauth-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f4739cc748782d63a4c0e72cc39732f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2964, "upload_time": "2013-05-21T14:22:22", "url": "https://files.pythonhosted.org/packages/6f/61/7464f7f83e0c68429e0db42a286f4e3067b9cebb9b7a7f5baa79967ff943/django-pgcryptoauth-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "2a35eaf82053ddfcd8f15fafa3cf0400", "sha256": "1aac9ba3ec37369af43e167f796e4faaf1dc4781c7e1278e9301a926213d85a7" }, "downloads": -1, "filename": "django-pgcryptoauth-0.2.3.tar.gz", "has_sig": false, "md5_digest": "2a35eaf82053ddfcd8f15fafa3cf0400", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4044, "upload_time": "2014-02-13T21:50:24", "url": "https://files.pythonhosted.org/packages/a4/b3/bfdf3f5453011b11c8a6d56d7736e95a8079efebfc444befabc7833bd024/django-pgcryptoauth-0.2.3.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "97328a6af17f7f9b4221facb6d5e1467", "sha256": "5ac7b1a5f098b58c5e87e53dad55111ef9384e5e8c2f2562a311e6f3ef5036ec" }, "downloads": -1, "filename": "django-pgcryptoauth-0.3.tar.gz", "has_sig": false, "md5_digest": "97328a6af17f7f9b4221facb6d5e1467", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5493, "upload_time": "2016-12-01T16:02:52", "url": "https://files.pythonhosted.org/packages/3b/8f/65948a3648d57f6d02255d433e1a599be0291050f0e257a084969531ed57/django-pgcryptoauth-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97328a6af17f7f9b4221facb6d5e1467", "sha256": "5ac7b1a5f098b58c5e87e53dad55111ef9384e5e8c2f2562a311e6f3ef5036ec" }, "downloads": -1, "filename": "django-pgcryptoauth-0.3.tar.gz", "has_sig": false, "md5_digest": "97328a6af17f7f9b4221facb6d5e1467", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5493, "upload_time": "2016-12-01T16:02:52", "url": "https://files.pythonhosted.org/packages/3b/8f/65948a3648d57f6d02255d433e1a599be0291050f0e257a084969531ed57/django-pgcryptoauth-0.3.tar.gz" } ] }