METADATA 11 KB

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