{ "info": { "author": "Christian Kreuzberger", "author_email": "ckreuzberger@anexia-it.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "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", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Django Rest Multi Token Auth\nThis django app is an extension for the Django Rest Framework (Version 3.4+).\nIt tries to overcome the limitation of Token Authentication, which only uses a single\ntoken per user. \n\n## How to use\n\nInstall:\n```bash\npip install django-rest-multitokenauth\n```\n\nAdd ``'django_rest_multitokenauth'`` to your ``INSTALLED_APPS`` in your Django settings file:\n```python\nINSTALLED_APPS = (\n ...\n 'django.contrib.auth',\n ...\n 'rest_framework',\n ...\n 'django_rest_multitokenauth',\n ...\n)\n\n```\n\nConfigure Django REST Framework to use ``'django_rest_multitokenauth.coreauthentication.MultiTokenAuthentication'``:\n```python\nREST_FRAMEWORK = {\n ...\n 'DEFAULT_AUTHENTICATION_CLASSES': [\n ...\n 'django_rest_multitokenauth.coreauthentication.MultiTokenAuthentication',\n ...\n ],\n ...\n}\n```\n\n\nAnd add the auth urls to your Django url settings:\n```python\nfrom django.conf.urls import url, include\n\n\nurlpatterns = [\n ...\n url(r'^api/auth/', include('django_rest_multitokenauth.urls', namespace='multi_token_auth')),\n ...\n] \n```\n\n\nThe following endpoints are provided:\n\n * `login` - takes username and password; on success an auth token is returned\n * `logout`\n\n## Signals\n\n* ``pre_auth(username, password)`` - Fired when an authentication (login) is starting\n* ``post_auth(user)`` - Fired on successful auth\n\n## Tests\n\nSee folder [tests/](tests/). Basically, all endpoints are covered with multiple\nunit tests.\n\nUse this code snippet to run tests:\n```bash\npip install tox\ntox\n```\n\n## Cache Backend\nIf you want to use a cache for the session store, you can install [django-memoize](https://pythonhosted.org/django-memoize/) and add `'memoize'` to `INSTALLED_APPS`.\n\nThen you need to use ``CachedMultiTokenAuthentication`` instead of ``MultiTokenAuthentication``.\n\n```bash\npip install django-memoize\n```\n\n## Django Compatibility Matrix\n\nIf your project uses an older verison of Django or Django Rest Framework, you can choose an older version of this project.\n\n| This Project | Python Version | Django Version | Django Rest Framework |\n|--------------|----------------|----------------|-----------------------|\n| 1.3.* | 2.7, 3.4+ | 1.11, 2.0+ | 3.6, 3.7, 3.8 |\n| 1.2.* | 2.7, 3.4+ | 1.8, 1.11, 2.0+| 3.6, 3.7, 3.8 |\n\n\n## Changelog / Releases\nAll releases should be listed in the [releases tab on github](https://github.com/anx-ckreuzberger/django-rest-multiauthtoken/releases).\n\nSee [CHANGELOG.md](CHANGELOG.md) for a more detailed listing.\n\n\n## License\nThis project is published with the [BSD 3 Clause License](LICENSE). See [https://choosealicense.com/licenses/bsd-3-clause-clear/](https://choosealicense.com/licenses/bsd-3-clause-clear/) for more information about what this means.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anx-ckreuzberger/django-rest-multiauthtoken", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-rest-multitokenauth", "package_url": "https://pypi.org/project/django-rest-multitokenauth/", "platform": "", "project_url": "https://pypi.org/project/django-rest-multitokenauth/", "project_urls": { "Homepage": "https://github.com/anx-ckreuzberger/django-rest-multiauthtoken" }, "release_url": "https://pypi.org/project/django-rest-multitokenauth/1.3.1/", "requires_dist": null, "requires_python": "", "summary": "An extension of django rest frameworks token auth, providing multiple tokens per user", "version": "1.3.1" }, "last_serial": 5599025, "releases": { "1.1.1": [ { "comment_text": "", "digests": { "md5": "cdadfd1f39ded4536c107c612ff4bcf0", "sha256": "73a554caf654f695a836efee085c29ac37859c9ebbb5f973bbc8883cf75da1a9" }, "downloads": -1, "filename": "django-rest-multitokenauth-1.1.1.tar.gz", "has_sig": false, "md5_digest": "cdadfd1f39ded4536c107c612ff4bcf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10230, "upload_time": "2017-08-10T06:00:26", "url": "https://files.pythonhosted.org/packages/16/b0/39c9f1a7a61c9160e1d29391dd8c5031c6522a568f7309f12200a4544dc0/django-rest-multitokenauth-1.1.1.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "3c846666d97648a0b824e2b32266755f", "sha256": "caa44a21a741151dacab679848d192821963d8432c6f6afcae2098db26096cd3" }, "downloads": -1, "filename": "django-rest-multitokenauth-1.2.1.tar.gz", "has_sig": false, "md5_digest": "3c846666d97648a0b824e2b32266755f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10397, "upload_time": "2018-05-08T15:02:25", "url": "https://files.pythonhosted.org/packages/16/d6/c8cae4f80b76245d17c5f9ad586cc49116f73e2bf758909c0aac0f0e54c0/django-rest-multitokenauth-1.2.1.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "0745ca9263998032b4d20dd861ca6a17", "sha256": "9510bba30f4a973e97597c8fda856195f6127dfb1db8b0d2cdc64056d09bd245" }, "downloads": -1, "filename": "django-rest-multitokenauth-1.3.1.tar.gz", "has_sig": false, "md5_digest": "0745ca9263998032b4d20dd861ca6a17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11971, "upload_time": "2018-08-27T08:37:39", "url": "https://files.pythonhosted.org/packages/ad/88/ab857a35fcdfa98ef76237c3ae82a025753fc16b2495a5c05b6ec2b767b6/django-rest-multitokenauth-1.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0745ca9263998032b4d20dd861ca6a17", "sha256": "9510bba30f4a973e97597c8fda856195f6127dfb1db8b0d2cdc64056d09bd245" }, "downloads": -1, "filename": "django-rest-multitokenauth-1.3.1.tar.gz", "has_sig": false, "md5_digest": "0745ca9263998032b4d20dd861ca6a17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11971, "upload_time": "2018-08-27T08:37:39", "url": "https://files.pythonhosted.org/packages/ad/88/ab857a35fcdfa98ef76237c3ae82a025753fc16b2495a5c05b6ec2b767b6/django-rest-multitokenauth-1.3.1.tar.gz" } ] }