{ "info": { "author": "Georgy Bazhukov", "author_email": "georgy.bazhukov@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: Public Domain", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "aiohttp-basicauth-middleware\n============================\n\n.. figure:: https://travis-ci.org/bugov/aiohttp-basicauth-middleware.svg?branch=master\n\n\nAiohttp middleware for simple http basic\nauth protection for some urls.\n\nWorks with Python >= 3.5.\n\nWorks with UTF-8 \ud83d\udd96\n\nInstallation\n------------\n\n.. code:: bash\n\n pip install aiohttp-basicauth-middleware\n\nUsage\n-----\n\n.. code:: python\n\n app = web.Application(loop=loop)\n\n app.router.add_route('GET', '/hello', handler_a)\n app.router.add_route('GET', '/admin/hello', handler_b)\n\n app.middlewares.append(\n basic_auth_middleware(\n ('/admin',),\n {'user': 'password'},\n )\n )\n\n\n`basic_auth_middleware` has 3 params:\n\n1. list of protected urls. For example `['/admin']` will match\n with `/admin/user`, but will not match with `/user/admin`.\n2. auth dict \u2013 a dict with pairs: login-password.\n3. strategy (optional) for password comparision. For example you can\n store hashed password in `auth_dict`. See `aiohttp_basicauth_middleware.strategy.BaseStrategy` and\n `example.strategy` for more information.\n\nExample with md5 password hashing:\n\n.. code:: python\n\n app = web.Application(loop=loop)\n\n app.router.add_route('GET', '/hello', handler_a)\n app.router.add_route('GET', '/admin/hello', handler_b)\n\n app.middlewares.append(\n basic_auth_middleware(\n ('/admin',),\n {'user': '5f4dcc3b5aa765d61d8327deb882cf99'},\n lambda x: hashlib.md5(bytes(x, encoding='utf-8')).hexdigest(),\n )\n )\n\n`/admin/...` will be accessed by the same login+password pair ('user', 'password').", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bugov/aiohttp-basicauth-middleware", "keywords": "aiohttp security basicauth http middleware", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "aiohttp-basicauth-middleware", "package_url": "https://pypi.org/project/aiohttp-basicauth-middleware/", "platform": "", "project_url": "https://pypi.org/project/aiohttp-basicauth-middleware/", "project_urls": { "Homepage": "https://github.com/bugov/aiohttp-basicauth-middleware" }, "release_url": "https://pypi.org/project/aiohttp-basicauth-middleware/1.1.2/", "requires_dist": null, "requires_python": "", "summary": "An incredibly simple HTTP basic auth implementation for Aiohttp.", "version": "1.1.2" }, "last_serial": 5301208, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9a3c79eaeb2f4742b356e6001a18712d", "sha256": "d71fbb64adabb07deb366609bdd5d61c29088171fce0dbdf999f8b4cd8d5b240" }, "downloads": -1, "filename": "aiohttp-basicauth-middleware-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9a3c79eaeb2f4742b356e6001a18712d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2737, "upload_time": "2018-02-20T11:26:38", "url": "https://files.pythonhosted.org/packages/bb/4e/8ee64d475cb669ca4856f6b114ef4480f9e850047508b81c2dff20cf0f8e/aiohttp-basicauth-middleware-0.1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b27d674ae9fb9fe05d5ed2c867304ff4", "sha256": "386d72f47324af8bd165a8648f9a52e62f468019e1d61ebc52290dbb5b04d000" }, "downloads": -1, "filename": "aiohttp-basicauth-middleware-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b27d674ae9fb9fe05d5ed2c867304ff4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2908, "upload_time": "2018-02-22T20:55:58", "url": "https://files.pythonhosted.org/packages/9d/79/d6bea2fd93258eb7acacfda69e1a660b268a42a1d1fd94b80f4272747548/aiohttp-basicauth-middleware-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "de7ec736b60da1a63f3f3a27cab85b39", "sha256": "5a2cceab9dc6e47399f12ba5ac1b06f5af39d6c005ed4ea38319b003ceac247b" }, "downloads": -1, "filename": "aiohttp-basicauth-middleware-1.0.2.tar.gz", "has_sig": false, "md5_digest": "de7ec736b60da1a63f3f3a27cab85b39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2915, "upload_time": "2018-02-25T19:07:09", "url": "https://files.pythonhosted.org/packages/26/92/2fa7f63058ee02449d429559a024bb215a141c71fcab66b81b0e21738783/aiohttp-basicauth-middleware-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "72b61ebcaaa9e9aebce111be03184aea", "sha256": "88e471b3a05c573e5b21d10365758dbd08334411f12ac0fee15a4bf3a36f97d2" }, "downloads": -1, "filename": "aiohttp-basicauth-middleware-1.0.3.tar.gz", "has_sig": false, "md5_digest": "72b61ebcaaa9e9aebce111be03184aea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3217, "upload_time": "2018-09-24T12:28:47", "url": "https://files.pythonhosted.org/packages/67/59/3f59a4f34e5290818455f71e40061f1ec6ba5b9ff3ad7d049433be4a6ccd/aiohttp-basicauth-middleware-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "ebf962c2a71b8fb87ea6c3439d6c3811", "sha256": "6836793b84e9f43e33079d4c2d21d45a741e19894749e22138e50ffc89cffdc1" }, "downloads": -1, "filename": "aiohttp_basicauth_middleware-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ebf962c2a71b8fb87ea6c3439d6c3811", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 4841, "upload_time": "2018-11-08T16:37:03", "url": "https://files.pythonhosted.org/packages/b4/ca/cc0eccc35d649eb06a46bbb4b45e98b7a8b709fffd41c51768e02758ebc6/aiohttp_basicauth_middleware-1.1.0-py3-none-any.whl" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "5393a8d72cb6aebe5b68e1370fd528ff", "sha256": "336370fcae8dc75fdab07a988f0afbedcace50968cd4a3eefa778883980a1e59" }, "downloads": -1, "filename": "aiohttp-basicauth-middleware-1.1.1.tar.gz", "has_sig": false, "md5_digest": "5393a8d72cb6aebe5b68e1370fd528ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3966, "upload_time": "2019-05-20T10:48:39", "url": "https://files.pythonhosted.org/packages/69/82/ce1a48d8016bfe80a7b289955dbf8f4931add1995c4c6db4366d4f1242f4/aiohttp-basicauth-middleware-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "08c2117dfba9b6ca052354f8f75a9cea", "sha256": "fb4ff3b5733ab4475dc21ecb30636542ed74c12e9eb711ac77b61795f25eb104" }, "downloads": -1, "filename": "aiohttp-basicauth-middleware-1.1.2.tar.gz", "has_sig": false, "md5_digest": "08c2117dfba9b6ca052354f8f75a9cea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3943, "upload_time": "2019-05-22T07:01:18", "url": "https://files.pythonhosted.org/packages/89/b8/28c31077da33db6c077b3ab45b57c40a550748029c0a66d9dd00eb3d130d/aiohttp-basicauth-middleware-1.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "08c2117dfba9b6ca052354f8f75a9cea", "sha256": "fb4ff3b5733ab4475dc21ecb30636542ed74c12e9eb711ac77b61795f25eb104" }, "downloads": -1, "filename": "aiohttp-basicauth-middleware-1.1.2.tar.gz", "has_sig": false, "md5_digest": "08c2117dfba9b6ca052354f8f75a9cea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3943, "upload_time": "2019-05-22T07:01:18", "url": "https://files.pythonhosted.org/packages/89/b8/28c31077da33db6c077b3ab45b57c40a550748029c0a66d9dd00eb3d130d/aiohttp-basicauth-middleware-1.1.2.tar.gz" } ] }