{ "info": { "author": "Marcelo Cueto", "author_email": "cueto@live.cl", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP" ], "description": "djangorestframework-auth0\n=====\n___\n\nThis library let you to **authenticate** an specific user on DRF based on the JWT Token returned by Auth0 Javascript libraries.\n\n![Logo](docs/logo.png)\n\nInstallation\n-----------\n\n1. Using `pip` install the library cloning the repository with following command:\n``` shell\npip install rest_framework_auth0\n```\n\nQuick start\n-----------\n\n1. Make sure \"django.contrib.auth in on INSTALLED_APPS setting, otherwise add it by your own:\n``` python\nINSTALLED_APPS = [\n ...\n 'django.contrib.auth',\n ...\n]\n```\nThis will allow us to login as an specific user as well as auto-creating users when they don't exist\n\n1. Add \"rest_framework_auth0\" to your INSTALLED_APPS **after** `rest_framework_jwt` setting like this:\n``` python\nINSTALLED_APPS = [\n ...,\n 'rest_framework_jwt',\n 'rest_framework_auth0',\n]\n```\n\n2. Add `Auth0JSONWebTokenAuthentication` in your DEFAULT_AUTHENTICATION_CLASSES located at settings.py from your project:\n``` python\nREST_FRAMEWORK = {\n ...,\n 'DEFAULT_AUTHENTICATION_CLASSES': (\n ...,\n 'rest_framework_auth0.authentication.Auth0JSONWebTokenAuthentication',\n ),\n}\n```\n\n3. Add your AUTH0_CLIENT_SECRET and AUTH0_CLIENT_ID in your settings.py file -must be the same secret and id than the frontend App-:\n``` python\nAUTH0 = {\n 'CLIENTS': {\n 'default': {\n 'AUTH0_CLIENT_ID': '', #make sure it's the same string that aud attribute in your payload provides\n 'AUTH0_CLIENT_SECRET': '',\n 'CLIENT_SECRET_BASE64_ENCODED': True, # default to True, if you're Auth0 user since December, maybe you should set it to False\n 'AUTH0_ALGORITHM': 'HS256',\n }\n },\n 'JWT_AUTH_HEADER_PREFIX': 'JWT', # default prefix used by djangorestframework_jwt\n 'AUTHORIZATION_EXTENSION': False, # default to False\n 'USERNAME_FIELD': 'sub', # default username field in auth0 token scope to use as token user\n}\n```\n\n4. Add the `Authorization` Header to all of your REST API request, prefixing JWT to your token:\n```\nAuthorization: JWT \n```\n5. Use the decorator `@token_required` in all views you want to protect (not_ready_yet)\n\n6. That's it\n\n```\nNOTE: In order to get the token authentication, the 'django.contrib.auth' app models migrations must be applied(python manage.py migrate).\n```\n\nMultiple Clients - Multiples App - One API\n-----------\nIf you wanna to use multiple Auth0 App and/or Clients -for example if you're creating an open API, you can add as much as you want in the **AUTH0.CLIENTS** settings parameter\n\n``` python\nAUTH0 = {\n 'CLIENTS': {\n 'default': {\n 'AUTH0_CLIENT_ID': '', #make sure it's the same string that aud attribute in your payload provides\n 'AUTH0_CLIENT_SECRET': '',\n 'CLIENT_SECRET_BASE64_ENCODED': True, # default to True, if you're Auth0 user since December, maybe you should set it to False\n 'AUTH0_ALGORITHM': 'HS256',\n }\n 'web': {\n 'AUTH0_CLIENT_ID': '', #make sure it's the same string that aud attribute in your payload provides\n 'AUTH0_CLIENT_SECRET': '',\n 'CLIENT_SECRET_BASE64_ENCODED': True, # default to True, if you're Auth0 user since December, maybe you should set it to False\n 'AUTH0_ALGORITHM': 'HS256',\n }\n 'mobile': {\n 'AUTH0_CLIENT_ID': '', #make sure it's the same string that aud attribute in your payload provides\n 'AUTH0_CLIENT_SECRET': '',\n 'CLIENT_SECRET_BASE64_ENCODED': True, # default to True, if you're Auth0 user since December, maybe you should set it to False\n 'AUTH0_ALGORITHM': 'HS256',\n }\n },\n ...\n}\n```\n\nIn order to select one of them when the authentication is needed -a POST request, for example- you need to add a header called **Client-Code** -by default, but you can customize it-.\nThe names of the clients are **case sensitive**.\n\n\nMigrations\n---\n- [Migrate from 0.2.1 to > 0.4.5](docs/migrations.md)\n\nRS256 Support\n---\nIf you wanna use RS256, please follow the Sample Project\n\nSample Project\n-----------\nA sample project can be found [here][sample]\n\n[sample]: https://github.com/mcueto/djangorestframework-auth0_sample\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/mcueto/djangorestframework-auth0/tarball/0.5.3", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mcueto/djangorestframework-auth0", "keywords": "auth0,rest framework,django", "license": "", "maintainer": "", "maintainer_email": "", "name": "rest-framework-auth0", "package_url": "https://pypi.org/project/rest-framework-auth0/", "platform": "", "project_url": "https://pypi.org/project/rest-framework-auth0/", "project_urls": { "Download": "https://github.com/mcueto/djangorestframework-auth0/tarball/0.5.3", "Homepage": "https://github.com/mcueto/djangorestframework-auth0" }, "release_url": "https://pypi.org/project/rest-framework-auth0/0.5.3/", "requires_dist": [ "django (>=1.10.0)", "djangorestframework (>=1.9.0)", "djangorestframework-jwt (>=1.7.2)" ], "requires_python": "", "summary": "Django Rest Framework Library to use Auth0 authentication", "version": "0.5.3" }, "last_serial": 5234444, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f5fdb4e2eb88d6ad7408081685c5b84a", "sha256": "9a97abaf92f1f25a22e9a5f084868223de0de76c3538437bc53e728316244238" }, "downloads": -1, "filename": "rest_framework_auth0-0.1.tar.gz", "has_sig": false, "md5_digest": "f5fdb4e2eb88d6ad7408081685c5b84a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6698, "upload_time": "2016-08-06T04:00:34", "url": "https://files.pythonhosted.org/packages/37/a5/c50b424f1ef47af03938c1a6b1721668dbeb9fc76a2e7bef8ae4293ecb16/rest_framework_auth0-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "59a2713f82500b362efc87f1864f68a8", "sha256": "9be0782774d88d1638d133860884e30419044e3d85046be350da7c4fc3c685c3" }, "downloads": -1, "filename": "rest_framework_auth0-0.1.1.tar.gz", "has_sig": false, "md5_digest": "59a2713f82500b362efc87f1864f68a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6597, "upload_time": "2016-08-06T04:07:58", "url": "https://files.pythonhosted.org/packages/ab/7b/8e62c8ceef383ee0fb2e40f467952374f9e2b72b98aa1b0451aebbf21e0b/rest_framework_auth0-0.1.1.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "f72a0e75f0a19b9522bc1e02dbe1a2b5", "sha256": "088f616a678bcdfc0b485d020316cb578a2b5e4e313f05711b0dd922152c7ea3" }, "downloads": -1, "filename": "rest_framework_auth0-0.1.5.tar.gz", "has_sig": false, "md5_digest": "f72a0e75f0a19b9522bc1e02dbe1a2b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6574, "upload_time": "2016-10-08T12:52:36", "url": "https://files.pythonhosted.org/packages/07/c5/1a15df3ad320d2e291b9cbf382bb394c3f0644728a1ed24eab17118d3103/rest_framework_auth0-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "a56daaeea3fc432badcc8d8412cc5996", "sha256": "1c8cb9b0383335dabd49e87250b69450c1ad42c5d3b2e8e3d35427c2dd91d501" }, "downloads": -1, "filename": "rest_framework_auth0-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a56daaeea3fc432badcc8d8412cc5996", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7088, "upload_time": "2016-10-19T15:28:13", "url": "https://files.pythonhosted.org/packages/a7/56/f744dd2249177bd371ed18d4379c5d060b9848d0337a989c7e75aca8e6a0/rest_framework_auth0-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "70fa4543296518e69ea6022009bcd016", "sha256": "15160b9028d9988135ea9e13c108922a1756aec59f6b66046d201f079c886d6f" }, "downloads": -1, "filename": "rest_framework_auth0-0.1.7.tar.gz", "has_sig": false, "md5_digest": "70fa4543296518e69ea6022009bcd016", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7322, "upload_time": "2016-10-21T21:46:03", "url": "https://files.pythonhosted.org/packages/b9/9f/64db6ff4b88b4ed8f9de16a420251172fb69475c7abfe43e37cfec2c192e/rest_framework_auth0-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "53226fcdf2838876f57c87a5cf2b2a46", "sha256": "eeffde35e0df74d32050792cbd149dc0099a47dbbc200c45b3abb8928295fa0d" }, "downloads": -1, "filename": "rest_framework_auth0-0.1.8.tar.gz", "has_sig": false, "md5_digest": "53226fcdf2838876f57c87a5cf2b2a46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7333, "upload_time": "2016-12-12T02:19:38", "url": "https://files.pythonhosted.org/packages/7d/92/c2c27891b96c9b741c37649bd1b31b2de7f4391f7aae240d0932dc05f68f/rest_framework_auth0-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "5c4f4ad1258dd0018ecea93d26f32c25", "sha256": "b3726bfa57778ebd28bd9e3fe94206c6b35b8b65e7feef9b3bdddea205c6152f" }, "downloads": -1, "filename": "rest_framework_auth0-0.1.9.tar.gz", "has_sig": false, "md5_digest": "5c4f4ad1258dd0018ecea93d26f32c25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7396, "upload_time": "2016-12-18T21:54:14", "url": "https://files.pythonhosted.org/packages/31/50/ab5dc7f41a74683ee93824de7988a55eadadb046b73a5a482997c29e0fa0/rest_framework_auth0-0.1.9.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f8799406128db34c8474d80c2aeafcb3", "sha256": "f8c1b926a6219fcdc94b3851a25a5fe6912af582d6df23b6f99989b92c4867c1" }, "downloads": -1, "filename": "rest_framework_auth0-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f8799406128db34c8474d80c2aeafcb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6970, "upload_time": "2017-02-18T01:13:31", "url": "https://files.pythonhosted.org/packages/f0/2c/f2a528a894e74cd179cdf0a4eee04ad4311984d5507589d5436438a448bc/rest_framework_auth0-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6f4fd2dfe6bcce8a5cdbe6ebadb752d4", "sha256": "763f8d29736d8970fd630dc0ff369dd6ae0d38edad71fd25da87c72796e5d262" }, "downloads": -1, "filename": "rest_framework_auth0-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6f4fd2dfe6bcce8a5cdbe6ebadb752d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7299, "upload_time": "2017-03-19T15:02:53", "url": "https://files.pythonhosted.org/packages/dc/9d/0ca5783aa6d88418ed24edd2ffc256c8794fe30dc33dda0fa48096b38271/rest_framework_auth0-0.2.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "e32a5df1006f7d3cdb871c554e8e151a", "sha256": "6d63dc1ce2ea90153c028def4ac65aa6804c2c5ccd594b19d9701cfdc1a9432c" }, "downloads": -1, "filename": "rest_framework_auth0-0.4.0.tar.gz", "has_sig": false, "md5_digest": "e32a5df1006f7d3cdb871c554e8e151a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6407, "upload_time": "2017-04-29T03:11:23", "url": "https://files.pythonhosted.org/packages/1c/f4/92a9ce671bb3b96d16f31073d7f73d2972758c65656aa06f223706c502c3/rest_framework_auth0-0.4.0.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "836f96b0d99e752fa9adf82bb625235b", "sha256": "12e3ffc433dc3f73a83a388e35d0f259dabf06375e711af7cb95bb0d7fc36722" }, "downloads": -1, "filename": "rest_framework_auth0-0.4.5.tar.gz", "has_sig": false, "md5_digest": "836f96b0d99e752fa9adf82bb625235b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6442, "upload_time": "2017-05-08T03:10:11", "url": "https://files.pythonhosted.org/packages/bc/f4/26b10fc20327620e1739639b7454cf323766f3bcfd69badc0196a060bc14/rest_framework_auth0-0.4.5.tar.gz" } ], "0.4.6": [ { "comment_text": "", "digests": { "md5": "91340ec1fde99273fe704f038eac0505", "sha256": "6015475e181c820f89fb61bd60a1a29c286496da091ac99b9c30d2b651989d3e" }, "downloads": -1, "filename": "rest_framework_auth0-0.4.6.tar.gz", "has_sig": false, "md5_digest": "91340ec1fde99273fe704f038eac0505", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6465, "upload_time": "2018-01-05T04:13:38", "url": "https://files.pythonhosted.org/packages/e8/56/d116c31b068b871257e6e7d8618e6f655f1e6b6487b697f82bea0810ec5f/rest_framework_auth0-0.4.6.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "3d0749c77c2ce6bf90e5dc26c1b50567", "sha256": "8f563fb6930b6b1d3c20da965e4d43f65fb8fdffd11a366559d08d1fc5faae2d" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3d0749c77c2ce6bf90e5dc26c1b50567", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11769, "upload_time": "2019-04-22T08:05:17", "url": "https://files.pythonhosted.org/packages/17/d0/088c97ff3dd3f76a18197183fedb96bdfe588896ed86ae35da918bec1443/rest_framework_auth0-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "628ab28a10664eeb6d8e57903c64fa06", "sha256": "0d523aa3c0923dc460440b675e735035ba98a2850494ea3358cfcc852488863e" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.0.tar.gz", "has_sig": false, "md5_digest": "628ab28a10664eeb6d8e57903c64fa06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10110, "upload_time": "2019-04-22T08:05:19", "url": "https://files.pythonhosted.org/packages/a3/db/2df903003a44624b65de4ce323a57b1287bff169c25a655fd7fdb1cfe783/rest_framework_auth0-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "d8be49f0b8325bcc2a060740397440e1", "sha256": "0fd01d8f515c351245458bcc64b6dcb881e7716d4740aca1a07237e12ab943b4" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d8be49f0b8325bcc2a060740397440e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11624, "upload_time": "2019-04-27T05:15:53", "url": "https://files.pythonhosted.org/packages/03/86/f9ce814d38868aff2bb82cd5ca623542deb70de3b22adcb0b495ea0a51f9/rest_framework_auth0-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "921963d8a5c0e11076b4ba80e6a263d4", "sha256": "b7e2804994015ba6ea91000777ee02528afad50313fa968483ec3a07f097ae39" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.1.tar.gz", "has_sig": false, "md5_digest": "921963d8a5c0e11076b4ba80e6a263d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10092, "upload_time": "2019-04-27T05:15:55", "url": "https://files.pythonhosted.org/packages/89/ef/8c04f71c7a33afe0aaab3c38f0e2e145779a933ce84b5ca9afc6d7a5a919/rest_framework_auth0-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "5fc6bf8beddf46a27c1cabe7069084ad", "sha256": "53537e9494e60f7caaab25cad6725876c32f7baf89c1118514b28f09ab32827a" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "5fc6bf8beddf46a27c1cabe7069084ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11873, "upload_time": "2019-04-27T06:46:53", "url": "https://files.pythonhosted.org/packages/94/bb/714201f18ae0d74dddd598473c1c33789c605d78df3fb08a0a22190907f4/rest_framework_auth0-0.5.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b614c2b7be004fb3b157a20c44bedf4", "sha256": "e06d790c470940dd7a8854c87072adaa570410a5f16e50a99ec5d48d4939b057" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.2.tar.gz", "has_sig": false, "md5_digest": "0b614c2b7be004fb3b157a20c44bedf4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10339, "upload_time": "2019-04-27T06:46:56", "url": "https://files.pythonhosted.org/packages/3a/5a/d30212c4f0f081434ab6e120ca09dd5e11e49615baccf94d4a82526296db/rest_framework_auth0-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "5ea57a4030e76ed1150e1056a6362b5c", "sha256": "4285450973f8fb0795687cf449b788da35df8a14d8b3621d90e709f73a4cd0a5" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5ea57a4030e76ed1150e1056a6362b5c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11921, "upload_time": "2019-05-06T19:18:25", "url": "https://files.pythonhosted.org/packages/e1/92/eb98bdb4b75acf4257bc7691f668f2b792fb09205903d51445f85686281d/rest_framework_auth0-0.5.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11c40fec36c25dc92dfa5b0b3d034fb8", "sha256": "90f63b52c65edda8315bc022ae2e56bfbb3ddd4e835ce55f765b26fd3bbc80f0" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.3.tar.gz", "has_sig": false, "md5_digest": "11c40fec36c25dc92dfa5b0b3d034fb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39997, "upload_time": "2019-05-06T19:18:27", "url": "https://files.pythonhosted.org/packages/fe/44/8ccc0adf1b6c8f116358814b948c45a12d9971f7feef2242672b31cd6f82/rest_framework_auth0-0.5.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ea57a4030e76ed1150e1056a6362b5c", "sha256": "4285450973f8fb0795687cf449b788da35df8a14d8b3621d90e709f73a4cd0a5" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5ea57a4030e76ed1150e1056a6362b5c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11921, "upload_time": "2019-05-06T19:18:25", "url": "https://files.pythonhosted.org/packages/e1/92/eb98bdb4b75acf4257bc7691f668f2b792fb09205903d51445f85686281d/rest_framework_auth0-0.5.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11c40fec36c25dc92dfa5b0b3d034fb8", "sha256": "90f63b52c65edda8315bc022ae2e56bfbb3ddd4e835ce55f765b26fd3bbc80f0" }, "downloads": -1, "filename": "rest_framework_auth0-0.5.3.tar.gz", "has_sig": false, "md5_digest": "11c40fec36c25dc92dfa5b0b3d034fb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39997, "upload_time": "2019-05-06T19:18:27", "url": "https://files.pythonhosted.org/packages/fe/44/8ccc0adf1b6c8f116358814b948c45a12d9971f7feef2242672b31cd6f82/rest_framework_auth0-0.5.3.tar.gz" } ] }