{ "info": { "author": "Markus Meyer", "author_email": "hydrantanderwand@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "This project is not maintained anymore.\nIf you are looking for a OAuth 2.0 library to integrate into your Python application, I recommend `oauthlib `_.\n\npython-oauth2\n#############\n\npython-oauth2 is a framework that aims at making it easy to provide authentication\nvia `OAuth 2.0 `_ within an application stack.\n\n`Documentation `_\n\nStatus\n******\n\n.. image:: https://travis-ci.org/wndhydrnt/python-oauth2.png?branch=master\n :target: https://travis-ci.org/wndhydrnt/python-oauth2\n\npython-oauth2 has reached its beta phase. All main parts of the `OAuth 2.0 RFC `_ such as the various types of Grants, Refresh Token and Scopes have been implemented. However, bugs might occur or implementation details might be wrong.\n\nInstallation\n************\n\npython-oauth2 is available on\n`PyPI `_.\n\n pip install python-oauth2\n\nUsage\n*****\n\nExample Authorization server\n\n.. code-block:: python\n\n from wsgiref.simple_server import make_server\n import oauth2\n import oauth2.grant\n import oauth2.error\n import oauth2.store.memory\n import oauth2.tokengenerator\n import oauth2.web.wsgi\n\n\n # Create a SiteAdapter to interact with the user.\n # This can be used to display confirmation dialogs and the like.\n class ExampleSiteAdapter(oauth2.web.AuthorizationCodeGrantSiteAdapter,\n oauth2.web.ImplicitGrantSiteAdapter):\n TEMPLATE = '''\n \n \n

\n confirm\n

\n

\n deny\n

\n \n '''\n\n def authenticate(self, request, environ, scopes, client):\n # Check if the user has granted access\n if request.post_param(\"confirm\") == \"confirm\":\n return {}\n\n raise oauth2.error.UserNotAuthenticated\n\n def render_auth_page(self, request, response, environ, scopes,\n client):\n url = request.path + \"?\" + request.query_string\n response.body = self.TEMPLATE.format(url=url)\n return response\n\n def user_has_denied_access(self, request):\n # Check if the user has denied access\n if request.post_param(\"deny\") == \"deny\":\n return True\n return False\n\n # Create an in-memory storage to store your client apps.\n client_store = oauth2.store.memory.ClientStore()\n # Add a client\n client_store.add_client(client_id=\"abc\", client_secret=\"xyz\",\n redirect_uris=[\"http://localhost/callback\"])\n\n site_adapter = ExampleSiteAdapter()\n\n # Create an in-memory storage to store issued tokens.\n # LocalTokenStore can store access and auth tokens\n token_store = oauth2.store.memory.TokenStore()\n\n # Create the controller.\n provider = oauth2.Provider(\n access_token_store=token_store,\n auth_code_store=token_store,\n client_store=client_store,\n token_generator=oauth2.tokengenerator.Uuid4()\n )\n\n # Add Grants you want to support\n provider.add_grant(oauth2.grant.AuthorizationCodeGrant(site_adapter=site_adapter))\n provider.add_grant(oauth2.grant.ImplicitGrant(site_adapter=site_adapter))\n\n # Add refresh token capability and set expiration time of access tokens\n # to 30 days\n provider.add_grant(oauth2.grant.RefreshToken(expires_in=2592000))\n\n # Wrap the controller with the Wsgi adapter\n app = oauth2.web.wsgi.Application(provider=provider)\n\n if __name__ == \"__main__\":\n httpd = make_server('', 8080, app)\n httpd.serve_forever()\n\n\nThis example only shows how to instantiate the server.\nIt is not a working example as a client app is missing. Take a look at the\n`examples `_ directory.\n\nSupported storage backends\n**************************\n\npython-oauth2 does not force you to use a specific database.\nIt currently supports these storage backends out-of-the-box:\n\n- MongoDB\n- MySQL\n- Redis\n- Memcached\n\nHowever, you are not not bound to these implementations.\nBy adhering to the interface defined by the base classes in ``oauth2.store``,\nyou can easily add an implementation of your backend.\nIt also is possible to mix different backends and e.g. read data of a client\nfrom MongoDB while saving all tokens in memcached for fast access.\n\nTake a look at the examples in the *examples* directory of the project.\n\nSite adapter\n************\n\nLike for storage, python-oauth2 does not define how you identify a user or\nshow a confirmation dialogue.\nInstead your application should use the API defined by\n``oauth2.web.SiteAdapter``.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wndhydrnt/python-oauth2", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-oauth2", "package_url": "https://pypi.org/project/python-oauth2/", "platform": "", "project_url": "https://pypi.org/project/python-oauth2/", "project_urls": { "Homepage": "https://github.com/wndhydrnt/python-oauth2" }, "release_url": "https://pypi.org/project/python-oauth2/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "OAuth 2.0 provider for python", "version": "1.1.1" }, "last_serial": 5462749, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7421ae6cce59d93a5796fb5ea5ae4405", "sha256": "eb544032a3324e49e36f6aff6df21126263503308ce7fe16d1c6349c3e71641e" }, "downloads": -1, "filename": "python-oauth2-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7421ae6cce59d93a5796fb5ea5ae4405", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12587, "upload_time": "2013-10-12T17:25:25", "url": "https://files.pythonhosted.org/packages/4b/86/4e4ac2ecb188002937eda8f7ceb3aeb370a2a237b5f0a4b2434a088abbc9/python-oauth2-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f06c8eb8778b93b1a4ef0a2fcb42fde2", "sha256": "b8576c02979b84d0d3e7177d244377006ac598afe139557fa536bcb81cc1e39d" }, "downloads": -1, "filename": "python-oauth2-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f06c8eb8778b93b1a4ef0a2fcb42fde2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16062, "upload_time": "2013-10-13T16:09:47", "url": "https://files.pythonhosted.org/packages/29/72/dcaffcabdbfdfadb50cc0fd99ac5ba333933df27d8f290212ac45e28391d/python-oauth2-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f19c09d13b014668d1e92a0066aedc94", "sha256": "fbbf89ea38d3853949103cab4bf78e325070bfbbc81d7f63c02c0d300ba81651" }, "downloads": -1, "filename": "python-oauth2-0.3.0.tar.gz", "has_sig": false, "md5_digest": "f19c09d13b014668d1e92a0066aedc94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20360, "upload_time": "2013-10-24T19:15:56", "url": "https://files.pythonhosted.org/packages/55/6c/47c84629faffaf151053a8319a1e412c82c88ce45a5afcf53272b55b1d9d/python-oauth2-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "11653eeb76bdf7ad53d3cf595f502f3a", "sha256": "29d5db13257f8b34d61398ad1500db65f456a0a8ef93f699d3c03dec096dc25a" }, "downloads": -1, "filename": "python-oauth2-0.3.1.tar.gz", "has_sig": false, "md5_digest": "11653eeb76bdf7ad53d3cf595f502f3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20779, "upload_time": "2013-11-11T20:24:45", "url": "https://files.pythonhosted.org/packages/af/47/a408f43260e5760b8191de28a3b2ba236428b8aed5252770fac0379e026a/python-oauth2-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "9018fd7c70f7a03f7bc75c25a5fe311a", "sha256": "86ac729896b127f265ad14b88ce50103c1e022cc9d32fea2c3c5f6551b2160ca" }, "downloads": -1, "filename": "python-oauth2-0.3.2.tar.gz", "has_sig": false, "md5_digest": "9018fd7c70f7a03f7bc75c25a5fe311a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20900, "upload_time": "2013-11-17T15:25:36", "url": "https://files.pythonhosted.org/packages/34/cf/4e665b1fe6db4f6645f704e55d5a7dac231796e300e60d2e9024e57c61a6/python-oauth2-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "430e65f6d0481837de5ce75aa803e6ec", "sha256": "73b96eec868babe104708c6907b3797e807d61f6e87e4aae2d8169de055367f8" }, "downloads": -1, "filename": "python-oauth2-0.4.0.tar.gz", "has_sig": false, "md5_digest": "430e65f6d0481837de5ce75aa803e6ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24025, "upload_time": "2013-12-13T17:25:01", "url": "https://files.pythonhosted.org/packages/60/f2/3438ae90e93d398b5c2e986352058c29bcb75811fc3feb4cc9a43fb5a06a/python-oauth2-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "ab3cb54a39739ea4a8d3b1a9385b89bc", "sha256": "73393ed4af487043016defb23d9c400166ad0dec7ac456f447779f9147017946" }, "downloads": -1, "filename": "python-oauth2-0.5.0.tar.gz", "has_sig": false, "md5_digest": "ab3cb54a39739ea4a8d3b1a9385b89bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24274, "upload_time": "2014-01-05T17:29:24", "url": "https://files.pythonhosted.org/packages/ac/05/785db198d63d67c62f4848228dadd4a4a2a24a1efbc94cbe63ac2761722d/python-oauth2-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "3fe3c124be2de0bac033384644bbf17b", "sha256": "931877c41eb0d23f3f79f6d6f1d45743ad6e8e2784df08fbfee461df914c5261" }, "downloads": -1, "filename": "python-oauth2-0.6.0.tar.gz", "has_sig": false, "md5_digest": "3fe3c124be2de0bac033384644bbf17b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27093, "upload_time": "2014-03-06T12:03:33", "url": "https://files.pythonhosted.org/packages/e4/cd/a138f6e4acdd6229207479fc3810410ab5187c82a331d2845234b7e9230e/python-oauth2-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "553cc98be63bf437d31f7b61aad715e7", "sha256": "6a0e3b93e5814c7f1ada99304f4c779fc0ca7a2c85da3d5494a3ddc06c4e58cd" }, "downloads": -1, "filename": "python-oauth2-0.7.0.tar.gz", "has_sig": false, "md5_digest": "553cc98be63bf437d31f7b61aad715e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32738, "upload_time": "2014-05-27T20:51:05", "url": "https://files.pythonhosted.org/packages/81/cd/9cbbd88bc270db34e64af2677f96102eef5899f9f073cd2af1c8688bf229/python-oauth2-0.7.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "43d09856ada21df42899fb824395e247", "sha256": "5fe39a7e34920dda406952ab052528610958059dc425c8b6fe504fc4a55537f6" }, "downloads": -1, "filename": "python-oauth2-1.0.0.tar.gz", "has_sig": false, "md5_digest": "43d09856ada21df42899fb824395e247", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41946, "upload_time": "2015-10-28T19:10:44", "url": "https://files.pythonhosted.org/packages/a6/90/cdc2bed2896051867423b44d2ced7f7d4add188adaa8aade50318c04b15b/python-oauth2-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4eaa9a8be091d49076814491549c560e", "sha256": "5583b5cea3e6cc154800f7a04a061fc7673cb12c75ad9413e607d4472d062d28" }, "downloads": -1, "filename": "python-oauth2-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4eaa9a8be091d49076814491549c560e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41984, "upload_time": "2016-12-11T11:45:33", "url": "https://files.pythonhosted.org/packages/c4/9c/67bcdde15bf8acaaeb1908fc19cbe5574c1fe94cdfe76d9423a68af6f04e/python-oauth2-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "0d2bc27f1b81c3dd44bea3deda5855f1", "sha256": "b24da812837c19183df1924e80a22ba0a1869582dea8b04a9ecd807b04dbc525" }, "downloads": -1, "filename": "python-oauth2-1.1.0.tar.gz", "has_sig": false, "md5_digest": "0d2bc27f1b81c3dd44bea3deda5855f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42017, "upload_time": "2018-02-19T18:04:49", "url": "https://files.pythonhosted.org/packages/4c/a4/e92b8ba57ccfee230f196c80dc9327d1b626387c5ec1aa400e343161fde8/python-oauth2-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "c25c8dca2c7dc78b0004900a6211a97b", "sha256": "d7a8544927ac18215ba5317edd8f640a5f1f0593921bcf3ce862178312c8c9a4" }, "downloads": -1, "filename": "python-oauth2-1.1.1.tar.gz", "has_sig": false, "md5_digest": "c25c8dca2c7dc78b0004900a6211a97b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45363, "upload_time": "2019-06-28T17:57:45", "url": "https://files.pythonhosted.org/packages/09/30/fae66a452716f49b69124c9286ba48719ae62014a1f97bcf269c88c0c0d3/python-oauth2-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c25c8dca2c7dc78b0004900a6211a97b", "sha256": "d7a8544927ac18215ba5317edd8f640a5f1f0593921bcf3ce862178312c8c9a4" }, "downloads": -1, "filename": "python-oauth2-1.1.1.tar.gz", "has_sig": false, "md5_digest": "c25c8dca2c7dc78b0004900a6211a97b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45363, "upload_time": "2019-06-28T17:57:45", "url": "https://files.pythonhosted.org/packages/09/30/fae66a452716f49b69124c9286ba48719ae62014a1f97bcf269c88c0c0d3/python-oauth2-1.1.1.tar.gz" } ] }