METADATA 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. Metadata-Version: 2.1
  2. Name: requests-oauthlib
  3. Version: 2.0.0
  4. Summary: OAuthlib authentication support for Requests.
  5. Home-page: https://github.com/requests/requests-oauthlib
  6. Author: Kenneth Reitz
  7. Author-email: me@kennethreitz.com
  8. License: ISC
  9. Classifier: Development Status :: 5 - Production/Stable
  10. Classifier: Intended Audience :: Developers
  11. Classifier: Natural Language :: English
  12. Classifier: License :: OSI Approved :: BSD License
  13. Classifier: Programming Language :: Python
  14. Classifier: Programming Language :: Python :: 3
  15. Classifier: Programming Language :: Python :: 3.4
  16. Classifier: Programming Language :: Python :: 3.5
  17. Classifier: Programming Language :: Python :: 3.6
  18. Classifier: Programming Language :: Python :: 3.7
  19. Classifier: Programming Language :: Python :: 3.8
  20. Classifier: Programming Language :: Python :: 3.9
  21. Classifier: Programming Language :: Python :: 3.10
  22. Classifier: Programming Language :: Python :: 3.11
  23. Classifier: Programming Language :: Python :: 3.12
  24. Classifier: Programming Language :: Python :: Implementation :: CPython
  25. Classifier: Programming Language :: Python :: Implementation :: PyPy
  26. Requires-Python: >=3.4
  27. Description-Content-Type: text/x-rst
  28. License-File: LICENSE
  29. Requires-Dist: oauthlib >=3.0.0
  30. Requires-Dist: requests >=2.0.0
  31. Provides-Extra: rsa
  32. Requires-Dist: oauthlib[signedtoken] >=3.0.0 ; extra == 'rsa'
  33. Requests-OAuthlib |build-status| |coverage-status| |docs|
  34. =========================================================
  35. This project provides first-class OAuth library support for `Requests <https://requests.readthedocs.io>`_.
  36. The OAuth 1 workflow
  37. --------------------
  38. OAuth 1 can seem overly complicated and it sure has its quirks. Luckily,
  39. requests_oauthlib hides most of these and let you focus at the task at hand.
  40. Accessing protected resources using requests_oauthlib is as simple as:
  41. .. code-block:: pycon
  42. >>> from requests_oauthlib import OAuth1Session
  43. >>> twitter = OAuth1Session('client_key',
  44. client_secret='client_secret',
  45. resource_owner_key='resource_owner_key',
  46. resource_owner_secret='resource_owner_secret')
  47. >>> url = 'https://api.twitter.com/1/account/settings.json'
  48. >>> r = twitter.get(url)
  49. Before accessing resources you will need to obtain a few credentials from your
  50. provider (e.g. Twitter) and authorization from the user for whom you wish to
  51. retrieve resources for. You can read all about this in the full
  52. `OAuth 1 workflow guide on RTD <https://requests-oauthlib.readthedocs.io/en/latest/oauth1_workflow.html>`_.
  53. The OAuth 2 workflow
  54. --------------------
  55. OAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most
  56. common being the Authorization Code Grant, also known as the WebApplication
  57. flow.
  58. Fetching a protected resource after obtaining an access token can be extremely
  59. simple. However, before accessing resources you will need to obtain a few
  60. credentials from your provider (e.g. Google) and authorization from the user
  61. for whom you wish to retrieve resources for. You can read all about this in the
  62. full `OAuth 2 workflow guide on RTD <https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html>`_.
  63. Installation
  64. -------------
  65. To install requests and requests_oauthlib you can use pip:
  66. .. code-block:: bash
  67. pip install requests requests-oauthlib
  68. .. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg
  69. :target: https://github.com/requests/requests-oauthlib/actions
  70. .. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg
  71. :target: https://coveralls.io/r/requests/requests-oauthlib
  72. .. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/
  73. :alt: Documentation Status
  74. :scale: 100%
  75. :target: https://requests-oauthlib.readthedocs.io/
  76. History
  77. -------
  78. v2.0.0 (22 March 2024)
  79. ++++++++++++++++++++++++
  80. Full set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).
  81. Additions & changes:
  82. - ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``
  83. is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404
  84. <https://github.com/requests/requests-oauthlib/issues/404>`_.
  85. - ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``
  86. is provided and ``scope`` is not overridden. Fixes `#408
  87. <https://github.com/requests/requests-oauthlib/issues/408>`_
  88. - Add ``refresh_token_request`` and ``access_token_request`` compliance hooks
  89. - Add PKCE support and Auth0 example
  90. - Add support for Python 3.8-3.12
  91. - Remove support of Python 2.x, <3.7
  92. - Migrated to Github Action
  93. - Updated dependencies
  94. - Cleanup some docs and examples
  95. v1.4.0 (27 Feb 2024)
  96. ++++++++++++++++++++++++
  97. - Version 2.0.0 published initially as 1.4.0, it was yanked eventually.
  98. v1.3.1 (21 January 2022)
  99. ++++++++++++++++++++++++
  100. - Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)
  101. - Removed outdated LinkedIn Compliance Fixes
  102. - Add eBay compliance fix
  103. - Add Spotify OAuth 2 Tutorial
  104. - Add support for python 3.8, 3.9
  105. - Fixed LinkedIn Compliance Fixes
  106. - Fixed ReadTheDocs Documentation and sphinx errors
  107. - Moved pipeline to GitHub Actions
  108. v1.3.0 (6 November 2019)
  109. ++++++++++++++++++++++++
  110. - Instagram compliance fix
  111. - Added ``force_querystring`` argument to fetch_token() method on OAuth2Session
  112. v1.2.0 (14 January 2019)
  113. ++++++++++++++++++++++++
  114. - This project now depends on OAuthlib 3.0.0 and above. It does **not** support
  115. versions of OAuthlib before 3.0.0.
  116. - Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`
  117. because OAuth2Session objects and methods acceept an `auth` paramether which is
  118. typically an instance of `requests.auth.HTTPBasicAuth`
  119. - `OAuth2Session.fetch_token` previously tried to guess how and where to provide
  120. "client" and "user" credentials incorrectly. This was incompatible with some
  121. OAuth servers and incompatible with breaking changes in oauthlib that seek to
  122. correctly provide the `client_id`. The older implementation also did not raise
  123. the correct exceptions when username and password are not present on Legacy
  124. clients.
  125. - Avoid automatic netrc authentication for OAuth2Session.
  126. v1.1.0 (9 January 2019)
  127. +++++++++++++++++++++++
  128. - Adjusted version specifier for ``oauthlib`` dependency: this project is
  129. not yet compatible with ``oauthlib`` 3.0.0.
  130. - Dropped dependency on ``nose``.
  131. - Minor changes to clean up the code and make it more readable/maintainable.
  132. v1.0.0 (4 June 2018)
  133. ++++++++++++++++++++
  134. - **Removed support for Python 2.6 and Python 3.3.**
  135. This project now supports Python 2.7, and Python 3.4 and above.
  136. - Added several examples to the documentation.
  137. - Added plentymarkets compliance fix.
  138. - Added a ``token`` property to OAuth1Session, to match the corresponding
  139. ``token`` property on OAuth2Session.
  140. v0.8.0 (14 February 2017)
  141. +++++++++++++++++++++++++
  142. - Added Fitbit compliance fix.
  143. - Fixed an issue where newlines in the response body for the access token
  144. request would cause errors when trying to extract the token.
  145. - Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several
  146. methods would encounter conflicts with the ``client_id`` and
  147. ``client_secret``-derived auth. The user-supplied ``auth`` argument is now
  148. used in preference to those options.
  149. v0.7.0 (22 September 2016)
  150. ++++++++++++++++++++++++++
  151. - Allowed ``OAuth2Session.request`` to take the ``client_id`` and
  152. ``client_secret`` parameters for the purposes of automatic token refresh,
  153. which may need them.
  154. v0.6.2 (12 July 2016)
  155. +++++++++++++++++++++
  156. - Use ``client_id`` and ``client_secret`` for the Authorization header if
  157. provided.
  158. - Allow explicit bypass of the Authorization header by setting ``auth=False``.
  159. - Pass through the ``proxies`` kwarg when refreshing tokens.
  160. - Miscellaneous cleanups.
  161. v0.6.1 (19 February 2016)
  162. +++++++++++++++++++++++++
  163. - Fixed a bug when sending authorization in headers with no username and
  164. password present.
  165. - Make sure we clear the session token before obtaining a new one.
  166. - Some improvements to the Slack compliance fix.
  167. - Avoid timing problems around token refresh.
  168. - Allow passing arbitrary arguments to requests when calling
  169. ``fetch_request_token`` and ``fetch_access_token``.
  170. v0.6.0 (14 December 2015)
  171. +++++++++++++++++++++++++
  172. - Add compliance fix for Slack.
  173. - Add compliance fix for Mailchimp.
  174. - ``TokenRequestDenied`` exceptions now carry the entire response, not just the
  175. status code.
  176. - Pass through keyword arguments when refreshing tokens automatically.
  177. - Send authorization in headers, not just body, to maximize compatibility.
  178. - More getters/setters available for OAuth2 session client values.
  179. - Allow sending custom headers when refreshing tokens, and set some defaults.
  180. v0.5.0 (4 May 2015)
  181. +++++++++++++++++++
  182. - Fix ``TypeError`` being raised instead of ``TokenMissing`` error.
  183. - Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.
  184. - Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class
  185. without complete client information.
  186. v0.4.2 (16 October 2014)
  187. ++++++++++++++++++++++++
  188. - New ``authorized`` property on OAuth1Session and OAuth2Session, which allows
  189. you to easily determine if the session is already authorized with OAuth tokens
  190. or not.
  191. - New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:
  192. this will make it easier to catch and identify these exceptions.
  193. v0.4.1 (6 June 2014)
  194. ++++++++++++++++++++
  195. - New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature
  196. method.
  197. - Fixed bug in OAuth2 where supplied state param was not used in auth url.
  198. - OAuth2 HTTPS checking can be disabled by setting environment variable
  199. ``OAUTHLIB_INSECURE_TRANSPORT``.
  200. - OAuth1 now re-authorize upon redirects.
  201. - OAuth1 token fetching now raise a detailed error message when the
  202. response body is incorrectly encoded or the request was denied.
  203. - Added support for custom OAuth1 clients.
  204. - OAuth2 compliance fix for Sina Weibo.
  205. - Multiple fixes to facebook compliance fix.
  206. - Compliance fixes now re-encode body properly as bytes in Python 3.
  207. - Logging now properly done under ``requests_oauthlib`` namespace instead
  208. of piggybacking on oauthlib namespace.
  209. - Logging introduced for OAuth1 auth and session.
  210. v0.4.0 (29 September 2013)
  211. ++++++++++++++++++++++++++
  212. - OAuth1Session methods only return unicode strings. #55.
  213. - Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.
  214. - Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.
  215. - Added LinkedIn compliance fix.
  216. - Added refresh_token_response compliance hook, invoked before parsing the refresh token.
  217. - Correctly limit compliance hooks to running only once!
  218. - Content type guessing should only be done when no content type is given
  219. - OAuth1 now updates r.headers instead of replacing it with non case insensitive dict
  220. - Remove last use of Response.content (in OAuth1Session). #44.
  221. - State param can now be supplied in OAuth2Session.authorize_url