Authlib 1.6.3__tar.gz → 1.6.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. authlib-1.6.5/Authlib.egg-info/PKG-INFO +178 -0
  2. authlib-1.6.5/PKG-INFO +178 -0
  3. {authlib-1.6.3 → authlib-1.6.5}/authlib/consts.py +1 -1
  4. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth2/authorization_server.py +6 -2
  5. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth2/authorization_server.py +5 -3
  6. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/starlette_client/apps.py +16 -9
  7. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/errors.py +8 -0
  8. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7515/jws.py +43 -1
  9. authlib-1.6.5/authlib/jose/rfc7518/jwe_zips.py +34 -0
  10. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/util.py +6 -0
  11. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/authorization_server.py +2 -1
  12. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/parameters.py +8 -3
  13. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7591/endpoint.py +25 -6
  14. {authlib-1.6.3 → authlib-1.6.5}/pyproject.toml +2 -2
  15. authlib-1.6.3/Authlib.egg-info/PKG-INFO +0 -36
  16. authlib-1.6.3/PKG-INFO +0 -36
  17. authlib-1.6.3/authlib/jose/rfc7518/jwe_zips.py +0 -23
  18. {authlib-1.6.3 → authlib-1.6.5}/Authlib.egg-info/SOURCES.txt +0 -0
  19. {authlib-1.6.3 → authlib-1.6.5}/Authlib.egg-info/dependency_links.txt +0 -0
  20. {authlib-1.6.3 → authlib-1.6.5}/Authlib.egg-info/requires.txt +0 -0
  21. {authlib-1.6.3 → authlib-1.6.5}/Authlib.egg-info/top_level.txt +0 -0
  22. {authlib-1.6.3 → authlib-1.6.5}/LICENSE +0 -0
  23. {authlib-1.6.3 → authlib-1.6.5}/MANIFEST.in +0 -0
  24. {authlib-1.6.3 → authlib-1.6.5}/README.md +0 -0
  25. {authlib-1.6.3 → authlib-1.6.5}/authlib/__init__.py +0 -0
  26. {authlib-1.6.3 → authlib-1.6.5}/authlib/common/__init__.py +0 -0
  27. {authlib-1.6.3 → authlib-1.6.5}/authlib/common/encoding.py +0 -0
  28. {authlib-1.6.3 → authlib-1.6.5}/authlib/common/errors.py +0 -0
  29. {authlib-1.6.3 → authlib-1.6.5}/authlib/common/security.py +0 -0
  30. {authlib-1.6.3 → authlib-1.6.5}/authlib/common/urls.py +0 -0
  31. {authlib-1.6.3 → authlib-1.6.5}/authlib/deprecate.py +0 -0
  32. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/__init__.py +0 -0
  33. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/__init__.py +0 -0
  34. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/async_app.py +0 -0
  35. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/async_openid.py +0 -0
  36. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/errors.py +0 -0
  37. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/framework_integration.py +0 -0
  38. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/registry.py +0 -0
  39. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/sync_app.py +0 -0
  40. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/base_client/sync_openid.py +0 -0
  41. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_client/__init__.py +0 -0
  42. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_client/apps.py +0 -0
  43. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_client/integration.py +0 -0
  44. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth1/__init__.py +0 -0
  45. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth1/authorization_server.py +0 -0
  46. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth1/nonce.py +0 -0
  47. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth1/resource_protector.py +0 -0
  48. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth2/__init__.py +0 -0
  49. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth2/endpoints.py +0 -0
  50. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth2/requests.py +0 -0
  51. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth2/resource_protector.py +0 -0
  52. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/django_oauth2/signals.py +0 -0
  53. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_client/__init__.py +0 -0
  54. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_client/apps.py +0 -0
  55. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_client/integration.py +0 -0
  56. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth1/__init__.py +0 -0
  57. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth1/authorization_server.py +0 -0
  58. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth1/cache.py +0 -0
  59. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth1/resource_protector.py +0 -0
  60. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth2/__init__.py +0 -0
  61. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth2/errors.py +0 -0
  62. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth2/requests.py +0 -0
  63. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth2/resource_protector.py +0 -0
  64. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/flask_oauth2/signals.py +0 -0
  65. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/httpx_client/__init__.py +0 -0
  66. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/httpx_client/assertion_client.py +0 -0
  67. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/httpx_client/oauth1_client.py +0 -0
  68. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/httpx_client/oauth2_client.py +0 -0
  69. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/httpx_client/utils.py +0 -0
  70. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/requests_client/__init__.py +0 -0
  71. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/requests_client/assertion_session.py +0 -0
  72. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/requests_client/oauth1_session.py +0 -0
  73. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/requests_client/oauth2_session.py +0 -0
  74. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/requests_client/utils.py +0 -0
  75. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/sqla_oauth2/__init__.py +0 -0
  76. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/sqla_oauth2/client_mixin.py +0 -0
  77. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/sqla_oauth2/functions.py +0 -0
  78. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/sqla_oauth2/tokens_mixins.py +0 -0
  79. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/starlette_client/__init__.py +0 -0
  80. {authlib-1.6.3 → authlib-1.6.5}/authlib/integrations/starlette_client/integration.py +0 -0
  81. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/__init__.py +0 -0
  82. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/drafts/__init__.py +0 -0
  83. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/drafts/_jwe_algorithms.py +0 -0
  84. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/drafts/_jwe_enc_cryptodome.py +0 -0
  85. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/drafts/_jwe_enc_cryptography.py +0 -0
  86. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/jwk.py +0 -0
  87. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7515/__init__.py +0 -0
  88. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7515/models.py +2 -2
  89. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7516/__init__.py +0 -0
  90. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7516/jwe.py +0 -0
  91. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7516/models.py +4 -4
  92. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7517/__init__.py +0 -0
  93. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7517/_cryptography_key.py +0 -0
  94. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7517/asymmetric_key.py +0 -0
  95. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7517/base_key.py +0 -0
  96. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7517/jwk.py +0 -0
  97. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7517/key_set.py +0 -0
  98. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/__init__.py +0 -0
  99. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/ec_key.py +0 -0
  100. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/jwe_algs.py +0 -0
  101. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/jwe_encs.py +0 -0
  102. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/jws_algs.py +0 -0
  103. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/oct_key.py +0 -0
  104. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/rsa_key.py +0 -0
  105. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7518/util.py +0 -0
  106. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7519/__init__.py +0 -0
  107. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7519/claims.py +0 -0
  108. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc7519/jwt.py +0 -0
  109. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc8037/__init__.py +0 -0
  110. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc8037/jws_eddsa.py +0 -0
  111. {authlib-1.6.3 → authlib-1.6.5}/authlib/jose/rfc8037/okp_key.py +0 -0
  112. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/__init__.py +0 -0
  113. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/client.py +0 -0
  114. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/errors.py +0 -0
  115. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/__init__.py +0 -0
  116. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/authorization_server.py +0 -0
  117. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/base_server.py +0 -0
  118. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/client_auth.py +0 -0
  119. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/errors.py +0 -0
  120. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/models.py +0 -0
  121. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/parameters.py +0 -0
  122. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/resource_protector.py +0 -0
  123. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/rsa.py +0 -0
  124. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/signature.py +0 -0
  125. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/util.py +0 -0
  126. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth1/rfc5849/wrapper.py +0 -0
  127. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/__init__.py +0 -0
  128. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/auth.py +0 -0
  129. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/base.py +0 -0
  130. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/client.py +0 -0
  131. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/__init__.py +0 -0
  132. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/authenticate_client.py +0 -0
  133. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/errors.py +0 -0
  134. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/grants/__init__.py +0 -0
  135. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/grants/authorization_code.py +0 -0
  136. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/grants/base.py +0 -0
  137. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/grants/client_credentials.py +0 -0
  138. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/grants/implicit.py +0 -0
  139. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/grants/refresh_token.py +0 -0
  140. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/grants/resource_owner_password_credentials.py +0 -0
  141. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/hooks.py +0 -0
  142. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/models.py +0 -0
  143. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/requests.py +0 -0
  144. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/resource_protector.py +0 -0
  145. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/token_endpoint.py +0 -0
  146. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/util.py +0 -0
  147. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6749/wrappers.py +0 -0
  148. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6750/__init__.py +0 -0
  149. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6750/errors.py +0 -0
  150. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6750/parameters.py +0 -0
  151. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6750/token.py +0 -0
  152. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc6750/validator.py +0 -0
  153. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7009/__init__.py +0 -0
  154. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7009/parameters.py +0 -0
  155. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7009/revocation.py +0 -0
  156. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7521/__init__.py +0 -0
  157. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7521/client.py +0 -0
  158. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7523/__init__.py +0 -0
  159. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7523/assertion.py +0 -0
  160. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7523/auth.py +0 -0
  161. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7523/client.py +0 -0
  162. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7523/jwt_bearer.py +0 -0
  163. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7523/token.py +0 -0
  164. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7523/validator.py +0 -0
  165. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7591/__init__.py +0 -0
  166. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7591/claims.py +0 -0
  167. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7591/errors.py +0 -0
  168. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7592/__init__.py +0 -0
  169. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7592/endpoint.py +0 -0
  170. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7636/__init__.py +0 -0
  171. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7636/challenge.py +0 -0
  172. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7662/__init__.py +0 -0
  173. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7662/introspection.py +0 -0
  174. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7662/models.py +0 -0
  175. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc7662/token_validator.py +0 -0
  176. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8414/__init__.py +0 -0
  177. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8414/models.py +0 -0
  178. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8414/well_known.py +0 -0
  179. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8628/__init__.py +0 -0
  180. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8628/device_code.py +0 -0
  181. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8628/endpoint.py +0 -0
  182. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8628/errors.py +0 -0
  183. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8628/models.py +0 -0
  184. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc8693/__init__.py +0 -0
  185. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9068/__init__.py +0 -0
  186. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9068/claims.py +0 -0
  187. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9068/introspection.py +0 -0
  188. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9068/revocation.py +0 -0
  189. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9068/token.py +0 -0
  190. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9068/token_validator.py +0 -0
  191. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9101/__init__.py +0 -0
  192. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9101/authorization_server.py +0 -0
  193. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9101/discovery.py +0 -0
  194. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9101/errors.py +0 -0
  195. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9101/registration.py +0 -0
  196. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9207/__init__.py +0 -0
  197. {authlib-1.6.3 → authlib-1.6.5}/authlib/oauth2/rfc9207/parameter.py +0 -0
  198. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/__init__.py +0 -0
  199. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/__init__.py +0 -0
  200. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/claims.py +0 -0
  201. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/errors.py +0 -0
  202. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/grants/__init__.py +0 -0
  203. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/grants/code.py +0 -0
  204. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/grants/hybrid.py +0 -0
  205. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/grants/implicit.py +0 -0
  206. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/grants/util.py +0 -0
  207. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/models.py +0 -0
  208. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/userinfo.py +0 -0
  209. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/core/util.py +0 -0
  210. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/discovery/__init__.py +0 -0
  211. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/discovery/models.py +0 -0
  212. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/discovery/well_known.py +0 -0
  213. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/registration/__init__.py +0 -0
  214. {authlib-1.6.3 → authlib-1.6.5}/authlib/oidc/registration/claims.py +0 -0
  215. {authlib-1.6.3 → authlib-1.6.5}/setup.cfg +0 -0
  216. {authlib-1.6.3 → authlib-1.6.5}/setup.py +0 -0
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: Authlib
3
+ Version: 1.6.5
4
+ Summary: The ultimate Python library in building OAuth and OpenID Connect servers and clients.
5
+ Author-email: Hsiaoming Yang <me@lepture.com>
6
+ License: BSD-3-Clause
7
+ Project-URL: Documentation, https://docs.authlib.org/
8
+ Project-URL: Purchase, https://authlib.org/plans
9
+ Project-URL: Issues, https://github.com/authlib/authlib/issues
10
+ Project-URL: Source, https://github.com/authlib/authlib
11
+ Project-URL: Donate, https://github.com/sponsors/lepture
12
+ Project-URL: Blog, https://blog.authlib.org/
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Console
15
+ Classifier: Environment :: Web Environment
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: BSD License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: Implementation :: CPython
27
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
28
+ Classifier: Topic :: Security
29
+ Classifier: Topic :: Security :: Cryptography
30
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
31
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
32
+ Requires-Python: >=3.9
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: cryptography
36
+ Dynamic: license-file
37
+
38
+ <div align="center">
39
+
40
+ <picture>
41
+ <source media="(prefers-color-scheme: dark)" srcset="docs/_static/dark-logo.svg" />
42
+ <img alt="Authlib" src="docs/_static/light-logo.svg" height="68" />
43
+ </picture>
44
+
45
+ [![Build Status](https://github.com/authlib/authlib/workflows/tests/badge.svg)](https://github.com/authlib/authlib/actions)
46
+ [![PyPI version](https://img.shields.io/pypi/v/authlib.svg)](https://pypi.org/project/authlib)
47
+ [![conda-forge version](https://img.shields.io/conda/v/conda-forge/authlib.svg?label=conda-forge&colorB=0090ff)](https://anaconda.org/conda-forge/authlib)
48
+ [![PyPI Downloads](https://static.pepy.tech/badge/authlib/month)](https://pepy.tech/projects/authlib)
49
+ [![Code Coverage](https://codecov.io/gh/authlib/authlib/graph/badge.svg?token=OWTdxAIsPI)](https://codecov.io/gh/authlib/authlib)
50
+ [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=authlib_authlib&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=authlib_authlib)
51
+
52
+ </div>
53
+
54
+ The ultimate Python library in building OAuth and OpenID Connect servers.
55
+ JWS, JWK, JWA, JWT are included.
56
+
57
+ Authlib is compatible with Python3.9+.
58
+
59
+ ## Migrations
60
+
61
+ Authlib will deprecate `authlib.jose` module, please read:
62
+
63
+ - [Migrating from `authlib.jose` to `joserfc`](https://jose.authlib.org/en/dev/migrations/authlib/)
64
+
65
+ ## Sponsors
66
+
67
+ <table>
68
+ <tr>
69
+ <td><img align="middle" width="48" src="https://cdn.auth0.com/website/website/favicons/auth0-favicon.svg"></td>
70
+ <td>If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0's Python SDK and free plan at <a href="https://auth0.com/overview?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=authlib&utm_content=auth">auth0.com/overview</a>.</td>
71
+ </tr>
72
+ <tr>
73
+ <td><img align="middle" width="48" src="https://typlog.com/assets/icon-white.svg"></td>
74
+ <td>A blogging and podcast hosting platform with minimal design but powerful features. Host your blog and Podcast with <a href="https://typlog.com/">Typlog.com</a>.
75
+ </td>
76
+ </tr>
77
+ </table>
78
+
79
+ [**Fund Authlib to access additional features**](https://docs.authlib.org/en/latest/community/funding.html)
80
+
81
+ ## Features
82
+
83
+ Generic, spec-compliant implementation to build clients and providers:
84
+
85
+ - [The OAuth 1.0 Protocol](https://docs.authlib.org/en/latest/basic/oauth1.html)
86
+ - [RFC5849: The OAuth 1.0 Protocol](https://docs.authlib.org/en/latest/specs/rfc5849.html)
87
+ - [The OAuth 2.0 Authorization Framework](https://docs.authlib.org/en/latest/basic/oauth2.html)
88
+ - [RFC6749: The OAuth 2.0 Authorization Framework](https://docs.authlib.org/en/latest/specs/rfc6749.html)
89
+ - [RFC6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://docs.authlib.org/en/latest/specs/rfc6750.html)
90
+ - [RFC7009: OAuth 2.0 Token Revocation](https://docs.authlib.org/en/latest/specs/rfc7009.html)
91
+ - [RFC7523: JWT Profile for OAuth 2.0 Client Authentication and Authorization Grants](https://docs.authlib.org/en/latest/specs/rfc7523.html)
92
+ - [RFC7591: OAuth 2.0 Dynamic Client Registration Protocol](https://docs.authlib.org/en/latest/specs/rfc7591.html)
93
+ - [RFC7592: OAuth 2.0 Dynamic Client Registration Management Protocol](https://docs.authlib.org/en/latest/specs/rfc7592.html)
94
+ - [RFC7636: Proof Key for Code Exchange by OAuth Public Clients](https://docs.authlib.org/en/latest/specs/rfc7636.html)
95
+ - [RFC7662: OAuth 2.0 Token Introspection](https://docs.authlib.org/en/latest/specs/rfc7662.html)
96
+ - [RFC8414: OAuth 2.0 Authorization Server Metadata](https://docs.authlib.org/en/latest/specs/rfc8414.html)
97
+ - [RFC8628: OAuth 2.0 Device Authorization Grant](https://docs.authlib.org/en/latest/specs/rfc8628.html)
98
+ - [RFC9068: JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens](https://docs.authlib.org/en/latest/specs/rfc9068.html)
99
+ - [RFC9101: The OAuth 2.0 Authorization Framework: JWT-Secured Authorization Request (JAR)](https://docs.authlib.org/en/latest/specs/rfc9101.html)
100
+ - [RFC9207: OAuth 2.0 Authorization Server Issuer Identification](https://docs.authlib.org/en/latest/specs/rfc9207.html)
101
+ - [Javascript Object Signing and Encryption](https://docs.authlib.org/en/latest/jose/index.html)
102
+ - [RFC7515: JSON Web Signature](https://docs.authlib.org/en/latest/jose/jws.html)
103
+ - [RFC7516: JSON Web Encryption](https://docs.authlib.org/en/latest/jose/jwe.html)
104
+ - [RFC7517: JSON Web Key](https://docs.authlib.org/en/latest/jose/jwk.html)
105
+ - [RFC7518: JSON Web Algorithms](https://docs.authlib.org/en/latest/specs/rfc7518.html)
106
+ - [RFC7519: JSON Web Token](https://docs.authlib.org/en/latest/jose/jwt.html)
107
+ - [RFC7638: JSON Web Key (JWK) Thumbprint](https://docs.authlib.org/en/latest/specs/rfc7638.html)
108
+ - [ ] RFC7797: JSON Web Signature (JWS) Unencoded Payload Option
109
+ - [RFC8037: ECDH in JWS and JWE](https://docs.authlib.org/en/latest/specs/rfc8037.html)
110
+ - [ ] draft-madden-jose-ecdh-1pu-04: Public Key Authenticated Encryption for JOSE: ECDH-1PU
111
+ - [OpenID Connect 1.0](https://docs.authlib.org/en/latest/specs/oidc.html)
112
+ - [x] OpenID Connect Core 1.0
113
+ - [x] OpenID Connect Discovery 1.0
114
+ - [x] OpenID Connect Dynamic Client Registration 1.0
115
+
116
+ Connect third party OAuth providers with Authlib built-in client integrations:
117
+
118
+ - Requests
119
+ - [OAuth1Session](https://docs.authlib.org/en/latest/client/requests.html#requests-oauth-1-0)
120
+ - [OAuth2Session](https://docs.authlib.org/en/latest/client/requests.html#requests-oauth-2-0)
121
+ - [OpenID Connect](https://docs.authlib.org/en/latest/client/requests.html#requests-openid-connect)
122
+ - [AssertionSession](https://docs.authlib.org/en/latest/client/requests.html#requests-service-account)
123
+ - HTTPX
124
+ - [AsyncOAuth1Client](https://docs.authlib.org/en/latest/client/httpx.html#httpx-oauth-1-0)
125
+ - [AsyncOAuth2Client](https://docs.authlib.org/en/latest/client/httpx.html#httpx-oauth-2-0)
126
+ - [OpenID Connect](https://docs.authlib.org/en/latest/client/httpx.html#httpx-oauth-2-0)
127
+ - [AsyncAssertionClient](https://docs.authlib.org/en/latest/client/httpx.html#async-service-account)
128
+ - [Flask OAuth Client](https://docs.authlib.org/en/latest/client/flask.html)
129
+ - [Django OAuth Client](https://docs.authlib.org/en/latest/client/django.html)
130
+ - [Starlette OAuth Client](https://docs.authlib.org/en/latest/client/starlette.html)
131
+ - [FastAPI OAuth Client](https://docs.authlib.org/en/latest/client/fastapi.html)
132
+
133
+ Build your own OAuth 1.0, OAuth 2.0, and OpenID Connect providers:
134
+
135
+ - Flask
136
+ - [Flask OAuth 1.0 Provider](https://docs.authlib.org/en/latest/flask/1/)
137
+ - [Flask OAuth 2.0 Provider](https://docs.authlib.org/en/latest/flask/2/)
138
+ - [Flask OpenID Connect 1.0 Provider](https://docs.authlib.org/en/latest/flask/2/openid-connect.html)
139
+ - Django
140
+ - [Django OAuth 1.0 Provider](https://docs.authlib.org/en/latest/django/1/)
141
+ - [Django OAuth 2.0 Provider](https://docs.authlib.org/en/latest/django/2/)
142
+ - [Django OpenID Connect 1.0 Provider](https://docs.authlib.org/en/latest/django/2/openid-connect.html)
143
+
144
+ ## Useful Links
145
+
146
+ 1. Homepage: <https://authlib.org/>.
147
+ 2. Documentation: <https://docs.authlib.org/>.
148
+ 3. Purchase Commercial License: <https://authlib.org/plans>.
149
+ 4. Blog: <https://blog.authlib.org/>.
150
+ 5. Twitter: <https://twitter.com/authlib>.
151
+ 6. StackOverflow: <https://stackoverflow.com/questions/tagged/authlib>.
152
+ 7. Other Repositories: <https://github.com/authlib>.
153
+ 8. Subscribe Tidelift: [https://tidelift.com/subscription/pkg/pypi-authlib](https://tidelift.com/subscription/pkg/pypi-authlib?utm_source=pypi-authlib&utm_medium=referral&utm_campaign=links).
154
+
155
+ ## Security Reporting
156
+
157
+ If you found security bugs, please do not send a public issue or patch.
158
+ You can send me email at <me@lepture.com>. Attachment with patch is welcome.
159
+ My PGP Key fingerprint is:
160
+
161
+ ```
162
+ 72F8 E895 A70C EBDF 4F2A DFE0 7E55 E3E0 118B 2B4C
163
+ ```
164
+
165
+ Or, you can use the [Tidelift security contact](https://tidelift.com/security).
166
+ Tidelift will coordinate the fix and disclosure.
167
+
168
+ ## License
169
+
170
+ Authlib offers two licenses:
171
+
172
+ 1. BSD LICENSE
173
+ 2. COMMERCIAL-LICENSE
174
+
175
+ Any project, open or closed source, can use the BSD license.
176
+ If your company needs commercial support, you can purchase a commercial license at
177
+ [Authlib Plans](https://authlib.org/plans). You can find more information at
178
+ <https://authlib.org/support>.
authlib-1.6.5/PKG-INFO ADDED
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: Authlib
3
+ Version: 1.6.5
4
+ Summary: The ultimate Python library in building OAuth and OpenID Connect servers and clients.
5
+ Author-email: Hsiaoming Yang <me@lepture.com>
6
+ License: BSD-3-Clause
7
+ Project-URL: Documentation, https://docs.authlib.org/
8
+ Project-URL: Purchase, https://authlib.org/plans
9
+ Project-URL: Issues, https://github.com/authlib/authlib/issues
10
+ Project-URL: Source, https://github.com/authlib/authlib
11
+ Project-URL: Donate, https://github.com/sponsors/lepture
12
+ Project-URL: Blog, https://blog.authlib.org/
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Console
15
+ Classifier: Environment :: Web Environment
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: BSD License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: Implementation :: CPython
27
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
28
+ Classifier: Topic :: Security
29
+ Classifier: Topic :: Security :: Cryptography
30
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
31
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
32
+ Requires-Python: >=3.9
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: cryptography
36
+ Dynamic: license-file
37
+
38
+ <div align="center">
39
+
40
+ <picture>
41
+ <source media="(prefers-color-scheme: dark)" srcset="docs/_static/dark-logo.svg" />
42
+ <img alt="Authlib" src="docs/_static/light-logo.svg" height="68" />
43
+ </picture>
44
+
45
+ [![Build Status](https://github.com/authlib/authlib/workflows/tests/badge.svg)](https://github.com/authlib/authlib/actions)
46
+ [![PyPI version](https://img.shields.io/pypi/v/authlib.svg)](https://pypi.org/project/authlib)
47
+ [![conda-forge version](https://img.shields.io/conda/v/conda-forge/authlib.svg?label=conda-forge&colorB=0090ff)](https://anaconda.org/conda-forge/authlib)
48
+ [![PyPI Downloads](https://static.pepy.tech/badge/authlib/month)](https://pepy.tech/projects/authlib)
49
+ [![Code Coverage](https://codecov.io/gh/authlib/authlib/graph/badge.svg?token=OWTdxAIsPI)](https://codecov.io/gh/authlib/authlib)
50
+ [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=authlib_authlib&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=authlib_authlib)
51
+
52
+ </div>
53
+
54
+ The ultimate Python library in building OAuth and OpenID Connect servers.
55
+ JWS, JWK, JWA, JWT are included.
56
+
57
+ Authlib is compatible with Python3.9+.
58
+
59
+ ## Migrations
60
+
61
+ Authlib will deprecate `authlib.jose` module, please read:
62
+
63
+ - [Migrating from `authlib.jose` to `joserfc`](https://jose.authlib.org/en/dev/migrations/authlib/)
64
+
65
+ ## Sponsors
66
+
67
+ <table>
68
+ <tr>
69
+ <td><img align="middle" width="48" src="https://cdn.auth0.com/website/website/favicons/auth0-favicon.svg"></td>
70
+ <td>If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0's Python SDK and free plan at <a href="https://auth0.com/overview?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=authlib&utm_content=auth">auth0.com/overview</a>.</td>
71
+ </tr>
72
+ <tr>
73
+ <td><img align="middle" width="48" src="https://typlog.com/assets/icon-white.svg"></td>
74
+ <td>A blogging and podcast hosting platform with minimal design but powerful features. Host your blog and Podcast with <a href="https://typlog.com/">Typlog.com</a>.
75
+ </td>
76
+ </tr>
77
+ </table>
78
+
79
+ [**Fund Authlib to access additional features**](https://docs.authlib.org/en/latest/community/funding.html)
80
+
81
+ ## Features
82
+
83
+ Generic, spec-compliant implementation to build clients and providers:
84
+
85
+ - [The OAuth 1.0 Protocol](https://docs.authlib.org/en/latest/basic/oauth1.html)
86
+ - [RFC5849: The OAuth 1.0 Protocol](https://docs.authlib.org/en/latest/specs/rfc5849.html)
87
+ - [The OAuth 2.0 Authorization Framework](https://docs.authlib.org/en/latest/basic/oauth2.html)
88
+ - [RFC6749: The OAuth 2.0 Authorization Framework](https://docs.authlib.org/en/latest/specs/rfc6749.html)
89
+ - [RFC6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://docs.authlib.org/en/latest/specs/rfc6750.html)
90
+ - [RFC7009: OAuth 2.0 Token Revocation](https://docs.authlib.org/en/latest/specs/rfc7009.html)
91
+ - [RFC7523: JWT Profile for OAuth 2.0 Client Authentication and Authorization Grants](https://docs.authlib.org/en/latest/specs/rfc7523.html)
92
+ - [RFC7591: OAuth 2.0 Dynamic Client Registration Protocol](https://docs.authlib.org/en/latest/specs/rfc7591.html)
93
+ - [RFC7592: OAuth 2.0 Dynamic Client Registration Management Protocol](https://docs.authlib.org/en/latest/specs/rfc7592.html)
94
+ - [RFC7636: Proof Key for Code Exchange by OAuth Public Clients](https://docs.authlib.org/en/latest/specs/rfc7636.html)
95
+ - [RFC7662: OAuth 2.0 Token Introspection](https://docs.authlib.org/en/latest/specs/rfc7662.html)
96
+ - [RFC8414: OAuth 2.0 Authorization Server Metadata](https://docs.authlib.org/en/latest/specs/rfc8414.html)
97
+ - [RFC8628: OAuth 2.0 Device Authorization Grant](https://docs.authlib.org/en/latest/specs/rfc8628.html)
98
+ - [RFC9068: JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens](https://docs.authlib.org/en/latest/specs/rfc9068.html)
99
+ - [RFC9101: The OAuth 2.0 Authorization Framework: JWT-Secured Authorization Request (JAR)](https://docs.authlib.org/en/latest/specs/rfc9101.html)
100
+ - [RFC9207: OAuth 2.0 Authorization Server Issuer Identification](https://docs.authlib.org/en/latest/specs/rfc9207.html)
101
+ - [Javascript Object Signing and Encryption](https://docs.authlib.org/en/latest/jose/index.html)
102
+ - [RFC7515: JSON Web Signature](https://docs.authlib.org/en/latest/jose/jws.html)
103
+ - [RFC7516: JSON Web Encryption](https://docs.authlib.org/en/latest/jose/jwe.html)
104
+ - [RFC7517: JSON Web Key](https://docs.authlib.org/en/latest/jose/jwk.html)
105
+ - [RFC7518: JSON Web Algorithms](https://docs.authlib.org/en/latest/specs/rfc7518.html)
106
+ - [RFC7519: JSON Web Token](https://docs.authlib.org/en/latest/jose/jwt.html)
107
+ - [RFC7638: JSON Web Key (JWK) Thumbprint](https://docs.authlib.org/en/latest/specs/rfc7638.html)
108
+ - [ ] RFC7797: JSON Web Signature (JWS) Unencoded Payload Option
109
+ - [RFC8037: ECDH in JWS and JWE](https://docs.authlib.org/en/latest/specs/rfc8037.html)
110
+ - [ ] draft-madden-jose-ecdh-1pu-04: Public Key Authenticated Encryption for JOSE: ECDH-1PU
111
+ - [OpenID Connect 1.0](https://docs.authlib.org/en/latest/specs/oidc.html)
112
+ - [x] OpenID Connect Core 1.0
113
+ - [x] OpenID Connect Discovery 1.0
114
+ - [x] OpenID Connect Dynamic Client Registration 1.0
115
+
116
+ Connect third party OAuth providers with Authlib built-in client integrations:
117
+
118
+ - Requests
119
+ - [OAuth1Session](https://docs.authlib.org/en/latest/client/requests.html#requests-oauth-1-0)
120
+ - [OAuth2Session](https://docs.authlib.org/en/latest/client/requests.html#requests-oauth-2-0)
121
+ - [OpenID Connect](https://docs.authlib.org/en/latest/client/requests.html#requests-openid-connect)
122
+ - [AssertionSession](https://docs.authlib.org/en/latest/client/requests.html#requests-service-account)
123
+ - HTTPX
124
+ - [AsyncOAuth1Client](https://docs.authlib.org/en/latest/client/httpx.html#httpx-oauth-1-0)
125
+ - [AsyncOAuth2Client](https://docs.authlib.org/en/latest/client/httpx.html#httpx-oauth-2-0)
126
+ - [OpenID Connect](https://docs.authlib.org/en/latest/client/httpx.html#httpx-oauth-2-0)
127
+ - [AsyncAssertionClient](https://docs.authlib.org/en/latest/client/httpx.html#async-service-account)
128
+ - [Flask OAuth Client](https://docs.authlib.org/en/latest/client/flask.html)
129
+ - [Django OAuth Client](https://docs.authlib.org/en/latest/client/django.html)
130
+ - [Starlette OAuth Client](https://docs.authlib.org/en/latest/client/starlette.html)
131
+ - [FastAPI OAuth Client](https://docs.authlib.org/en/latest/client/fastapi.html)
132
+
133
+ Build your own OAuth 1.0, OAuth 2.0, and OpenID Connect providers:
134
+
135
+ - Flask
136
+ - [Flask OAuth 1.0 Provider](https://docs.authlib.org/en/latest/flask/1/)
137
+ - [Flask OAuth 2.0 Provider](https://docs.authlib.org/en/latest/flask/2/)
138
+ - [Flask OpenID Connect 1.0 Provider](https://docs.authlib.org/en/latest/flask/2/openid-connect.html)
139
+ - Django
140
+ - [Django OAuth 1.0 Provider](https://docs.authlib.org/en/latest/django/1/)
141
+ - [Django OAuth 2.0 Provider](https://docs.authlib.org/en/latest/django/2/)
142
+ - [Django OpenID Connect 1.0 Provider](https://docs.authlib.org/en/latest/django/2/openid-connect.html)
143
+
144
+ ## Useful Links
145
+
146
+ 1. Homepage: <https://authlib.org/>.
147
+ 2. Documentation: <https://docs.authlib.org/>.
148
+ 3. Purchase Commercial License: <https://authlib.org/plans>.
149
+ 4. Blog: <https://blog.authlib.org/>.
150
+ 5. Twitter: <https://twitter.com/authlib>.
151
+ 6. StackOverflow: <https://stackoverflow.com/questions/tagged/authlib>.
152
+ 7. Other Repositories: <https://github.com/authlib>.
153
+ 8. Subscribe Tidelift: [https://tidelift.com/subscription/pkg/pypi-authlib](https://tidelift.com/subscription/pkg/pypi-authlib?utm_source=pypi-authlib&utm_medium=referral&utm_campaign=links).
154
+
155
+ ## Security Reporting
156
+
157
+ If you found security bugs, please do not send a public issue or patch.
158
+ You can send me email at <me@lepture.com>. Attachment with patch is welcome.
159
+ My PGP Key fingerprint is:
160
+
161
+ ```
162
+ 72F8 E895 A70C EBDF 4F2A DFE0 7E55 E3E0 118B 2B4C
163
+ ```
164
+
165
+ Or, you can use the [Tidelift security contact](https://tidelift.com/security).
166
+ Tidelift will coordinate the fix and disclosure.
167
+
168
+ ## License
169
+
170
+ Authlib offers two licenses:
171
+
172
+ 1. BSD LICENSE
173
+ 2. COMMERCIAL-LICENSE
174
+
175
+ Any project, open or closed source, can use the BSD license.
176
+ If your company needs commercial support, you can purchase a commercial license at
177
+ [Authlib Plans](https://authlib.org/plans). You can find more information at
178
+ <https://authlib.org/support>.
@@ -1,5 +1,5 @@
1
1
  name = "Authlib"
2
- version = "1.6.3"
2
+ version = "1.6.5"
3
3
  author = "Hsiaoming Yang <me@lepture.com>"
4
4
  homepage = "https://authlib.org"
5
5
  default_user_agent = f"{name}/{version} (+{homepage})"
@@ -24,11 +24,15 @@ class AuthorizationServer(_AuthorizationServer):
24
24
  """
25
25
 
26
26
  def __init__(self, client_model, token_model):
27
- self.config = getattr(settings, "AUTHLIB_OAUTH2_PROVIDER", {})
27
+ super().__init__()
28
28
  self.client_model = client_model
29
29
  self.token_model = token_model
30
+ self.load_config(getattr(settings, "AUTHLIB_OAUTH2_PROVIDER", {}))
31
+
32
+ def load_config(self, config):
33
+ self.config = config
30
34
  scopes_supported = self.config.get("scopes_supported")
31
- super().__init__(scopes_supported=scopes_supported)
35
+ self.scopes_supported = scopes_supported
32
36
  # add default token generator
33
37
  self.register_token_generator("default", self.create_bearer_token_generator())
34
38
 
@@ -53,12 +53,14 @@ class AuthorizationServer(_AuthorizationServer):
53
53
  self._query_client = query_client
54
54
  if save_token is not None:
55
55
  self._save_token = save_token
56
+ self.load_config(app.config)
56
57
 
58
+ def load_config(self, config):
57
59
  self.register_token_generator(
58
- "default", self.create_bearer_token_generator(app.config)
60
+ "default", self.create_bearer_token_generator(config)
59
61
  )
60
- self.scopes_supported = app.config.get("OAUTH2_SCOPES_SUPPORTED")
61
- self._error_uris = app.config.get("OAUTH2_ERROR_URIS")
62
+ self.scopes_supported = config.get("OAUTH2_SCOPES_SUPPORTED")
63
+ self._error_uris = config.get("OAUTH2_ERROR_URIS")
62
64
 
63
65
  def query_client(self, client_id):
64
66
  return self._query_client(client_id)
@@ -63,15 +63,22 @@ class StarletteOAuth2App(
63
63
  client_cls = AsyncOAuth2Client
64
64
 
65
65
  async def authorize_access_token(self, request, **kwargs):
66
- error = request.query_params.get("error")
67
- if error:
68
- description = request.query_params.get("error_description")
69
- raise OAuthError(error=error, description=description)
70
-
71
- params = {
72
- "code": request.query_params.get("code"),
73
- "state": request.query_params.get("state"),
74
- }
66
+ if request.scope.get("method", "GET") == "GET":
67
+ error = request.query_params.get("error")
68
+ if error:
69
+ description = request.query_params.get("error_description")
70
+ raise OAuthError(error=error, description=description)
71
+
72
+ params = {
73
+ "code": request.query_params.get("code"),
74
+ "state": request.query_params.get("state"),
75
+ }
76
+ else:
77
+ async with request.form() as form:
78
+ params = {
79
+ "code": form.get("code"),
80
+ "state": form.get("state"),
81
+ }
75
82
 
76
83
  if self.framework.cache:
77
84
  session = None
@@ -33,6 +33,14 @@ class InvalidHeaderParameterNameError(JoseError):
33
33
  super().__init__(description=description)
34
34
 
35
35
 
36
+ class InvalidCritHeaderParameterNameError(JoseError):
37
+ error = "invalid_crit_header_parameter_name"
38
+
39
+ def __init__(self, name):
40
+ description = f"Invalid Header Parameter Name: {name}"
41
+ super().__init__(description=description)
42
+
43
+
36
44
  class InvalidEncryptionAlgorithmForECDH1PUWithKeyWrappingError(JoseError):
37
45
  error = "invalid_encryption_algorithm_for_ECDH_1PU_with_key_wrapping"
38
46
 
@@ -4,6 +4,7 @@ from authlib.common.encoding import to_unicode
4
4
  from authlib.common.encoding import urlsafe_b64encode
5
5
  from authlib.jose.errors import BadSignatureError
6
6
  from authlib.jose.errors import DecodeError
7
+ from authlib.jose.errors import InvalidCritHeaderParameterNameError
7
8
  from authlib.jose.errors import InvalidHeaderParameterNameError
8
9
  from authlib.jose.errors import MissingAlgorithmError
9
10
  from authlib.jose.errors import UnsupportedAlgorithmError
@@ -33,6 +34,8 @@ class JsonWebSignature:
33
34
  ]
34
35
  )
35
36
 
37
+ MAX_CONTENT_LENGTH: int = 256000
38
+
36
39
  #: Defined available JWS algorithms in the registry
37
40
  ALGORITHMS_REGISTRY = {}
38
41
 
@@ -64,6 +67,7 @@ class JsonWebSignature:
64
67
  """
65
68
  jws_header = JWSHeader(protected, None)
66
69
  self._validate_private_headers(protected)
70
+ self._validate_crit_headers(protected)
67
71
  algorithm, key = self._prepare_algorithm_key(protected, payload, key)
68
72
 
69
73
  protected_segment = json_b64encode(jws_header.protected)
@@ -87,6 +91,9 @@ class JsonWebSignature:
87
91
 
88
92
  .. _`Section 7.1`: https://tools.ietf.org/html/rfc7515#section-7.1
89
93
  """
94
+ if len(s) > self.MAX_CONTENT_LENGTH:
95
+ raise ValueError("Serialization is too long.")
96
+
90
97
  try:
91
98
  s = to_bytes(s)
92
99
  signing_input, signature_segment = s.rsplit(b".", 1)
@@ -95,6 +102,7 @@ class JsonWebSignature:
95
102
  raise DecodeError("Not enough segments") from exc
96
103
 
97
104
  protected = _extract_header(protected_segment)
105
+ self._validate_crit_headers(protected)
98
106
  jws_header = JWSHeader(protected, None)
99
107
 
100
108
  payload = _extract_payload(payload_segment)
@@ -132,6 +140,11 @@ class JsonWebSignature:
132
140
 
133
141
  def _sign(jws_header):
134
142
  self._validate_private_headers(jws_header)
143
+ # RFC 7515 §4.1.11: 'crit' MUST be integrity-protected.
144
+ # Reject if present in unprotected header, and validate only
145
+ # against the protected header parameters.
146
+ self._reject_unprotected_crit(jws_header.header)
147
+ self._validate_crit_headers(jws_header.protected)
135
148
  _alg, _key = self._prepare_algorithm_key(jws_header, payload, key)
136
149
 
137
150
  protected_segment = json_b64encode(jws_header.protected)
@@ -272,6 +285,28 @@ class JsonWebSignature:
272
285
  if k not in names:
273
286
  raise InvalidHeaderParameterNameError(k)
274
287
 
288
+ def _reject_unprotected_crit(self, unprotected_header):
289
+ """Reject 'crit' when found in the unprotected header (RFC 7515 §4.1.11)."""
290
+ if unprotected_header and "crit" in unprotected_header:
291
+ raise InvalidHeaderParameterNameError("crit")
292
+
293
+ def _validate_crit_headers(self, header):
294
+ if "crit" in header:
295
+ crit_headers = header["crit"]
296
+ # Type enforcement for robustness and predictable errors
297
+ if not isinstance(crit_headers, list) or not all(
298
+ isinstance(x, str) for x in crit_headers
299
+ ):
300
+ raise InvalidHeaderParameterNameError("crit")
301
+ names = self.REGISTERED_HEADER_PARAMETER_NAMES.copy()
302
+ if self._private_headers:
303
+ names = names.union(self._private_headers)
304
+ for k in crit_headers:
305
+ if k not in names:
306
+ raise InvalidCritHeaderParameterNameError(k)
307
+ elif k not in header:
308
+ raise InvalidCritHeaderParameterNameError(k)
309
+
275
310
  def _validate_json_jws(self, payload_segment, payload, header_obj, key):
276
311
  protected_segment = header_obj.get("protected")
277
312
  if not protected_segment:
@@ -286,7 +321,14 @@ class JsonWebSignature:
286
321
  header = header_obj.get("header")
287
322
  if header and not isinstance(header, dict):
288
323
  raise DecodeError('Invalid "header" value')
289
-
324
+ # RFC 7515 §4.1.11: 'crit' MUST be integrity-protected. If present in
325
+ # the unprotected header object, reject the JWS.
326
+ self._reject_unprotected_crit(header)
327
+
328
+ # Enforce must-understand semantics for names listed in protected
329
+ # 'crit'. This will also ensure each listed name is present in the
330
+ # protected header.
331
+ self._validate_crit_headers(protected)
290
332
  jws_header = JWSHeader(protected, header)
291
333
  algorithm, key = self._prepare_algorithm_key(jws_header, payload, key)
292
334
  signing_input = b".".join([protected_segment, payload_segment])
@@ -0,0 +1,34 @@
1
+ import zlib
2
+
3
+ from ..rfc7516 import JsonWebEncryption
4
+ from ..rfc7516 import JWEZipAlgorithm
5
+
6
+ GZIP_HEAD = bytes([120, 156])
7
+ MAX_SIZE = 250 * 1024
8
+
9
+
10
+ class DeflateZipAlgorithm(JWEZipAlgorithm):
11
+ name = "DEF"
12
+ description = "DEFLATE"
13
+
14
+ def compress(self, s: bytes) -> bytes:
15
+ """Compress bytes data with DEFLATE algorithm."""
16
+ data = zlib.compress(s)
17
+ # https://datatracker.ietf.org/doc/html/rfc1951
18
+ # since DEF is always gzip, we can drop gzip headers and tail
19
+ return data[2:-4]
20
+
21
+ def decompress(self, s: bytes) -> bytes:
22
+ """Decompress DEFLATE bytes data."""
23
+ if s.startswith(GZIP_HEAD):
24
+ decompressor = zlib.decompressobj()
25
+ else:
26
+ decompressor = zlib.decompressobj(-zlib.MAX_WBITS)
27
+ value = decompressor.decompress(s, MAX_SIZE)
28
+ if decompressor.unconsumed_tail:
29
+ raise ValueError(f"Decompressed string exceeds {MAX_SIZE} bytes")
30
+ return value
31
+
32
+
33
+ def register_jwe_rfc7518():
34
+ JsonWebEncryption.register_algorithm(DeflateZipAlgorithm())
@@ -7,6 +7,9 @@ from authlib.jose.errors import DecodeError
7
7
 
8
8
 
9
9
  def extract_header(header_segment, error_cls):
10
+ if len(header_segment) > 256000:
11
+ raise ValueError("Value of header is too long")
12
+
10
13
  header_data = extract_segment(header_segment, error_cls, "header")
11
14
 
12
15
  try:
@@ -20,6 +23,9 @@ def extract_header(header_segment, error_cls):
20
23
 
21
24
 
22
25
  def extract_segment(segment, error_cls, name="payload"):
26
+ if len(segment) > 256000:
27
+ raise ValueError(f"Value of {name} is too long")
28
+
23
29
  try:
24
30
  return urlsafe_b64decode(segment)
25
31
  except (TypeError, binascii.Error) as exc:
@@ -251,8 +251,9 @@ class AuthorizationServer(Hookable):
251
251
  """Validate current HTTP request for authorization page. This page
252
252
  is designed for resource owner to grant or deny the authorization.
253
253
  """
254
+ request = self.create_oauth2_request(request)
255
+
254
256
  try:
255
- request = self.create_oauth2_request(request)
256
257
  request.user = end_user
257
258
 
258
259
  grant = self.get_authorization_grant(request)
@@ -54,9 +54,14 @@ def prepare_grant_uri(
54
54
  if state:
55
55
  params.append(("state", state))
56
56
 
57
- for k in kwargs:
58
- if kwargs[k] is not None:
59
- params.append((to_unicode(k), kwargs[k]))
57
+ for k, value in kwargs.items():
58
+ if value is not None:
59
+ if isinstance(value, (list, tuple)):
60
+ for v in value:
61
+ if v is not None:
62
+ params.append((to_unicode(k), v))
63
+ else:
64
+ params.append((to_unicode(k), value))
60
65
 
61
66
  return add_params_to_uri(uri, params)
62
67