{ "info": { "author": "Gilad Soffer", "author_email": "paasword.cto@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Paas-Word Django Authentication Middleware\n\n[Paas-Word](https://www.paas-word.com) is an online authentication and user management service.\nThis Python Django middleware by [Paas-Word](https://www.paas-word.com) enables website owners with a Django backend to restrict their endpoints to authenticated users only and retrieve user data. \n\n## Usage\n\n1. Create a free account at [Paas-Word](https://www.paas-word.com) website.\n2. Recieve a login, sign-up, account and forgot-password pages for your website based on the user attributes you set up.\n3. Set the callback pages on your website where users will be redirected after they sign-up and log in. \n4. Once a user is redirected to your website with a token, send this token to your backend in the \"x-auth-token\" header.\n\n## Installation\n\nRun:\n```\n pip3 install paasword\n```\n\nAdd \"paasword\" to settings.py :\n```\n INSTALLED_APPS = [\n ...\n 'paasword',\n ]\n```\n\n## Set Private Key as Environment Variable\n\nCreate an app on [Paas-Word](https://www.paas-word.com) and then set its Private Key as an environment variable on your server.\n\n`export PAASWORD_APP_PRIVATE_KEY=93f56f52-957d-4953-93a6-c5492e79778b`\n\n## Gaurd all endpoints\n\nAdd middleware to settings.py :\n```\n MIDDLEWARE = [\n ...\n 'paasword.middleware.Authenticate',\n ]\n```\n\n## Gaurd spesific routes against unauthenticated users\n\nRemove comment from middleware.py. As an example:\n```\nif request.path.startswith('/snippets/'):\n return self.get_response(request)\n```\n\n## Retrieve user information\n\nCall request.user\n```\ndef snippet_list(request):\n\tif request.method == 'GET':\n\t\tprint (request.user)\n\t\tsnippets = Snippet.getAll()\n\t\treturn JsonResponse(snippets, safe=False)\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.paas-word.com", "keywords": "authentication,jwt,json web token", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "paasword", "package_url": "https://pypi.org/project/paasword/", "platform": "any", "project_url": "https://pypi.org/project/paasword/", "project_urls": { "Homepage": "https://www.paas-word.com" }, "release_url": "https://pypi.org/project/paasword/1.0.1/", "requires_dist": [ "PyJWT" ], "requires_python": "", "summary": "Paas-Word authentication for Django", "version": "1.0.1" }, "last_serial": 4848949, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "6ce9bf53624080ef97a8d3e40d3ea90f", "sha256": "b56452a2127c2ba8968346a3ec59fc2889c13248851ae4ef92983ccc5b883dc4" }, "downloads": -1, "filename": "paasword-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6ce9bf53624080ef97a8d3e40d3ea90f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2760, "upload_time": "2019-02-20T14:30:32", "url": "https://files.pythonhosted.org/packages/b4/91/4e4e888409e7988e43f7ecbb59eab9b6533da18955d2246e6e0402d97b43/paasword-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c99c0c1e903b25dc5252047fd4da8039", "sha256": "a407e163bb3a885e33ae0cc32c8c1de9e731278575cd90a282dee0a8c23dc42b" }, "downloads": -1, "filename": "paasword-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c99c0c1e903b25dc5252047fd4da8039", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3182, "upload_time": "2019-02-20T14:30:34", "url": "https://files.pythonhosted.org/packages/57/aa/c407a7cf53b09f8c02dfb019c33d69b27dc23c5291f5cac104013f8f8d98/paasword-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "564149c83b65ffef6bd9b7ef7c682cf5", "sha256": "66985670bfb288bd225b40f272fe6cd217c3d5536be571b403be451f1a526b75" }, "downloads": -1, "filename": "paasword-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "564149c83b65ffef6bd9b7ef7c682cf5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3925, "upload_time": "2019-02-21T07:23:12", "url": "https://files.pythonhosted.org/packages/61/00/7c7d78e0536daf85244b21466652dedba46650889c2acd53f0dc643808e7/paasword-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ffa4b8f00d8747145c6a10553644b166", "sha256": "5492e20baf8923f59033d31a62e9342a233952f8e15eddbd7751f7dc87262b3b" }, "downloads": -1, "filename": "paasword-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ffa4b8f00d8747145c6a10553644b166", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3499, "upload_time": "2019-02-21T07:23:14", "url": "https://files.pythonhosted.org/packages/e6/2c/8698a88a4062371d89306cbf13320089ea7df578d432767c6b4aac04346e/paasword-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "564149c83b65ffef6bd9b7ef7c682cf5", "sha256": "66985670bfb288bd225b40f272fe6cd217c3d5536be571b403be451f1a526b75" }, "downloads": -1, "filename": "paasword-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "564149c83b65ffef6bd9b7ef7c682cf5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3925, "upload_time": "2019-02-21T07:23:12", "url": "https://files.pythonhosted.org/packages/61/00/7c7d78e0536daf85244b21466652dedba46650889c2acd53f0dc643808e7/paasword-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ffa4b8f00d8747145c6a10553644b166", "sha256": "5492e20baf8923f59033d31a62e9342a233952f8e15eddbd7751f7dc87262b3b" }, "downloads": -1, "filename": "paasword-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ffa4b8f00d8747145c6a10553644b166", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3499, "upload_time": "2019-02-21T07:23:14", "url": "https://files.pythonhosted.org/packages/e6/2c/8698a88a4062371d89306cbf13320089ea7df578d432767c6b4aac04346e/paasword-1.0.1.tar.gz" } ] }