{ "info": { "author": "Tomasz W\u00f3jcik", "author_email": "tomek@bthlabs.pl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-HTAuth\n============\n\n**Flask-HTAuth** provides Flask apps with easy to integrate basic HTTP authentication. The extension supports standard htpasswd files.\n\nInstallation\n------------\n\nInstall with the usual::\n\n pip install flask-htauth\n\nor download source from GitHub::\n\n git clone https://github.com/tomekwojcik/flask-htauth.git\n cd flask-htauth\n python setup.py develop\n\nConfiguration\n-------------\n\nFlask-HTAuth uses the following settings:\n\n* ``HTAUTH_HTPASSWD_PATH`` - path to htpasswd file,\n* ``HTAUTH_REALM`` - authentication realm (defaults to ``Protected Area``)\n\n\nExample app\n-----------\n\n::\n\n from flask import Flask, g\n from flask.ext import htauth\n import os\n\n HTPASSWD = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'htpasswd')\n\n app = Flask(__name__)\n app.config['HTAUTH_HTPASSWD_PATH'] = HTPASSWD\n app.config['HTAUTH_REALM'] = 'Top Secret Area'\n\n auth = htauth.HTAuth(app)\n\n @app.route('/')\n def app_index():\n return 'Hello, World!'\n\n @app.route('/secret')\n @htauth.authenticated\n def app_secret():\n return 'Hello, ' + g.htauth_user + '!'\n\nIf the request is missing ``Authorization`` header or auth data is invalid the ``authenticated`` decorator will return response that will force the user agent to request authentication data from the user.\n\nFeatures\n--------\n\n* Basic auth,\n* Support for MD5, SHA and crypt htpasswd password encrypting.\n\nLicense\n-------\n\nFlask-HTAuth is licensed under MIT License. See `LICENSE`_ for more details.\n\nCredits\n-------\n\nFlask-HTAuth is developed by `BTHLabs`_. The extension was inspired by `django-htauth`_. Uses MD5 crypt code from `this snippet`_.\n\n.. _LICENSE: http://github.com/tomekwojcik/flask-htauth/blob/master/LICENSE\n.. _BTHLabs: http://www.bthlabs.pl/\n.. _django-htauth: http://pypi.python.org/pypi/django-htauth/\n.. _this snippet: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/325204", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/tomekwojcik/flask-htauth/tarball/v0.1.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://tomekwojcik.github.com/flask-htauth/", "keywords": null, "license": "https://github.com/tomekwojcik/flask-htauth/blob/master/LICENSE", "maintainer": null, "maintainer_email": null, "name": "Flask-HTAuth", "package_url": "https://pypi.org/project/Flask-HTAuth/", "platform": "any", "project_url": "https://pypi.org/project/Flask-HTAuth/", "project_urls": { "Download": "https://github.com/tomekwojcik/flask-htauth/tarball/v0.1.2", "Homepage": "http://tomekwojcik.github.com/flask-htauth/" }, "release_url": "https://pypi.org/project/Flask-HTAuth/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Easy to integrate basic HTTP authentication for Flask apps", "version": "0.1.2" }, "last_serial": 784293, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "27b429d94e1b37a16188ab4dde0f4919", "sha256": "2ab4bbeb2757606d690b0c71a82be400dd3333eacd47cbcc49b27be01c41479a" }, "downloads": -1, "filename": "Flask-HTAuth-0.1.tar.gz", "has_sig": false, "md5_digest": "27b429d94e1b37a16188ab4dde0f4919", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4651, "upload_time": "2012-09-15T09:19:27", "url": "https://files.pythonhosted.org/packages/9d/b1/48410aacb790631b16460f2a0ef7d2d39853904a5241655be0d9a222bd42/Flask-HTAuth-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ea4fd09232f66a41769876aaede1743e", "sha256": "51f638a796e30a18bba4ed51193bc0cf55f5445094310469ecfc7263bcf0a4b8" }, "downloads": -1, "filename": "Flask-HTAuth-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ea4fd09232f66a41769876aaede1743e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4655, "upload_time": "2012-09-15T09:22:59", "url": "https://files.pythonhosted.org/packages/05/e2/526e0a46da6e9a22810852c04bfd2caa6406192afa65468641c31fef5297/Flask-HTAuth-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0591ea5969674c493ce584b05798e748", "sha256": "ba6caadbe44da9c84544c901ca9800cf91152162fefd116b4dc826113d55f4d5" }, "downloads": -1, "filename": "Flask-HTAuth-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0591ea5969674c493ce584b05798e748", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5043, "upload_time": "2012-09-15T09:26:13", "url": "https://files.pythonhosted.org/packages/82/df/96734a25fe86a2339e756ea67c73e7866706dd7b21499b86f93b08c55b1b/Flask-HTAuth-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0591ea5969674c493ce584b05798e748", "sha256": "ba6caadbe44da9c84544c901ca9800cf91152162fefd116b4dc826113d55f4d5" }, "downloads": -1, "filename": "Flask-HTAuth-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0591ea5969674c493ce584b05798e748", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5043, "upload_time": "2012-09-15T09:26:13", "url": "https://files.pythonhosted.org/packages/82/df/96734a25fe86a2339e756ea67c73e7866706dd7b21499b86f93b08c55b1b/Flask-HTAuth-0.1.2.tar.gz" } ] }