{ "info": { "author": "Ryan Pineo", "author_email": "ryanpineo@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Programming Language :: Python :: 3" ], "description": "=====\nAbout\n=====\nA new authentication backend for Django REST framework that uses a token with\nan expiration date. A new token is created every time a user logs in. The\ntoken expiration date is refreshed every time the token is used. It supports\ncustom user models\n\nHow To Use\n==========\nAdd to your installed apps\n\n.. code:: python\n\n INSTALLED_APPS = (\n ...\n 'timed_auth_token',\n )\n\nAdd the authentication class to the default authentication classes\n\n.. code:: python\n\n REST_FRAMEWORK = {\n 'DEFAULT_AUTHENTICATION_CLASSES': (\n 'rest_framework.authentication.BasicAuthentication',\n 'rest_framework.authentication.SessionAuthentication',\n 'timed_auth_token.authentication.TimedAuthTokenAuthentication',\n )\n }\n\nThe app comes with a login URL at /login. The endpoint expects two parameters:\nusername and password.\n\n.. code:: python\n\n url_patterns = [\n ...\n # Can login by using /auth/login\n url(r'^auth/', include('timed_auth_token.urls', namespace='auth')),\n ]\n\nAfter a successful login the response contains one key: `token`.\n\n.. code::\n\n {'token': 'lkjalsdjf8asdkjfal;kdfa8s;dlna;sdf'}\n\nTo use this token to authenticate it must be included in the HTTP headers:\n\n.. code::\n\n Authorization: Token YOURTOKEN\n\n\nConfiguration\n=============\nThe only available configuration option is the duration of the token. It\ndefaults to 30 days. You can set it either on the user model as an attribute\nor as a setting in your settings.py. If they are both set, the user model will\ntake precedence.\n\n#. Put it on your user model as an attribute\n\n .. code:: python\n\n from datetime import timedelta\n from django.contrib.auth.models import User\n\n class MyUserModel(User):\n token_validity_duration = timedelta(days=60)\n\n#. Put it in your settings.py\n\n .. code:: python\n\n from datetime import timedelta\n\n TIMED_AUTH_TOKEN = {\n 'DEFAULT_VALIDITY_DURATION': timedelta(days=45)\n }\n\n\nCredits\n=======\nStarting code (model, auth backend) thanks to Jake from `jh.gg `_.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/silverlogic/djangorestframework-timed-auth-token", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "djangorestframework-timed-auth-token", "package_url": "https://pypi.org/project/djangorestframework-timed-auth-token/", "platform": "", "project_url": "https://pypi.org/project/djangorestframework-timed-auth-token/", "project_urls": { "Homepage": "https://github.com/silverlogic/djangorestframework-timed-auth-token" }, "release_url": "https://pypi.org/project/djangorestframework-timed-auth-token/1.3.0/", "requires_dist": null, "requires_python": "", "summary": "An authentication token for djangorestframework that has an expiration date.", "version": "1.3.0" }, "last_serial": 3471619, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "230380964dc8ff73d77d556eb1b84adc", "sha256": "6c3ca911ca56a9fd172f835f302aacddf7d28f32c0d84c0b14b175430f3bf66b" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-0.1.0.tar.gz", "has_sig": false, "md5_digest": "230380964dc8ff73d77d556eb1b84adc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4275, "upload_time": "2015-05-20T17:32:39", "url": "https://files.pythonhosted.org/packages/ad/51/93c1e432e53f9485324a95c92c5a1d1c8d7c74eb792814a34f5b93ff030f/djangorestframework-timed-auth-token-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6713336601b1f066c67bec2bbedb1358", "sha256": "b28cea3746a258e5b3a1d3a17a49d16bf3dcc7aa1e2442151bafb28e25d4266e" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6713336601b1f066c67bec2bbedb1358", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4274, "upload_time": "2015-05-20T17:59:31", "url": "https://files.pythonhosted.org/packages/0e/82/4b3f6439160da380208e4b782b8cac0fdad92dd75af90cb311ef7fdf49bb/djangorestframework-timed-auth-token-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "4c0d5868ef0344f3b8e648ef76b8a4e8", "sha256": "be2f0a3ddd4ce93b186a637cffdbd11fd60ab86708cd3b9efd720e79180d4cd4" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4c0d5868ef0344f3b8e648ef76b8a4e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4394, "upload_time": "2015-05-20T18:09:09", "url": "https://files.pythonhosted.org/packages/77/b9/df5f96d5141821b030692b07146b5060a6cabe11cf6d9ea510ff7ecf8243/djangorestframework-timed-auth-token-0.3.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "f37bd9d57bf26dc63efab9cffa07d04b", "sha256": "64545a703ddbafa523721a96be99177c2f3ff50573de2f234a4123c5e685ba35" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f37bd9d57bf26dc63efab9cffa07d04b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4231, "upload_time": "2015-05-20T18:50:08", "url": "https://files.pythonhosted.org/packages/95/03/140934d51a7c06204001ff5ad9fccb2882849d21b92c7a78541f58429983/djangorestframework-timed-auth-token-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "50ef735f30964a0949d755ab77e775ee", "sha256": "ce41e2dafc54d7bccfa1a952c5aebba7790361cfc89d48b942b6525b25388129" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-1.0.1.tar.gz", "has_sig": false, "md5_digest": "50ef735f30964a0949d755ab77e775ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4201, "upload_time": "2015-05-20T19:34:39", "url": "https://files.pythonhosted.org/packages/99/99/e793301a6c2c82deb1e05207766a794315a86b4b5faf598688afe4acf17d/djangorestframework-timed-auth-token-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "139267556df89e34709dfce976c45c2c", "sha256": "067a74fdd148f2017f18f8043d0bbeabcd42c78b326d21506233b8f01ef8ee54" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-1.0.2.tar.gz", "has_sig": false, "md5_digest": "139267556df89e34709dfce976c45c2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4461, "upload_time": "2015-05-20T19:51:47", "url": "https://files.pythonhosted.org/packages/5b/c6/ec12f68f31b36901337ab60c6aa0b5ced0f1390226e66aed52d83fd8d91c/djangorestframework-timed-auth-token-1.0.2.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "76916c0c04087de8931e3e7dc8fa740e", "sha256": "24730e9e316d19212b74337740feddaf69e836ee8a77f45bcc650efa8acef648" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-1.1.2.tar.gz", "has_sig": false, "md5_digest": "76916c0c04087de8931e3e7dc8fa740e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4484, "upload_time": "2015-05-21T16:16:27", "url": "https://files.pythonhosted.org/packages/cd/ec/a9a24877a7e79707badc39639020c0e25c5171bcff8c454963e64bb39fa4/djangorestframework-timed-auth-token-1.1.2.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "258923b832432f518d330c6ebcdbdc29", "sha256": "ee2083b0b31cab8088c1acf12cc1872d6f2db7f312e7a4df3e0c6bed8bbef8c9" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-1.2.0.tar.gz", "has_sig": false, "md5_digest": "258923b832432f518d330c6ebcdbdc29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4498, "upload_time": "2015-07-31T18:56:19", "url": "https://files.pythonhosted.org/packages/c0/64/f6f1b9dab71b21a81107c86c49d5856e55932b28ca089502e531e0a32b2d/djangorestframework-timed-auth-token-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "40b27eff315a09670ad9e907d4b07940", "sha256": "31a0c2757ef8dc3bf1ff50adeaa78a4ceffeb46d743ae0d611b69c487362c565" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-1.3.0.tar.gz", "has_sig": false, "md5_digest": "40b27eff315a09670ad9e907d4b07940", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4438, "upload_time": "2018-01-08T16:32:34", "url": "https://files.pythonhosted.org/packages/55/a4/47df474254187ba22e48f3598e569354e002d8a4a1488d191cc4df3742ed/djangorestframework-timed-auth-token-1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "40b27eff315a09670ad9e907d4b07940", "sha256": "31a0c2757ef8dc3bf1ff50adeaa78a4ceffeb46d743ae0d611b69c487362c565" }, "downloads": -1, "filename": "djangorestframework-timed-auth-token-1.3.0.tar.gz", "has_sig": false, "md5_digest": "40b27eff315a09670ad9e907d4b07940", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4438, "upload_time": "2018-01-08T16:32:34", "url": "https://files.pythonhosted.org/packages/55/a4/47df474254187ba22e48f3598e569354e002d8a4a1488d191cc4df3742ed/djangorestframework-timed-auth-token-1.3.0.tar.gz" } ] }