{ "info": { "author": "Bearle", "author_email": "tech@bearle.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=============================\ndjango-scatter-auth\n=============================\n\n.. image:: https://badge.fury.io/py/django-scatter-auth.svg\n :target: https://badge.fury.io/py/django-scatter-auth\n\n.. image:: https://travis-ci.org/Bearle/django-scatter-auth.svg?branch=master\n :target: https://travis-ci.org/Bearle/django-scatter-auth\n\n.. image:: https://codecov.io/gh/Bearle/django-scatter-auth/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/Bearle/django-scatter-auth\n\ndjango-scatter-auth is a pluggable Django app that enables login/signup via Scatter (EOS extension wallet). The user authenticates themselves by digitally signing the hostname with their wallet's private key.\n\n.. image:: https://github.com/Bearle/django-scatter-auth/blob/master/docs/_static/django_scatter_auth_test2.gif?raw=true\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-scatter-auth.readthedocs.io.\n\nExample project\n---------------\n\nhttps://github.com/Bearle/django-scatter-auth/tree/master/example\n\nYou can check out our example project by cloning the repo and heading into example/ directory.\nThere is a README file for you to check, also.\n\n\nFeatures\n--------\n\n* Scatter API login, signup\n* Scatter Django forms for signup, login\n* Checks signature (validation)\n* Uses hostname signing as proof of private key posession\n* Easy to set up and use (just one click)\n* Custom auth backend\n* VERY customizable - uses Django settings, allows for custom User model\n* Vanilla Javascript helpers included\n\nQuickstart\n----------\nInstall django-scatter-auth with pip::\n\n pip install django-scatter-auth\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'scatterauth.apps.scatterauthConfig',\n ...\n )\nSet `'scatterauth.backend.ScatterAuthBackend'` as your authentication backend:\n\n.. code-block:: python\n\n AUTHENTICATION_BACKENDS = [\n 'django.contrib.auth.backends.ModelBackend',\n 'scatterauth.backend.ScatterAuthBackend'\n ]\nSet your User model's field to use as public key storage:\n\n.. code-block:: python\n\n SCATTERAUTH_USER_PUBKEY_FIELD = 'username'\n\nAnd if you have some other fields you want to be in the SignupForm, add them too:\n\n.. code-block:: python\n\n SCATTERAUTH_USER_SIGNUP_FIELDS = ['email',]\n\n\nAdd django-scatter-auth's URL patterns:\n\n.. code-block:: python\n\n from scatterauth import urls as scatterauth_urls\n\n\n urlpatterns = [\n ...\n url(r'^', include(scatterauth_urls)),\n ...\n ]\n\nAdd some javascript to handle login:\n\n\n.. code-block:: html\n\n \n\n\n.. code-block:: javascript\n\n var login_url = '{% url 'scatterauth_login_api' %}';\n document.addEventListener('scatterLoaded', scatterExtension => {\n console.log('scatter loaded');\n if (scatter.identity) {\n console.log(\"Identity found\");\n loginWithAuthenticate(login_url,console.log,console.log,console.log,console.log, function (resp) {\n window.location.replace(resp.redirect_url);\n });\n } else {\n console.log('identity not found, have to signup');\n }\n });\n\nYou can access signup using {% url 'scatterauth_signup' %} and API signup using {% url 'scatterauth_signup_api' %}.\n\nIf you have any questions left, head to the example app https://github.com/Bearle/django-scatter-auth/tree/master/example\n\n\n\nImportant details and FAQ\n-------------------------\n\n1. *If you set a custom public key field (SCATTERAUTH_USER_PUBKEY_FIELD), it MUST be unique (unique=True).*\n\nThis is needed because if it's not, the user can register a new account with the same public key as the other one,\nmeaning that the user can now login as any of those accounts (sometimes being the wrong one).\n\n2. *How do i deal with user passwords or Password is not set*\n\nThere should be some code in your project that generates a password using ``User.objects.make_random_password`` and sends it to a user email.\nOr, even better, sends them a 'restore password' link.\nAlso, it's possible to copy signup_view to your project, assign it a url, and add the corresponding lines to set some password for a user.\n\n3. *Why don't i have to sign a message? It's needed in django-web3-auth, how this app is secure?*\n\nThis app uses scatter's ``authenticate`` function to handle message signing - hostname being the signed message.\nThis means that the user & the client share knowledge of the original message and the server can verify\nclient's possession of the private key corresponding to the public key.\n\n\nRunning Tests\n-------------\n\nDoes the code actually work?\n\n::\n\n source /bin/activate\n (myenv) $ pip install tox\n (myenv) $ tox\n\nCredits\n-------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n0.1.1 (2018-09-10)\n++++++++++++++++++\n\n* Fixed signup bug in js - added 'pubkey_field_name' param\n\n0.1.0 (2018-08-13)\n++++++++++++++++++\n\n* First release on PyPi\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Bearle/django-scatter-auth", "keywords": "django-scatter-auth", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-scatter-auth", "package_url": "https://pypi.org/project/django-scatter-auth/", "platform": "", "project_url": "https://pypi.org/project/django-scatter-auth/", "project_urls": { "Homepage": "https://github.com/Bearle/django-scatter-auth" }, "release_url": "https://pypi.org/project/django-scatter-auth/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "django-scatter-auth is a pluggable Django app that enables login/signup via Scatter (EOS). The user authenticates himself by digitally signing the session key with their wallet's private key.", "version": "0.1.1" }, "last_serial": 4258640, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "eff5bada02df362e2255bb9996179cf9", "sha256": "b1a5cdd48f694bd3adcc0f213e98b313850f877b497e97b30cd76da77a31649d" }, "downloads": -1, "filename": "django_scatter_auth-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eff5bada02df362e2255bb9996179cf9", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 15568, "upload_time": "2018-08-13T08:04:17", "url": "https://files.pythonhosted.org/packages/af/8d/7631fb227f327865e6e9a336ea24cf834acf1b170051fa609453eca718b9/django_scatter_auth-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "322f46170efcf2390407a048c9765a7b", "sha256": "7ef5c72430bdd434616b2cc5dc8b8638e172bce8261329fa8b706a6968a513ed" }, "downloads": -1, "filename": "django-scatter-auth-0.1.0.tar.gz", "has_sig": false, "md5_digest": "322f46170efcf2390407a048c9765a7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12572, "upload_time": "2018-08-13T08:03:45", "url": "https://files.pythonhosted.org/packages/7f/7c/2dae60752e788347076d063ebc7ec3dd57316a3a293ddf598278cb3b79d2/django-scatter-auth-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c1f8c09d2f86522c836f6503a26f823a", "sha256": "793b5f019e0dd00e29b059fe50ee866cb097fd68123dcb5a1e9473cd7a755f2c" }, "downloads": -1, "filename": "django_scatter_auth-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c1f8c09d2f86522c836f6503a26f823a", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 15669, "upload_time": "2018-09-10T18:52:29", "url": "https://files.pythonhosted.org/packages/05/54/af8f21434aed6a55a10480383bd653677911d43f4acf1d52c107599b8b1a/django_scatter_auth-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d98a9560287faf815b901a29af3c4c98", "sha256": "8beff63736fe037d524fbfe1f811034bd099bc59fa36429f74d44940037b693b" }, "downloads": -1, "filename": "django-scatter-auth-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d98a9560287faf815b901a29af3c4c98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12644, "upload_time": "2018-09-10T18:52:26", "url": "https://files.pythonhosted.org/packages/2c/6e/58f3930ff19a64274b386f3ae5bba4292bcf03e95ad147c1f02df0392cd7/django-scatter-auth-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c1f8c09d2f86522c836f6503a26f823a", "sha256": "793b5f019e0dd00e29b059fe50ee866cb097fd68123dcb5a1e9473cd7a755f2c" }, "downloads": -1, "filename": "django_scatter_auth-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c1f8c09d2f86522c836f6503a26f823a", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 15669, "upload_time": "2018-09-10T18:52:29", "url": "https://files.pythonhosted.org/packages/05/54/af8f21434aed6a55a10480383bd653677911d43f4acf1d52c107599b8b1a/django_scatter_auth-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d98a9560287faf815b901a29af3c4c98", "sha256": "8beff63736fe037d524fbfe1f811034bd099bc59fa36429f74d44940037b693b" }, "downloads": -1, "filename": "django-scatter-auth-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d98a9560287faf815b901a29af3c4c98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12644, "upload_time": "2018-09-10T18:52:26", "url": "https://files.pythonhosted.org/packages/2c/6e/58f3930ff19a64274b386f3ae5bba4292bcf03e95ad147c1f02df0392cd7/django-scatter-auth-0.1.1.tar.gz" } ] }