{ "info": { "author": "Ib Lundgren", "author_email": "ib.lundgren@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Flask-OAuthProvider\n===================\n\nFlask-OAuthProvider is an extension that makes it easy to secure your views \nwith OAuth::\n\n @provider.require_oauth()\n def user_feed(self):\n ...\n\nIt gives you fine grained control over access through the use of *realms*::\n\n @provider.require_oauth(realm=\"photos\")\n def user_photos(self):\n ...\n\nAs well as the OAuth parameters such as client key and token::\n\n @provider.require_oauth()\n def whoami(self):\n return request.oauth.client_key\n\n\n**Note this extension does NOT give you an OAuth client.** For that simply use\n`requests`_ which has OAuthLib backed OAuth support built in. If you want to\nknow more about OAuth check out the excellent guide at `hueniverse`_ or dig\ninto the very readable `OAuth 1 RFC 5849 spec`_.\n\n.. _`requests`: https://github.com/kennethreitz/requests\n.. _`hueniverse`: http://hueniverse.com/oauth/\n.. _`OAuth 1 RFC 5849 spec`: http://tools.ietf.org/html/rfc5849\n\nExample\n-------\n\nTake a look at the example application for a fully working, SQLite / SQLAlchemy\nbacked OAuth provider in the `/examples`_ folder.\n\nBefore running the demo you need to install a few dependencies (virtualenv is \nhighly recommended). This will be replaced by a single line of pip soon...::\n\n $ virtualenv venv\n $ source venv/bin/activate\n (venv)$ git clone https://github.com/idan/oauthlib.git\n (venv)$ python oauthlib/setup.py install\n (venv)$ git clone https://github.com/ib-lundgren/flask-oauthprovider.git \n (venv)$ python flask-oauthprovider/setup.py install\n (venv)$ pip install flask-openid sqlalchemy\n\nAfter installing you can run the demo application::\n\n (venv)$ python flask-oauthprovider/examples/runserver.py\n\nUsage\n-----\n\nFlask-OAuthProvider builds opon `OAuthLib`_ and its `OAuth 1 RFC 5849 Server`_ class.\nYou will need to implement a number of abstract methods, required from either\nServer (`OAuthLib`_) or OAuthProvider(Flask-OAuthProvider). These methods are \nmainly data storage or retrieval methods. No assumptions are made about\nthe persistence system you use and as such you are free to use any you see fit.\n\nWhile implementing your provider class you want to give `OAuthLib Server docs`_\nand the `OAuthProvider source`_ a thorough read.\n\nThe implementation guide is on its way, feel free to take a look at the overview\npictures of how Flask-OAuthProvider and OAuthLib fit into the OAuth workflow.\n\n* `Client registration`_\n* `Request tokens`_\n* `Access tokens`_\n* `Request verification`_\n\nWhen you have hacked together a shiny provider class it will be easy to secure your API with OAuth::\n\n app = Flask(__name__)\n provider = YourProvider(app)\n\n @app.route(\"/my_secrets\")\n @provider.require(realm=\"secrets\")\n def my_secrets(self):\n ...\n\n\n.. _`OAuth 1 RFC 5849 Server`: https://github.com/idan/oauthlib/blob/master/oauthlib/oauth1/rfc5849/__init__.py\n.. _`OAuthLib`: https://github.com/idan/oauthlib\n.. _`/examples`: https://github.com/ib-lundgren/flask-oauthprovider/tree/master/examples\n.. _`OAuthLib Server docs`: https://github.com/idan/oauthlib/blob/master/docs/server.rst\n.. _`OAuthProvider source`: https://github.com/ib-lundgren/flask-oauthprovider/blob/master/flask_oauthprovider.py\n.. _`Client registration`: https://github.com/ib-lundgren/flask-oauthprovider/raw/master/docs/images/client_registration.png\n.. _`Request tokens`: https://github.com/ib-lundgren/flask-oauthprovider/raw/master/docs/images/request_token.png\n.. _`Access tokens`: https://github.com/ib-lundgren/flask-oauthprovider/raw/master/docs/images/access_token.png \n.. _`Request verification`: https://github.com/ib-lundgren/flask-oauthprovider/raw/master/docs/images/request_verification.png\n\nInstall\n-------\n\nFlask-OAuthProvider will be easily installed using pip when OAuthLib 0.2.0 is available on pypi ::\n\n pip install flask-oauthprovider", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ib-lundgren/flask-oauthprovider", "keywords": null, "license": "Copyright (c) 2010-2011, Ib Lundgren and contributors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\nNeither the name of Ib Lundgren nor the names of its contributors may be used\nto endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS\nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.", "maintainer": null, "maintainer_email": null, "name": "flask-oauthprovider", "package_url": "https://pypi.org/project/flask-oauthprovider/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/flask-oauthprovider/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ib-lundgren/flask-oauthprovider" }, "release_url": "https://pypi.org/project/flask-oauthprovider/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "A full featured and secure OAuth provider base", "version": "0.1.3" }, "last_serial": 758037, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "8428b692c410366ddd5f06ca68f4aa6b", "sha256": "0296c2c9bbd4e65409b9e1f852c354a799899ffee46e01a194f1579b8e141f0b" }, "downloads": -1, "filename": "flask-oauthprovider-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8428b692c410366ddd5f06ca68f4aa6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6436, "upload_time": "2012-06-25T17:12:32", "url": "https://files.pythonhosted.org/packages/f1/16/5725d99e826b4522f869dc4e1e7b358ac71705e50afeac4b441aef2c4060/flask-oauthprovider-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e04b4f17ab50aa9d56d279bb3c09112d", "sha256": "186f7d74d82917377719d39d932a17a8f5dd895d46f3689c4afe1ddd70369850" }, "downloads": -1, "filename": "flask-oauthprovider-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e04b4f17ab50aa9d56d279bb3c09112d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6832, "upload_time": "2012-06-25T17:19:54", "url": "https://files.pythonhosted.org/packages/e7/20/1a6bdb2ebf1cd1604a4de5b77d20864554865680931c11f59334df4ff419/flask-oauthprovider-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f9b5d51fbca7dce79f250940295951e4", "sha256": "934541d5d8a517b549e9c85ce76f058a6495726035da456a7aefa9aad19878bf" }, "downloads": -1, "filename": "flask-oauthprovider-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f9b5d51fbca7dce79f250940295951e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7320, "upload_time": "2012-06-27T12:12:52", "url": "https://files.pythonhosted.org/packages/31/49/0dcf3b7feb6dee47a8e07df19225082a1b289ebb922547c5490b373b6331/flask-oauthprovider-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ceee372a6ad7cf0a079da99018941387", "sha256": "96a3fc8256ff1bc1fdca944727d9ae10d75e338d4bbb8f54b9ded997952ccd1c" }, "downloads": -1, "filename": "flask-oauthprovider-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ceee372a6ad7cf0a079da99018941387", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7346, "upload_time": "2012-06-27T19:08:40", "url": "https://files.pythonhosted.org/packages/34/70/b933658a879cd2dbb5d3ab19440db48d52f0b94a8d034b7b546f92bcc5af/flask-oauthprovider-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ceee372a6ad7cf0a079da99018941387", "sha256": "96a3fc8256ff1bc1fdca944727d9ae10d75e338d4bbb8f54b9ded997952ccd1c" }, "downloads": -1, "filename": "flask-oauthprovider-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ceee372a6ad7cf0a079da99018941387", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7346, "upload_time": "2012-06-27T19:08:40", "url": "https://files.pythonhosted.org/packages/34/70/b933658a879cd2dbb5d3ab19440db48d52f0b94a8d034b7b546f92bcc5af/flask-oauthprovider-0.1.3.tar.gz" } ] }