{ "info": { "author": "Jorge Pintado", "author_email": "j.pintado89@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "django-hostproof-auth\n======================\n\n.. image:: https://travis-ci.org/jpintado/django-hostproof-auth.png?branch=master\n :target: https://travis-ci.org/jpintado/django-hostproof-auth\n\n.. image:: https://coveralls.io/repos/jpintado/django-hostproof-auth/badge.svg?branch=master\n :target: https://coveralls.io/r/jpintado/django-hostproof-auth?branch=master\n\n.. image:: https://pypip.in/v/django_hostproof_auth/badge.png\n :target: https://crate.io/packages/django_hostproof_auth/\n :alt: Latest PyPI version\n\n.. image:: https://pypip.in/d/django_hostproof_auth/badge.png\n :target: https://crate.io/packages/django_hostproof_auth/\n :alt: Number of PyPI downloads\n\nSecure Host-Proof authentication backend for Django-powered sites.\n\nThe password is never transmitted to the server. The server is limited to persisting and retrieving whatever encrypted data is sent to it, and never actually accesses the sensitive data in its plain form.\n\n\nRequirements\n========\n\n- Python 2.6, 2.7, 3.2 or 3.3\n\n- Django (1.6+)\n\n- rsa\n\n\nInstallation\n============\n\nThe easiest way to install is with pip_::\n\n pip install django_hostproof_auth\n \nor clone from github_:\n\n- Clone the repository::\n\n git clone https://github.com/jpintado/django-hostproof-auth.git\n\n- Install the package::\n\n python setup.py install\n\nYou could require root permissions to execute the previous commands.\n \n\nConfiguration\n=============\n\n- In **settings.py**:\n\n - Add ``hostproof_auth`` to ``INSTALLED_APPS``.\n\n - Add the authentication backend to your application::\n\n AUTH_USER_MODEL = 'hostproof_auth.User'\n\n AUTHENTICATION_BACKENDS = (\n 'hostproof_auth.auth.ModelBackend',\n )\n\n- Include *hostproof_auth* in your **urls.py** with some prefix::\n\n urlpatterns = patterns('',\n # ... snip ...\n url(r'^auth/', include('hostproof_auth.urls')),\n # ... snip ...\n )\n\nUsage\n=====\n\n*django-hostproof-auth* provides a JavaScript client to register and login users in your django application. \nYou can easily access to this client in your templates by including the following::\n\n {% load staticfiles %}\n\n \n\nThe JavaScript client uses the SJCL library and Jquery_, so in case you don't have already in your project you can use the version included in the package (Jquery 2.0.3):\n\n.. _Jquery: http://www.jquery.com/\n\n::\n\n \n \n \nThese are examples about the use of this client that you can directly include in your login/registration templates:\n\nRegistration\n------------\n\n::\n\n {% load staticfiles %}\n\n \n \n \n \n\n \n \n
\n \n\n\nLogin\n-----\n\n:: \n\n {% load staticfiles %}\n\n \n \n \n \n\n \n \n \n\nAdvanced Usage\n==============\n\nYou may create your own JavaScript client, or create a client in any other language. In that case, you will need to make the necessary requests to register and login users. Below is the documentation for these API requests:\n\nRegistration\n------------\n\n- POST request to the ``hostproof_auth_register`` URL (typically something like */auth/register/*) with the parameters:\n\n - username\n - email\n - encrypted_challenge\n - challenge\n \n The client application needs to generate a random string as challenge, and encrypt that string using a secure algorith (for example, AES-256) with the user password to generate the encrypted challenge.\n\n Example::\n \n username=foobar&email=foobar@domain.com&challenge=randomstring&encrypted_challenge=U2FsdGVkX19ED2i2M8uE3AySNJyKzw8SXtru9JQbNmo=\n\nLogin\n-----\n\n- GET request to the ``challenge`` URL (typically something like */auth/challenge/*) with the parameters.\n\n - username\n - format (OPTIONAL): specifies the response format. Supported \"text\" and \"json\". The default value is \"text\".\n\n Example::\n \n /challenge/?username=foobar&format=json\n\n Response::\n \n {\n \"encrypted_challenge\" : \"U2FsdGVkX19ED2i2M8uE3AySNJyKzw8SXtru9JQbNmo=\"\n }\n \n- POST request to the ``challenge`` URL with the parameters:\n\n - username\n - challenge: the challenge after the decryption with the user password.\n - format (OPTIONAL): specifies the response format. Supported \"text\" and \"json\". The default value is \"text\".\n\n The client application needs to decrypt the encrypted_challenge using the password, and send the original challenge as response to be authenticated.\n \n Example::\n\n username=foobar&challenge=randomstring&format=json\n\n Response::\n \n {\n \"rsa_public\": \"-----BEGIN RSA PUBLIC KEY-----\\nMEgCQQC6ZV2lMzO50HoJhznNat7pB+cVwY91Qpn58iIC8X4QleNatgyqJfZzu3RdwQQJDr2uUv+sXdEm+wYGBXg0gqZjAgMBAAE=\\n-----END RSA PUBLIC KEY-----\\n\"\n }\n \n \n.. _pip: https://pypi.python.org/pypi/django_hostproof_auth\n.. _github: https://github.com/jpintado/django-hostproof-auth", "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/jpintado/django-hostproof-auth", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "hostproof_auth", "package_url": "https://pypi.org/project/hostproof_auth/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hostproof_auth/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jpintado/django-hostproof-auth" }, "release_url": "https://pypi.org/project/hostproof_auth/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Secure Host-Proof authentication backend for Django-powered sites", "version": "0.1.1" }, "last_serial": 1600600, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "37af49beedef63d42303b3fc3481f400", "sha256": "73d5d81397de002928176d81296557e49c34a6bc1e835c3cd4ee6a4364d1999f" }, "downloads": -1, "filename": "hostproof_auth-0.1.1.tar.gz", "has_sig": false, "md5_digest": "37af49beedef63d42303b3fc3481f400", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48138, "upload_time": "2015-06-21T06:38:47", "url": "https://files.pythonhosted.org/packages/3f/90/2ecd99cca4c7d9c5d89f2d24b36885c124853a848e186d25d024302ee850/hostproof_auth-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "37af49beedef63d42303b3fc3481f400", "sha256": "73d5d81397de002928176d81296557e49c34a6bc1e835c3cd4ee6a4364d1999f" }, "downloads": -1, "filename": "hostproof_auth-0.1.1.tar.gz", "has_sig": false, "md5_digest": "37af49beedef63d42303b3fc3481f400", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48138, "upload_time": "2015-06-21T06:38:47", "url": "https://files.pythonhosted.org/packages/3f/90/2ecd99cca4c7d9c5d89f2d24b36885c124853a848e186d25d024302ee850/hostproof_auth-0.1.1.tar.gz" } ] }