{ "info": { "author": "Randall Leeds", "author_email": "tilgovi@hypothes.is", "bugtrack_url": null, "classifiers": [ "Framework :: Pyramid", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware" ], "description": "Pyramid OAuthLib\n================\n\n.. image:: https://travis-ci.org/tilgovi/pyramid-oauthlib.svg?branch=master\n :target: https://travis-ci.org/tilgovi/pyramid-oauthlib\n.. image:: http://img.shields.io/coveralls/tilgovi/pyramid-oauthlib.svg\n :target: https://coveralls.io/r/tilgovi/pyramid-oauthlib\n\nPyramid OAuthLib is a library to integrate the excellent `OAuthLib`_ library\neasily into `Pyramid`_ applications. It is designed to ease development of\nOAuth applications, provide smooth migration possibilites to legacy codebases\nusing other authentication or authorization schemes, and configuration patterns\nfor creating pluggable OAuth components for Pyramid.\n\n**NOTICE**: Pyramid OAuthLib is not feature complete! It is missing the hooks\nfor token revocation. While this shouldn't be hard to add, it wasn't a priority\nto get the initial version released.\n\nUsage Overview\n--------------\n\nConfiguration::\n\n def includeme(config):\n \"\"\"Integration with OAuthLib is as smooth as possible.\"\"\"\n from oauthlib.oauth2 import BearerToken, AuthorizationCodeGrant\n\n # Validator callback functions are passed Pyramid request objects so\n # you can access your request properties, database sessions, etc.\n # The request object is populated with accessors for the properties\n # referred to in the OAuthLib docs and used by its built in types.\n validator = MyRequestValidator()\n\n # Register response types to create grants.\n config.add_response_type('oauthlib.oauth2.AuthorizationCodeGrant',\n name='code',\n request_validator=validator)\n\n # Register grant types to validate token requests.\n config.add_grant_type('oauthlib.oauth2.AuthorizationCodeGrant',\n name='authorization_code',\n request_validator=validator)\n\n # Register the token types to use at token endpoints.\n # The second parameter to all registrations may be left out to set it\n # as default to use when no corresponding request parameter specifies\n # the grant, response or token type. Be aware that the built in types\n # will fail if a matching request parameter is missing, though.\n config.add_token_type('oauthlib.oauth2.BearerToken',\n request_validator=validator)\n\n\nToken response::\n\n def access_token(request):\n \"\"\"Core functionality is available directly from the request.\n\n Responses from OAuthLib are wrapped in a response object of type\n :class:`pyramid.response.Response` so they can be returned directly\n from views.\n \"\"\"\n userid = request.authenticated_userid\n if userid is not None:\n credentials = dict(userId=userid)\n else:\n credentials = None\n\n return request.create_token_response(credentials=credentials)\n\nCustom grant type::\n\n from oauthlib.oauth2 import ClientCredentialsGrant, InvalidClientError\n from pyramid.authentication import BadCSRFToken\n from pyramid.session import check_csrf_token\n\n class SessionGrant(ClientCredentialsGrant):\n\n \"\"\"A combined authentication and authorization session assertion grant.\n\n When the Authorization Server and the Token Service are the same server\n this grant type uses a single assertion, the CSRF token, for client\n authentication and an authorization grant.[1] This works particularly\n well with :class:`pyramid.authentication.SessionAuthenticationPolicy`.\n\n [1] http://tools.ietf.org/html/draft-ietf-oauth-assertions-01#section-3\n \"\"\"\n\n def validate_token_request(self, request):\n try:\n check_csrf_token(request, token='assertion')\n except BadCSRFToken:\n raise InvalidClientError(request=request)\n\n # An object with the confidential client_id and client_secret.\n request.client = LOCAL_CLIENT\n\n if request.client is None:\n raise InvalidClientError(request=request)\n\n request.client_id = request.client_id or request.client.client_id\n\n\n def includeme(config):\n config.add_grant_type(SessionGrant, 'assertion')\n\nLicense\n-------\n\nPyramid OAuthLib is released under the `2-Clause BSD License`_, sometimes\nreferred to as the \"Simplified BSD License\" or the \"FreeBSD License\". More\nlicense information can be found in the included ``LICENSE.txt`` file.\n\n.. _OAuthLib: https://github.com/idan/oauthlib\n.. _Pyramid: http://www.pylonsproject.org/\n.. _2-Clause BSD License: http://www.opensource.org/licenses/BSD-2-Clause\n\n\n0.4.1 (2019-06-28)\n==================\n\nBug Fixes\n---------\n\n- Fix `duplicate_params` request property.\n- Fix version specifier to indicate that OAuthLib 3 is not yet supported.\n\n0.4.0 (2018-11-16)\n==================\n\nBreaking Changes\n----------------\n\n- Drop support for Pyramid 1.3 and below.\n\nFeatures\n--------\n\n- Pyramid 1.10 support.\n\n0.3.0 (2018-03-10)\n==================\n\nFeatures\n--------\n\n- Python 3 support.\n- Support for password credential flow parameters.\n\n\n0.2.0 (2014-11-21)\n==================\n\nFeatures\n--------\n\n- Expose `add_oauth_param` as a directive on `Configurator` instances.\n OAuthLib code typically assumes these attributes exist on the request\n instance. Exposing this directive allows custom extensions to be more\n portable to non-Pyramid code by avoiding the use of `request.params`\n in favor of the transparent attribute access pattern of OAuthLib\n request instances.\n\n0.1.1 (2014-08-04)\n==================\n\nFeatures\n--------\n\n- Request methods for easy integration of OAuth flows.\n- Request parameters to integrate with OAuthLib modules.\n- Registration of new grant, response, and token types, (optionally)\n using dotted name resolution.\n- Introspectable configuration.\n- Full unit test coverage\n\nMissing in this release\n-----------------------\n\n- Support for revocation.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tilgovi/pyramid_oauthlib", "keywords": "web pyramid pylons oauth authentication", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyramid-oauthlib", "package_url": "https://pypi.org/project/pyramid-oauthlib/", "platform": "", "project_url": "https://pypi.org/project/pyramid-oauthlib/", "project_urls": { "Homepage": "https://github.com/tilgovi/pyramid_oauthlib" }, "release_url": "https://pypi.org/project/pyramid-oauthlib/0.4.1/", "requires_dist": [ "pyramid (>=1.4.0)", "oauthlib (<3,>=2)" ], "requires_python": "", "summary": "Pyramid OAuthLib integration", "version": "0.4.1" }, "last_serial": 5462485, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d55adbd0759faf016187ccf5a3f9486e", "sha256": "9c48d79ce1e603f6762ab3ffa54465fe55a9279e6fb06be3d0fc698e2fca3da6" }, "downloads": -1, "filename": "pyramid_oauthlib-0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "d55adbd0759faf016187ccf5a3f9486e", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8682, "upload_time": "2014-08-04T22:27:04", "url": "https://files.pythonhosted.org/packages/fb/64/bc5e834fdbbe9f89a919dc69b495b6f94e0a2464195f7a09eac511b21229/pyramid_oauthlib-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58d4e7a5245b2f8b7ac4e4f83dd179d9", "sha256": "d0842d7cf339660bf78d2e6d72de91f2e7bbf41205312e2be05722e32d3eec80" }, "downloads": -1, "filename": "pyramid_oauthlib-0.1.tar.gz", "has_sig": true, "md5_digest": "58d4e7a5245b2f8b7ac4e4f83dd179d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7786, "upload_time": "2014-08-04T22:26:49", "url": "https://files.pythonhosted.org/packages/f6/3b/62fd7078066ca2312f5def358beef6f7fed80e4c30174ed755274c2a074c/pyramid_oauthlib-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "eea70f5779732a0eca32f8226b30e4ff", "sha256": "67272bbeb0c0299b5279fa01e444f0682ebfd69edfca714a3b50114d37124f1c" }, "downloads": -1, "filename": "pyramid_oauthlib-0.1.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "eea70f5779732a0eca32f8226b30e4ff", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 9008, "upload_time": "2014-08-04T22:32:03", "url": "https://files.pythonhosted.org/packages/65/c2/13f77ba254da7cfe4c2ce75a91cbf2e9dcb687bf1a008675a70112998d36/pyramid_oauthlib-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4a74044e6f162d1cd446f16c71e2532", "sha256": "8a240d1911dd17ff5e20110a45f77ace340531a9679e71cc86dea3d197651512" }, "downloads": -1, "filename": "pyramid_oauthlib-0.1.1.tar.gz", "has_sig": true, "md5_digest": "c4a74044e6f162d1cd446f16c71e2532", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7891, "upload_time": "2014-08-04T22:31:59", "url": "https://files.pythonhosted.org/packages/8d/0d/3718f0ef4ebe0be446a45c57d6e40f88434c0950c765bde6945f95618141/pyramid_oauthlib-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "b10558d887aa878d2a2405dec919bcb4", "sha256": "8ab72170197feee22ef41a7c679e2ffdfe164a5c9279da53a366e0c5a10a4092" }, "downloads": -1, "filename": "pyramid_oauthlib-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b10558d887aa878d2a2405dec919bcb4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9436, "upload_time": "2014-11-21T20:02:13", "url": "https://files.pythonhosted.org/packages/04/d2/1160cc7c5986cd3372d2b742820b727103e57163b11fb93606859186a183/pyramid_oauthlib-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "25d811da455797177f2f4d8ee5695953", "sha256": "bfee3a14d5ea91d92dd0edc7e3a4df9740c8b8eeaf536a34e1e7bba19cc63e6f" }, "downloads": -1, "filename": "pyramid_oauthlib-0.2.0.tar.gz", "has_sig": false, "md5_digest": "25d811da455797177f2f4d8ee5695953", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8266, "upload_time": "2014-11-21T20:02:09", "url": "https://files.pythonhosted.org/packages/03/a5/ede7eaa86e675a16a5f24fd343316ff727ef01cd86832ffbd7a0a3417f90/pyramid_oauthlib-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "5dbaa583c3b95f6b3d02c5158f79f446", "sha256": "94dea5ac867840a6126cf02f57fc0e7b92669f0bf9a649ee06a6499585082350" }, "downloads": -1, "filename": "pyramid_oauthlib-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5dbaa583c3b95f6b3d02c5158f79f446", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9554, "upload_time": "2018-03-10T22:44:18", "url": "https://files.pythonhosted.org/packages/ae/f4/101939795cb6a0b43293fa416cd4c956633931cfa54b278ec3970ff64143/pyramid_oauthlib-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7403d1e9aa21afcaa64d4a091dd0e0a", "sha256": "a6b7853bfc8ac601a7e9c1981556d6502c57cb173f15ce07138e60592f26a042" }, "downloads": -1, "filename": "pyramid_oauthlib-0.3.0.tar.gz", "has_sig": false, "md5_digest": "f7403d1e9aa21afcaa64d4a091dd0e0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8261, "upload_time": "2018-03-10T22:44:19", "url": "https://files.pythonhosted.org/packages/4b/20/6ede10945212dc5c159d1ddf7925e5954c8c68d089e8ffe4b771e7af7e5c/pyramid_oauthlib-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "572d8f40ea00d6becb8ca6a4349f8e5a", "sha256": "fac9305c7a9330495a0c096426725fe8fb8e00b41620cb7a99f74b473b0c5a09" }, "downloads": -1, "filename": "pyramid_oauthlib-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "572d8f40ea00d6becb8ca6a4349f8e5a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6577, "upload_time": "2018-11-17T00:53:06", "url": "https://files.pythonhosted.org/packages/1a/c3/138407349608157c23d1f7e5b43d697b08268da0e82d95f4d762b92f6f36/pyramid_oauthlib-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "89325f666f49c8ed0f8cfc8e6c13c6f3", "sha256": "1c1a21b5994d154564ad34f82e8062349e7b56756512fb3e3fb62cbaf92b6674" }, "downloads": -1, "filename": "pyramid_oauthlib-0.4.0.tar.gz", "has_sig": false, "md5_digest": "89325f666f49c8ed0f8cfc8e6c13c6f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8364, "upload_time": "2018-11-17T00:53:07", "url": "https://files.pythonhosted.org/packages/c5/c8/b153784460e5952cd70492f3164cd138cc6a90c264d34a4f6dbafa2f1a6b/pyramid_oauthlib-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "c0babfa6261c22f2700a535da418eca3", "sha256": "5699f246fd3872cc72a43e3f94b6df7728952f7da51af6f576fcba70237f152d" }, "downloads": -1, "filename": "pyramid_oauthlib-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c0babfa6261c22f2700a535da418eca3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7563, "upload_time": "2019-06-28T16:28:27", "url": "https://files.pythonhosted.org/packages/72/24/a9d7a5d839d71e5649647872b7aa619a20c973c5f3569e70a48ba20e335c/pyramid_oauthlib-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "944fa6c15eeb81b4e3926a2719a775e4", "sha256": "4e5416344c3c45ca14d70d0afa1ecb516ea336c6cbb5c502a1f9fcb3c3500121" }, "downloads": -1, "filename": "pyramid_oauthlib-0.4.1.tar.gz", "has_sig": false, "md5_digest": "944fa6c15eeb81b4e3926a2719a775e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8445, "upload_time": "2019-06-28T16:28:29", "url": "https://files.pythonhosted.org/packages/db/b7/a234c94e6b3883f07f8a56b4816af5a3f7a72c38fa4abda8512fa699c779/pyramid_oauthlib-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c0babfa6261c22f2700a535da418eca3", "sha256": "5699f246fd3872cc72a43e3f94b6df7728952f7da51af6f576fcba70237f152d" }, "downloads": -1, "filename": "pyramid_oauthlib-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c0babfa6261c22f2700a535da418eca3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7563, "upload_time": "2019-06-28T16:28:27", "url": "https://files.pythonhosted.org/packages/72/24/a9d7a5d839d71e5649647872b7aa619a20c973c5f3569e70a48ba20e335c/pyramid_oauthlib-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "944fa6c15eeb81b4e3926a2719a775e4", "sha256": "4e5416344c3c45ca14d70d0afa1ecb516ea336c6cbb5c502a1f9fcb3c3500121" }, "downloads": -1, "filename": "pyramid_oauthlib-0.4.1.tar.gz", "has_sig": false, "md5_digest": "944fa6c15eeb81b4e3926a2719a775e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8445, "upload_time": "2019-06-28T16:28:29", "url": "https://files.pythonhosted.org/packages/db/b7/a234c94e6b3883f07f8a56b4816af5a3f7a72c38fa4abda8512fa699c779/pyramid_oauthlib-0.4.1.tar.gz" } ] }