{ "info": { "author": "Hiroki KIYOHARA", "author_email": "hirokiky@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "================\ndjango-basicauth\n================\n\nBasic auth utilities for Django.\n\nRequires\n========\n\nTested under...\n\n* Python\n\n * 2.7\n * 3.6\n * 3.7\n\n* Django\n\n * 1.11\n * 2.1\n * 2.2\n\nInstallation\n============\n\n::\n\n pip install django-basicauth\n\n\nUsage\n=====\n\n.. code-block:: python\n\n from basicauth.decorators import basic_auth_required\n\n @basic_auth_required\n def myview(request):\n ...\n\nor by a middleware.\n\n.. code-block:: python\n\n MIDDLEWARE = (\n 'basicauth.middleware.BasicAuthMiddleware',\n ...\n )\n\nThe name of ``MIDDLEWARE`` settings is ``MIDDLEWARE_CLASSES`` on Django 1.8.\n\nBasic Auth for specific requestno only\n--------------------------------------\n\nTo apply basic auth for specific requests,\nUse ``target_test`` argument.\n\nIn the below code, anonymous users will be required Basic Auth\nAuthenticated users can pass it without `Basic ...` header.\n\n.. code-block:: python\n\n from basicauth.decorators import basic_auth_required\n\n @basic_auth_required(\n target_test=lambda request: not request.user.is_authenticated\n )\n def myview(request):\n ...\n\n``target_test`` accepts ``typing.Callable[[HttpRequest], bool]``,\nand if the callable returns ``True``, Basic Auth will be required.\n\nApplying decorator to CBVs\n==========================\n\nTo apply ``@basic_auth_required`` decorator to Class Based Views,\nuse ``django.utils.decorators.method_decorator``.\n\n.. code-block:: python\n\n from django.utils.decorators import method_decorator\n from basicauth.decorators import basic_auth_required\n\n @method_decorator(basic_auth_required, name='dispatch')\n class YourView(TemplateView):\n template_name = \"my-template.html\"\n\nSettings\n========\n\n* ``BASICAUTH_USERS`` (required): Dictionary including keys as username and values as passwords.\n* ``BASICAUTH_REALM``: realm string, default is \"Secure resource\".\n* ``BASICAUTH_DISABLE``: Disable all of barriers by this library.\n\n\nChanges\n=======\n\n0.5.1 (2018-08-06)\n--------------------------\n* Added supporting Django2.1\n * Thanks @rhymes\n\n0.5 (2018-05-09)\n---------------------\n* Added supporting Django2.0\n * Thanks @timheap\n\n0.4.2 (2017-11-27)\n------------------\n* Fixed to avoid timing attacks\n * Lots of thanks for Hugo Castilho\n\n0.4.1 (2017-10-20)\n------------------\n* Added ``target_test`` argument for the decorator.\n\n0.4 (2017-09-30)\n----------------\n\n* Supported Python 2.7\n* Dropped Django1.9\n* Supported Django 1.10+ style middleware\n\n0.3 (2017-08-28)\n----------------\n\n* Added ``BASICAUTH_DISABLE`` setting\n* Changed API of ``basicauthutils.validate_request``\n * Fixed to return True/False\n * Adding REMOTE_USER by this function\n\n0.2.1 (2017-08-28)\n------------------\n\n* Officially supported Django 1.11, 1.10, 1.9\n\n0.2 (2016-03-31)\n----------------\n\n* Added BasicAuthMiddleware https://github.com/hirokiky/django-basicauth/pull/3\n\n0.1 (2015-04-20)\n----------------\n\n* Initial\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hirokiky/django-basicauth/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-basicauth", "package_url": "https://pypi.org/project/django-basicauth/", "platform": "", "project_url": "https://pypi.org/project/django-basicauth/", "project_urls": { "Homepage": "https://github.com/hirokiky/django-basicauth/" }, "release_url": "https://pypi.org/project/django-basicauth/0.5.2/", "requires_dist": null, "requires_python": "", "summary": "Basic auth utilities for Django.", "version": "0.5.2" }, "last_serial": 5106450, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f599b3cf7c93f6f9ac5fad73a899fd73", "sha256": "d764f54d0eff5e266ea087084c5af45837a6aca0ad917a4be62f79ea2eab9e80" }, "downloads": -1, "filename": "django-basicauth-0.1.tar.gz", "has_sig": false, "md5_digest": "f599b3cf7c93f6f9ac5fad73a899fd73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3196, "upload_time": "2015-04-20T06:38:59", "url": "https://files.pythonhosted.org/packages/14/65/77504d4dca8c1aa8302047d1f0639c8971abc2f8f04cf869f542cbd8aa08/django-basicauth-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b6ade517b70c185bf385698178ef87e4", "sha256": "25a3cf94219b3e301cc82f285c1cc677ae06f824b36990d7bd019c87beff258e" }, "downloads": -1, "filename": "django-basicauth-0.2.tar.gz", "has_sig": false, "md5_digest": "b6ade517b70c185bf385698178ef87e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3619, "upload_time": "2016-03-30T15:14:03", "url": "https://files.pythonhosted.org/packages/9c/3a/84a3311061248fb4de5219f1bbd2755bcadfd5517d05f739e9da2ae9b004/django-basicauth-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6315697f1885d88d291e1bf1edd37683", "sha256": "cb1b16aaa9d7023bf34c34efdf8d5851729d78d699b387549c1dfee3422593fe" }, "downloads": -1, "filename": "django_basicauth-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6315697f1885d88d291e1bf1edd37683", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 4891, "upload_time": "2017-08-28T06:01:14", "url": "https://files.pythonhosted.org/packages/23/66/c941e234e2c516330612113ed814b5e014053493466bcb8e9093b5f512b0/django_basicauth-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "16b4de59e3049fc055a84c48fcf18d69", "sha256": "a35355e8abd51849dd3ee764a6f0cf2870218fe0334f93f7c09853212fdbbc8c" }, "downloads": -1, "filename": "django-basicauth-0.2.1.tar.gz", "has_sig": false, "md5_digest": "16b4de59e3049fc055a84c48fcf18d69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3663, "upload_time": "2017-08-28T06:01:12", "url": "https://files.pythonhosted.org/packages/d6/a8/747f97470ed57194f65502baeb121c060ffddfed31766373ac5daa94a848/django-basicauth-0.2.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "6d090728b94888864f64857a3c3096de", "sha256": "733d089bbe6d06247286aa475e3c30c6709444ee76c1d5b2bbd6fac8e519046f" }, "downloads": -1, "filename": "django_basicauth-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6d090728b94888864f64857a3c3096de", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5144, "upload_time": "2017-08-28T06:30:46", "url": "https://files.pythonhosted.org/packages/b8/df/5b6a1dcbbe6becc5e7ef7e5028d055cdfb3966361fa5384e8ca3cdd691aa/django_basicauth-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "38e77c7c2625079ad0c124c4caf48e65", "sha256": "0550c4117e1166d84dab205057f8082503737055c82180351339581704d6eeea" }, "downloads": -1, "filename": "django-basicauth-0.3.tar.gz", "has_sig": false, "md5_digest": "38e77c7c2625079ad0c124c4caf48e65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3874, "upload_time": "2017-08-28T06:30:44", "url": "https://files.pythonhosted.org/packages/bc/02/f1d92fce399cc4cf997456c7f60c35c95239921adec37f37a5155a274057/django-basicauth-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "21de9f2dbb73b3cdaf43f969a181c0d4", "sha256": "f54d135c035deb12efac050847defb5395be4cd1e75140dab6ee815a7bc2021c" }, "downloads": -1, "filename": "django_basicauth-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "21de9f2dbb73b3cdaf43f969a181c0d4", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 5651, "upload_time": "2017-09-30T03:32:26", "url": "https://files.pythonhosted.org/packages/97/ac/9dccafe3070304b56c14ebc9a6d8c2e1448eec55dee38f3f4b22fce94e6b/django_basicauth-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ff2bcdfbd43b761af14894c0ef64841", "sha256": "23f514657eed86aab2762942f744aea2323968521be0271c8772eecc5da2db1f" }, "downloads": -1, "filename": "django-basicauth-0.4.tar.gz", "has_sig": false, "md5_digest": "1ff2bcdfbd43b761af14894c0ef64841", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4202, "upload_time": "2017-09-30T03:32:24", "url": "https://files.pythonhosted.org/packages/0d/25/e6be7c38f65fbd1b47eaba073bb3fbcb7919c0e1b4c815e405fd38a788e4/django-basicauth-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "3737d69572a096e74ac1e5f9f19c80ff", "sha256": "e3d9f3f28f37bee15dbd6e934100806179269e8ce9f76c7d0c669d2c27fc1786" }, "downloads": -1, "filename": "django_basicauth-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3737d69572a096e74ac1e5f9f19c80ff", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6197, "upload_time": "2017-10-20T04:29:08", "url": "https://files.pythonhosted.org/packages/39/71/cbc753dd157cba3384de9dc87e8bfa0c4d88c63a076d288d85f7d3095f66/django_basicauth-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "35aa0df6380e083ee9fd2995f32cfccb", "sha256": "0269a10aa0bacc0a3b496aed71bee3eedeb5ec30be88a0ed24226aebd89bb120" }, "downloads": -1, "filename": "django-basicauth-0.4.1.tar.gz", "has_sig": false, "md5_digest": "35aa0df6380e083ee9fd2995f32cfccb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4552, "upload_time": "2017-10-20T04:29:06", "url": "https://files.pythonhosted.org/packages/cb/80/1bd5f7af734c55788ed7f2f3d508bf72f4071cf372598d5aedff87ac1d2c/django-basicauth-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "abecd15318b53e71330a3e92dc8b0f07", "sha256": "fec2e0baabf473aa195d248f192fcc9595967f9a3f34c8174adb616497f5aa37" }, "downloads": -1, "filename": "django_basicauth-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "abecd15318b53e71330a3e92dc8b0f07", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6741, "upload_time": "2017-11-27T14:35:55", "url": "https://files.pythonhosted.org/packages/63/79/003f4b3f7e88c065cf7d45f3503b2eccd80b403839c5ec24b9923acfc806/django_basicauth-0.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6df0687df81b02f63c9e18c913de7be9", "sha256": "524518a2b9965a326efecb4ab6c371c9b990224efd612f5d755c8f200fe0ed8c" }, "downloads": -1, "filename": "django-basicauth-0.4.2.tar.gz", "has_sig": false, "md5_digest": "6df0687df81b02f63c9e18c913de7be9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4960, "upload_time": "2017-11-27T14:35:52", "url": "https://files.pythonhosted.org/packages/1e/dc/95fd729cdc1528c08d473242f04a8a088888b77b3c07cf954e0a526fcc2f/django-basicauth-0.4.2.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "419a898439284a2ec01364a32f492a8f", "sha256": "a35bacad5f53d577ec5168341e9884d5de8f3d730298e29bee301002cbff0dbc" }, "downloads": -1, "filename": "django_basicauth-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "419a898439284a2ec01364a32f492a8f", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4850, "upload_time": "2018-05-09T07:37:48", "url": "https://files.pythonhosted.org/packages/4b/9f/91bb5d911e27c050ea9ecb787dcf90de12f6365fde49a264de65932ef247/django_basicauth-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7eb5380de4312ad6eeaf52ef783f860f", "sha256": "c0a7e3ce7305f2a8d9bf32fe2205fb5d7ab9a1cd7197ec71223d110f7f6cd1bb" }, "downloads": -1, "filename": "django-basicauth-0.5.tar.gz", "has_sig": false, "md5_digest": "7eb5380de4312ad6eeaf52ef783f860f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4954, "upload_time": "2018-05-09T07:37:47", "url": "https://files.pythonhosted.org/packages/4c/4e/5d61e6f0035ecadcf50bd7974538131783bcfd37d097418846d77ba36855/django-basicauth-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "ed9f734e2e222d4c20cbd67e690e11b6", "sha256": "740a176e0bbeed8fd267e165a4373aa51a346258fb87479670dd7f6846f118d1" }, "downloads": -1, "filename": "django_basicauth-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ed9f734e2e222d4c20cbd67e690e11b6", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4928, "upload_time": "2018-08-06T08:42:59", "url": "https://files.pythonhosted.org/packages/81/8c/b5c1ffc035c61057a69e3a941bd0be3dc42d211d97637dfc1d7cb834bb80/django_basicauth-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d75feb56d23bbdea22bc9c0bab4c472d", "sha256": "0ceff44ebc129eb7f8bde212a2f663210796ea1ba6e00d944cba50d4ef326f79" }, "downloads": -1, "filename": "django-basicauth-0.5.1.tar.gz", "has_sig": false, "md5_digest": "d75feb56d23bbdea22bc9c0bab4c472d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5076, "upload_time": "2018-08-06T08:42:57", "url": "https://files.pythonhosted.org/packages/99/6f/8c6aaf0bb4134c97fbbe9d032f740c8089a9299b64df27e1cfe0ae08ba4b/django-basicauth-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "8896f5b4c0568f8889522f53cc97f732", "sha256": "d272a9b6b807d96b1e3b07ebf123bac90c1c72dada517ca9e1e4238a1236cdaf" }, "downloads": -1, "filename": "django_basicauth-0.5.2-py2-none-any.whl", "has_sig": false, "md5_digest": "8896f5b4c0568f8889522f53cc97f732", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6861, "upload_time": "2019-04-06T03:48:07", "url": "https://files.pythonhosted.org/packages/dc/1b/7467865abe59c320e979b134fc1691f3891bcbd13045911f77a5fe416211/django_basicauth-0.5.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c61327f72c2a5da0fe8c2976e54beabf", "sha256": "295adfbf6d30ab03d2000131da00f388e43d31f2ee7e9a0b51c4d7eb51896f7f" }, "downloads": -1, "filename": "django_basicauth-0.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c61327f72c2a5da0fe8c2976e54beabf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6224, "upload_time": "2019-04-06T03:53:58", "url": "https://files.pythonhosted.org/packages/fc/a0/2dddd7a31aebd54120c11893513b4b8d1002dad3e121cdc600197c588603/django_basicauth-0.5.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9171c49ccc8fd2b122fca28a7133ca03", "sha256": "cb55997f6567d14c65859033503c5cd6f68c75e18f0061871f523c98c7d33195" }, "downloads": -1, "filename": "django-basicauth-0.5.2.tar.gz", "has_sig": false, "md5_digest": "9171c49ccc8fd2b122fca28a7133ca03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5004, "upload_time": "2019-04-06T03:48:05", "url": "https://files.pythonhosted.org/packages/5f/bb/e7bd015a9c0103ff6020d0264fe2480544c573df075ff203f6a443e0a95c/django-basicauth-0.5.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8896f5b4c0568f8889522f53cc97f732", "sha256": "d272a9b6b807d96b1e3b07ebf123bac90c1c72dada517ca9e1e4238a1236cdaf" }, "downloads": -1, "filename": "django_basicauth-0.5.2-py2-none-any.whl", "has_sig": false, "md5_digest": "8896f5b4c0568f8889522f53cc97f732", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6861, "upload_time": "2019-04-06T03:48:07", "url": "https://files.pythonhosted.org/packages/dc/1b/7467865abe59c320e979b134fc1691f3891bcbd13045911f77a5fe416211/django_basicauth-0.5.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c61327f72c2a5da0fe8c2976e54beabf", "sha256": "295adfbf6d30ab03d2000131da00f388e43d31f2ee7e9a0b51c4d7eb51896f7f" }, "downloads": -1, "filename": "django_basicauth-0.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c61327f72c2a5da0fe8c2976e54beabf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6224, "upload_time": "2019-04-06T03:53:58", "url": "https://files.pythonhosted.org/packages/fc/a0/2dddd7a31aebd54120c11893513b4b8d1002dad3e121cdc600197c588603/django_basicauth-0.5.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9171c49ccc8fd2b122fca28a7133ca03", "sha256": "cb55997f6567d14c65859033503c5cd6f68c75e18f0061871f523c98c7d33195" }, "downloads": -1, "filename": "django-basicauth-0.5.2.tar.gz", "has_sig": false, "md5_digest": "9171c49ccc8fd2b122fca28a7133ca03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5004, "upload_time": "2019-04-06T03:48:05", "url": "https://files.pythonhosted.org/packages/5f/bb/e7bd015a9c0103ff6020d0264fe2480544c573df075ff203f6a443e0a95c/django-basicauth-0.5.2.tar.gz" } ] }