{ "info": { "author": "Adam Thornton", "author_email": "athornton@lsst.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5" ], "description": "# BitlyOAuth2ProxySession\n\nThis is a simple subclass of `requests.Session` which, when initialized,\nor when you call its `authenticate()` method, does the magic to talk to\nthe Bitly OAuth2 Proxy and return a session that is authenticated for\nwhatever is behind it.\n\nThe use case here is a read-only service user, which does not require\ntwo-factor authentication, that you want to be able to access resources\nbehind the Bitly proxy. Our _particular_ use case right now is for a\nmonitoring system to be able to check on web pages that require\nauthentication. There's one class, the imaginatively-named `Session`.\n\n## Installation\n\n`pip install bitly-oauth2-proxy-session`\n\nOr check out the repository, `cd` to its root directory, and `python\nsetup.py install`. It requires a fairly recent `requests` (2.8.1 or\nlater).\n\n## Instance Attributes\n\n* `oauth2_username`: a string containing the username of the underlying\n OAuth2 user.\n* `oauth2_password`: a string containing the password of the underlying\n OAuth2 user. At least for GitHub, you can't use an auth token. The\n reason behind this seems to be that this is what you'd do if you were\n an actual user with an actual web browser. Yes, this means 2FA isn't\n currently supported.\n* `authentication_base_url`: a string containing the `start` URL of your\n oauth proxy. Typically, _site_`/oauth2/start`.\n* `authentication_session_url`: a string containing the URL of the page\n you POST to when you create a session with the underlying OAuth2\n source as a web user. For Github, this is\n `https://github.com/session` and that's the default.\n* `authentication_postdata`: a Python dict containing the data you need\n to POST to the session URL. Defaults to the right thing for Github.\n\n## Methods\n\n* `[get_/set_]*()`: getters and setters for the various instance\n attributes. No, you can't get the password this way.\n* `authenticate()`: run the authentication dance and store the magic in\n the session object.\n\n## Usage\n\n* Acquire a `Session` object.\n * For Github, create the object with `oauth2_username`,\n `oauth2_password`, and `authentication_session_url`.\n * For something else (untested), create the object empty, set all the\n fields via the setter methods, and then run `authenticate()`. Pull\n requests welcomed.\n* Do sessiony things, like `get()` and `post()`.\n\n## Bugs\n\n* If anyone knows how I can get a session with a Github user token\n rather than a password, that'd be great.\n* Github is the only working use case right now.\n\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lsst-sqre/BitlyOAuth2ProxySession/", "keywords": "lsst", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bitly-oauth2-proxy-session", "package_url": "https://pypi.org/project/bitly-oauth2-proxy-session/", "platform": "", "project_url": "https://pypi.org/project/bitly-oauth2-proxy-session/", "project_urls": { "Homepage": "https://github.com/lsst-sqre/BitlyOAuth2ProxySession/" }, "release_url": "https://pypi.org/project/bitly-oauth2-proxy-session/0.1.5/", "requires_dist": [ "requests (<3.0.0,>=2.13.0)" ], "requires_python": "", "summary": "LSST Data Management SQuaRE Bitly-Proxy Authenticated Sessions", "version": "0.1.5" }, "last_serial": 2708239, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "94d9cc0dccdeb9af97b32870b481bbdb", "sha256": "80c407491beaaa032c5903f49c55b9990f3ffde391d62d1b2fb688278fd7e5b2" }, "downloads": -1, "filename": "bitly_oauth2_proxy_session-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "94d9cc0dccdeb9af97b32870b481bbdb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5958, "upload_time": "2016-12-09T03:47:57", "url": "https://files.pythonhosted.org/packages/00/cb/7817e786b8be81faf5aaf3192e7e53502091975d12633219b211fbdf6579/bitly_oauth2_proxy_session-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1c7295eac3997880469f53f1c6cccf6", "sha256": "f6da9ed2086bf7e334e17283b0908444d9c35a0be18496bf98bae8e82c555283" }, "downloads": -1, "filename": "bitly-oauth2-proxy-session-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f1c7295eac3997880469f53f1c6cccf6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4358, "upload_time": "2016-12-09T03:47:58", "url": "https://files.pythonhosted.org/packages/80/dc/ef6e75b628283ea039d58a40146b972f510f550d58cb0d749f9b80d32fe7/bitly-oauth2-proxy-session-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "040a6f872ada2197c16771be0c26403d", "sha256": "72391f5a197d465607c1edae26d1e0792031f2aac61983c09699d6cc35eb5302" }, "downloads": -1, "filename": "bitly_oauth2_proxy_session-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "040a6f872ada2197c16771be0c26403d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5960, "upload_time": "2016-12-29T16:17:31", "url": "https://files.pythonhosted.org/packages/07/28/76cd4a0b0c4290a936454cff91e7f7fb330e4a63c3b89270cb73ecea7429/bitly_oauth2_proxy_session-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0d1c08bd8ac1631f3bc90c133ecb1f1", "sha256": "8917155b34ac64b7c213efa8b8c1987b8b068bce27c851a69de8b2daa7b5ffef" }, "downloads": -1, "filename": "bitly-oauth2-proxy-session-0.1.4.tar.gz", "has_sig": false, "md5_digest": "a0d1c08bd8ac1631f3bc90c133ecb1f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4362, "upload_time": "2016-12-29T16:17:32", "url": "https://files.pythonhosted.org/packages/10/9d/04d201c8e7e2aea75cde698b3cdc98cc5bbfa9343903c84dcfb4ed7ab84b/bitly-oauth2-proxy-session-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a9125b77505593d07d306521acabc5ed", "sha256": "43706718042687f8a3a6fd4e34b87a513e38ad603c10fbd02f4edaa1f7fdf0f0" }, "downloads": -1, "filename": "bitly_oauth2_proxy_session-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9125b77505593d07d306521acabc5ed", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5975, "upload_time": "2017-03-15T19:25:30", "url": "https://files.pythonhosted.org/packages/05/ed/eaa369f6fc3898f9e8783b99769ef965082d7c0a52506860a553c127b08c/bitly_oauth2_proxy_session-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2c9a8471dd53a15275ca29b747107e86", "sha256": "54d5db83fc681a95a4e8309233c939ad54bee4ebe4bdd2cb7c6ebfdc60492c0d" }, "downloads": -1, "filename": "bitly-oauth2-proxy-session-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2c9a8471dd53a15275ca29b747107e86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4326, "upload_time": "2017-03-15T19:25:31", "url": "https://files.pythonhosted.org/packages/a2/b5/d9ba2d3462762522bd475ac264959c897cbe773be05dab186ded4d87647d/bitly-oauth2-proxy-session-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9125b77505593d07d306521acabc5ed", "sha256": "43706718042687f8a3a6fd4e34b87a513e38ad603c10fbd02f4edaa1f7fdf0f0" }, "downloads": -1, "filename": "bitly_oauth2_proxy_session-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9125b77505593d07d306521acabc5ed", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5975, "upload_time": "2017-03-15T19:25:30", "url": "https://files.pythonhosted.org/packages/05/ed/eaa369f6fc3898f9e8783b99769ef965082d7c0a52506860a553c127b08c/bitly_oauth2_proxy_session-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2c9a8471dd53a15275ca29b747107e86", "sha256": "54d5db83fc681a95a4e8309233c939ad54bee4ebe4bdd2cb7c6ebfdc60492c0d" }, "downloads": -1, "filename": "bitly-oauth2-proxy-session-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2c9a8471dd53a15275ca29b747107e86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4326, "upload_time": "2017-03-15T19:25:31", "url": "https://files.pythonhosted.org/packages/a2/b5/d9ba2d3462762522bd475ac264959c897cbe773be05dab186ded4d87647d/bitly-oauth2-proxy-session-0.1.5.tar.gz" } ] }