Authlib 1.6.1__tar.gz → 1.6.3__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 (213) hide show
  1. {authlib-1.6.1 → authlib-1.6.3}/Authlib.egg-info/PKG-INFO +1 -1
  2. {authlib-1.6.1 → authlib-1.6.3}/PKG-INFO +1 -1
  3. {authlib-1.6.1 → authlib-1.6.3}/README.md +19 -11
  4. {authlib-1.6.1 → authlib-1.6.3}/authlib/common/security.py +1 -1
  5. {authlib-1.6.1 → authlib-1.6.3}/authlib/consts.py +1 -1
  6. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/sync_openid.py +6 -2
  7. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth2/requests.py +5 -1
  8. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth2/requests.py +3 -1
  9. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/sqla_oauth2/client_mixin.py +4 -0
  10. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7517/key_set.py +2 -3
  11. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/client.py +2 -1
  12. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/parameters.py +1 -1
  13. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/requests.py +20 -1
  14. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/grants/code.py +13 -2
  15. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/grants/implicit.py +21 -0
  16. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/grants/util.py +6 -2
  17. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/util.py +8 -4
  18. {authlib-1.6.1 → authlib-1.6.3}/pyproject.toml +7 -1
  19. {authlib-1.6.1 → authlib-1.6.3}/Authlib.egg-info/SOURCES.txt +0 -0
  20. {authlib-1.6.1 → authlib-1.6.3}/Authlib.egg-info/dependency_links.txt +0 -0
  21. {authlib-1.6.1 → authlib-1.6.3}/Authlib.egg-info/requires.txt +0 -0
  22. {authlib-1.6.1 → authlib-1.6.3}/Authlib.egg-info/top_level.txt +0 -0
  23. {authlib-1.6.1 → authlib-1.6.3}/LICENSE +0 -0
  24. {authlib-1.6.1 → authlib-1.6.3}/MANIFEST.in +0 -0
  25. {authlib-1.6.1 → authlib-1.6.3}/authlib/__init__.py +0 -0
  26. {authlib-1.6.1 → authlib-1.6.3}/authlib/common/__init__.py +0 -0
  27. {authlib-1.6.1 → authlib-1.6.3}/authlib/common/encoding.py +0 -0
  28. {authlib-1.6.1 → authlib-1.6.3}/authlib/common/errors.py +0 -0
  29. {authlib-1.6.1 → authlib-1.6.3}/authlib/common/urls.py +0 -0
  30. {authlib-1.6.1 → authlib-1.6.3}/authlib/deprecate.py +0 -0
  31. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/__init__.py +0 -0
  32. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/__init__.py +0 -0
  33. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/async_app.py +0 -0
  34. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/async_openid.py +0 -0
  35. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/errors.py +0 -0
  36. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/framework_integration.py +0 -0
  37. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/registry.py +0 -0
  38. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/base_client/sync_app.py +0 -0
  39. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_client/__init__.py +0 -0
  40. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_client/apps.py +0 -0
  41. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_client/integration.py +0 -0
  42. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth1/__init__.py +0 -0
  43. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth1/authorization_server.py +0 -0
  44. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth1/nonce.py +0 -0
  45. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth1/resource_protector.py +0 -0
  46. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth2/__init__.py +0 -0
  47. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth2/authorization_server.py +0 -0
  48. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth2/endpoints.py +0 -0
  49. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth2/resource_protector.py +0 -0
  50. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/django_oauth2/signals.py +0 -0
  51. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_client/__init__.py +0 -0
  52. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_client/apps.py +0 -0
  53. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_client/integration.py +0 -0
  54. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth1/__init__.py +0 -0
  55. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth1/authorization_server.py +0 -0
  56. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth1/cache.py +0 -0
  57. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth1/resource_protector.py +0 -0
  58. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth2/__init__.py +0 -0
  59. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth2/authorization_server.py +0 -0
  60. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth2/errors.py +0 -0
  61. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth2/resource_protector.py +0 -0
  62. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/flask_oauth2/signals.py +0 -0
  63. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/httpx_client/__init__.py +0 -0
  64. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/httpx_client/assertion_client.py +0 -0
  65. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/httpx_client/oauth1_client.py +0 -0
  66. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/httpx_client/oauth2_client.py +0 -0
  67. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/httpx_client/utils.py +0 -0
  68. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/requests_client/__init__.py +0 -0
  69. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/requests_client/assertion_session.py +0 -0
  70. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/requests_client/oauth1_session.py +0 -0
  71. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/requests_client/oauth2_session.py +0 -0
  72. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/requests_client/utils.py +0 -0
  73. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/sqla_oauth2/__init__.py +0 -0
  74. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/sqla_oauth2/functions.py +0 -0
  75. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/sqla_oauth2/tokens_mixins.py +0 -0
  76. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/starlette_client/__init__.py +0 -0
  77. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/starlette_client/apps.py +0 -0
  78. {authlib-1.6.1 → authlib-1.6.3}/authlib/integrations/starlette_client/integration.py +0 -0
  79. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/__init__.py +0 -0
  80. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/drafts/__init__.py +0 -0
  81. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/drafts/_jwe_algorithms.py +0 -0
  82. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/drafts/_jwe_enc_cryptodome.py +0 -0
  83. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/drafts/_jwe_enc_cryptography.py +0 -0
  84. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/errors.py +0 -0
  85. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/jwk.py +0 -0
  86. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7515/__init__.py +0 -0
  87. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7515/jws.py +0 -0
  88. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7515/models.py +0 -0
  89. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7516/__init__.py +0 -0
  90. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7516/jwe.py +0 -0
  91. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7516/models.py +0 -0
  92. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7517/__init__.py +0 -0
  93. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7517/_cryptography_key.py +0 -0
  94. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7517/asymmetric_key.py +0 -0
  95. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7517/base_key.py +0 -0
  96. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7517/jwk.py +0 -0
  97. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/__init__.py +0 -0
  98. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/ec_key.py +0 -0
  99. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/jwe_algs.py +0 -0
  100. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/jwe_encs.py +0 -0
  101. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/jwe_zips.py +0 -0
  102. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/jws_algs.py +0 -0
  103. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/oct_key.py +0 -0
  104. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/rsa_key.py +0 -0
  105. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7518/util.py +0 -0
  106. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7519/__init__.py +0 -0
  107. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7519/claims.py +0 -0
  108. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc7519/jwt.py +0 -0
  109. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc8037/__init__.py +0 -0
  110. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc8037/jws_eddsa.py +0 -0
  111. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/rfc8037/okp_key.py +0 -0
  112. {authlib-1.6.1 → authlib-1.6.3}/authlib/jose/util.py +0 -0
  113. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/__init__.py +0 -0
  114. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/client.py +0 -0
  115. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/errors.py +0 -0
  116. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/__init__.py +0 -0
  117. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/authorization_server.py +0 -0
  118. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/base_server.py +0 -0
  119. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/client_auth.py +0 -0
  120. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/errors.py +0 -0
  121. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/models.py +0 -0
  122. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/parameters.py +0 -0
  123. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/resource_protector.py +0 -0
  124. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/rsa.py +0 -0
  125. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/signature.py +0 -0
  126. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/util.py +0 -0
  127. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth1/rfc5849/wrapper.py +0 -0
  128. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/__init__.py +0 -0
  129. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/auth.py +0 -0
  130. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/base.py +0 -0
  131. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/__init__.py +0 -0
  132. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/authenticate_client.py +0 -0
  133. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/authorization_server.py +0 -0
  134. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/errors.py +0 -0
  135. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/grants/__init__.py +0 -0
  136. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/grants/authorization_code.py +0 -0
  137. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/grants/base.py +0 -0
  138. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/grants/client_credentials.py +0 -0
  139. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/grants/implicit.py +0 -0
  140. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/grants/refresh_token.py +0 -0
  141. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/grants/resource_owner_password_credentials.py +0 -0
  142. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/hooks.py +0 -0
  143. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/models.py +0 -0
  144. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/resource_protector.py +0 -0
  145. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/token_endpoint.py +0 -0
  146. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/util.py +0 -0
  147. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6749/wrappers.py +0 -0
  148. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6750/__init__.py +0 -0
  149. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6750/errors.py +0 -0
  150. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6750/parameters.py +0 -0
  151. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6750/token.py +0 -0
  152. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc6750/validator.py +0 -0
  153. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7009/__init__.py +0 -0
  154. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7009/parameters.py +0 -0
  155. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7009/revocation.py +0 -0
  156. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7521/__init__.py +0 -0
  157. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7521/client.py +0 -0
  158. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7523/__init__.py +0 -0
  159. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7523/assertion.py +0 -0
  160. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7523/auth.py +0 -0
  161. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7523/client.py +0 -0
  162. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7523/jwt_bearer.py +0 -0
  163. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7523/token.py +0 -0
  164. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7523/validator.py +0 -0
  165. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7591/__init__.py +0 -0
  166. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7591/claims.py +0 -0
  167. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7591/endpoint.py +0 -0
  168. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7591/errors.py +0 -0
  169. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7592/__init__.py +0 -0
  170. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7592/endpoint.py +0 -0
  171. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7636/__init__.py +0 -0
  172. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7636/challenge.py +0 -0
  173. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7662/__init__.py +0 -0
  174. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7662/introspection.py +0 -0
  175. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7662/models.py +0 -0
  176. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc7662/token_validator.py +0 -0
  177. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8414/__init__.py +0 -0
  178. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8414/models.py +0 -0
  179. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8414/well_known.py +0 -0
  180. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8628/__init__.py +0 -0
  181. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8628/device_code.py +0 -0
  182. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8628/endpoint.py +0 -0
  183. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8628/errors.py +0 -0
  184. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8628/models.py +0 -0
  185. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc8693/__init__.py +0 -0
  186. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9068/__init__.py +0 -0
  187. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9068/claims.py +0 -0
  188. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9068/introspection.py +0 -0
  189. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9068/revocation.py +0 -0
  190. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9068/token.py +0 -0
  191. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9068/token_validator.py +0 -0
  192. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9101/__init__.py +0 -0
  193. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9101/authorization_server.py +0 -0
  194. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9101/discovery.py +0 -0
  195. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9101/errors.py +0 -0
  196. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9101/registration.py +0 -0
  197. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9207/__init__.py +0 -0
  198. {authlib-1.6.1 → authlib-1.6.3}/authlib/oauth2/rfc9207/parameter.py +0 -0
  199. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/__init__.py +0 -0
  200. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/__init__.py +0 -0
  201. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/claims.py +0 -0
  202. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/errors.py +0 -0
  203. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/grants/__init__.py +0 -0
  204. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/grants/hybrid.py +0 -0
  205. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/models.py +0 -0
  206. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/core/userinfo.py +0 -0
  207. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/discovery/__init__.py +0 -0
  208. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/discovery/models.py +0 -0
  209. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/discovery/well_known.py +0 -0
  210. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/registration/__init__.py +0 -0
  211. {authlib-1.6.1 → authlib-1.6.3}/authlib/oidc/registration/claims.py +0 -0
  212. {authlib-1.6.1 → authlib-1.6.3}/setup.cfg +0 -0
  213. {authlib-1.6.1 → authlib-1.6.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Authlib
3
- Version: 1.6.1
3
+ Version: 1.6.3
4
4
  Summary: The ultimate Python library in building OAuth and OpenID Connect servers and clients.
5
5
  Author-email: Hsiaoming Yang <me@lepture.com>
6
6
  License: BSD-3-Clause
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Authlib
3
- Version: 1.6.1
3
+ Version: 1.6.3
4
4
  Summary: The ultimate Python library in building OAuth and OpenID Connect servers and clients.
5
5
  Author-email: Hsiaoming Yang <me@lepture.com>
6
6
  License: BSD-3-Clause
@@ -1,27 +1,35 @@
1
- <a href="https://authlib.org/">
2
- <img align="right" width="120" height="120" src="https://authlib.org/assets/logo.svg">
3
- </a>
1
+ <div align="center">
4
2
 
5
- # Authlib
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="docs/_static/dark-logo.svg" />
5
+ <img alt="Authlib" src="docs/_static/light-logo.svg" height="68" />
6
+ </picture>
6
7
 
7
- <a href="https://github.com/sponsors/lepture"><img src="https://badgen.net/badge/support/authlib/ff69b4?icon=patreon" /></a>
8
- <a href="https://github.com/authlib/authlib/actions"><img src="https://github.com/authlib/authlib/workflows/tests/badge.svg" alt="Build Status"></a>
9
- <a href="https://codecov.io/gh/authlib/authlib" > <img src="https://codecov.io/gh/authlib/authlib/graph/badge.svg?token=BQKzPoql9j"/></a>
10
- <a href="https://pypi.org/project/Authlib/"><img src="https://badgen.net/pypi/v/authlib" alt="PyPI Version"></a>
11
- <a href="https://codeclimate.com/github/authlib/authlib/maintainability"><img src="https://badgen.net/codeclimate/maintainability/authlib/authlib?icon=codeclimate" alt="Maintainability" /></a>
8
+ [![Build Status](https://github.com/authlib/authlib/workflows/tests/badge.svg)](https://github.com/authlib/authlib/actions)
9
+ [![PyPI version](https://img.shields.io/pypi/v/authlib.svg)](https://pypi.org/project/authlib)
10
+ [![conda-forge version](https://img.shields.io/conda/v/conda-forge/authlib.svg?label=conda-forge&colorB=0090ff)](https://anaconda.org/conda-forge/authlib)
11
+ [![PyPI Downloads](https://static.pepy.tech/badge/authlib/month)](https://pepy.tech/projects/authlib)
12
+ [![Code Coverage](https://codecov.io/gh/authlib/authlib/graph/badge.svg?token=OWTdxAIsPI)](https://codecov.io/gh/authlib/authlib)
13
+ [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=authlib_authlib&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=authlib_authlib)
14
+
15
+ </div>
12
16
 
13
17
  The ultimate Python library in building OAuth and OpenID Connect servers.
14
18
  JWS, JWK, JWA, JWT are included.
15
19
 
16
20
  Authlib is compatible with Python3.9+.
17
21
 
18
- **[Migrating from `authlib.jose` to `joserfc`](https://jose.authlib.org/en/dev/migrations/authlib/)**
22
+ ## Migrations
23
+
24
+ Authlib will deprecate `authlib.jose` module, please read:
25
+
26
+ - [Migrating from `authlib.jose` to `joserfc`](https://jose.authlib.org/en/dev/migrations/authlib/)
19
27
 
20
28
  ## Sponsors
21
29
 
22
30
  <table>
23
31
  <tr>
24
- <td><img align="middle" width="48" src="https://avatars.githubusercontent.com/u/70178963?v=4"></td>
32
+ <td><img align="middle" width="48" src="https://cdn.auth0.com/website/website/favicons/auth0-favicon.svg"></td>
25
33
  <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>
26
34
  </tr>
27
35
  <tr>
@@ -16,4 +16,4 @@ def is_secure_transport(uri):
16
16
  return True
17
17
 
18
18
  uri = uri.lower()
19
- return uri.startswith(("https://", "http://localhost:"))
19
+ return uri.startswith(("https://", "http://localhost:", "http://127.0.0.1:"))
@@ -1,5 +1,5 @@
1
1
  name = "Authlib"
2
- version = "1.6.1"
2
+ version = "1.6.3"
3
3
  author = "Hsiaoming Yang <me@lepture.com>"
4
4
  homepage = "https://authlib.org"
5
5
  default_user_agent = f"{name}/{version} (+{homepage})"
@@ -82,10 +82,14 @@ class OpenIDMixin:
82
82
  def load_key(header, _):
83
83
  jwk_set = JsonWebKey.import_key_set(self.fetch_jwk_set())
84
84
  try:
85
- return jwk_set.find_by_kid(header.get("kid"), use="sig", alg=header.get("alg"))
85
+ return jwk_set.find_by_kid(
86
+ header.get("kid"), use="sig", alg=header.get("alg")
87
+ )
86
88
  except ValueError:
87
89
  # re-try with new jwk set
88
90
  jwk_set = JsonWebKey.import_key_set(self.fetch_jwk_set(force=True))
89
- return jwk_set.find_by_kid(header.get("kid"), use="sig", alg=header.get("alg"))
91
+ return jwk_set.find_by_kid(
92
+ header.get("kid"), use="sig", alg=header.get("alg")
93
+ )
90
94
 
91
95
  return load_key
@@ -33,7 +33,11 @@ class DjangoOAuth2Payload(OAuth2Payload):
33
33
 
34
34
  class DjangoOAuth2Request(OAuth2Request):
35
35
  def __init__(self, request: HttpRequest):
36
- super().__init__(request.method, request.build_absolute_uri(), request.headers)
36
+ super().__init__(
37
+ method=request.method,
38
+ uri=request.build_absolute_uri(),
39
+ headers=request.headers,
40
+ )
37
41
  self.payload = DjangoOAuth2Payload(request)
38
42
  self._request = request
39
43
 
@@ -27,7 +27,9 @@ class FlaskOAuth2Payload(OAuth2Payload):
27
27
 
28
28
  class FlaskOAuth2Request(OAuth2Request):
29
29
  def __init__(self, request: Request):
30
- super().__init__(request.method, request.url, request.headers)
30
+ super().__init__(
31
+ method=request.method, uri=request.url, headers=request.headers
32
+ )
31
33
  self._request = request
32
34
  self.payload = FlaskOAuth2Payload(request)
33
35
 
@@ -110,6 +110,10 @@ class OAuth2ClientMixin(ClientMixin):
110
110
  def software_version(self):
111
111
  return self.client_metadata.get("software_version")
112
112
 
113
+ @property
114
+ def id_token_signed_response_alg(self):
115
+ return self.client_metadata.get("id_token_signed_response_alg")
116
+
113
117
  def get_client_id(self):
114
118
  return self.client_id
115
119
 
@@ -32,10 +32,9 @@ class KeySet:
32
32
  if params:
33
33
  keys = list(_filter_keys_by_params(keys, **params))
34
34
 
35
- if len(keys) == 1:
35
+ if keys:
36
36
  return keys[0]
37
-
38
- raise ValueError("Invalid JSON Web Key Set")
37
+ raise ValueError("Key not found")
39
38
 
40
39
 
41
40
  def _filter_keys_by_params(keys, **params):
@@ -205,7 +205,8 @@ class OAuth2Client:
205
205
  be added as needed.
206
206
  :param headers: Dict to default request headers with.
207
207
  :param auth: An auth tuple or method as accepted by requests.
208
- :param grant_type: Use specified grant_type to fetch token
208
+ :param grant_type: Use specified grant_type to fetch token.
209
+ :param state: Optional "state" value to fetch token.
209
210
  :return: A :class:`OAuth2Token` object (a dict too).
210
211
  """
211
212
  state = state or self.state
@@ -92,7 +92,7 @@ def prepare_token_request(grant_type, body="", redirect_uri=None, **kwargs):
92
92
  if "scope" in kwargs:
93
93
  kwargs["scope"] = list_to_scope(kwargs["scope"])
94
94
 
95
- if grant_type == "authorization_code" and "code" not in kwargs:
95
+ if grant_type == "authorization_code" and kwargs.get("code") is None:
96
96
  raise MissingCodeException()
97
97
 
98
98
  for k in kwargs:
@@ -65,7 +65,7 @@ class BasicOAuth2Payload(OAuth2Payload):
65
65
 
66
66
 
67
67
  class OAuth2Request(OAuth2Payload):
68
- def __init__(self, method: str, uri: str, headers=None):
68
+ def __init__(self, method: str, uri: str, body=None, headers=None):
69
69
  InsecureTransportError.check(uri)
70
70
  #: HTTP method
71
71
  self.method = method
@@ -73,6 +73,15 @@ class OAuth2Request(OAuth2Payload):
73
73
  #: HTTP headers
74
74
  self.headers = headers or {}
75
75
 
76
+ # Store body for backward compatibility but issue deprecation warning if used
77
+ if body is not None:
78
+ deprecate(
79
+ "'body' parameter in OAuth2Request is deprecated. "
80
+ "Use the payload system instead.",
81
+ version="1.8",
82
+ )
83
+ self._body = body
84
+
76
85
  self.payload = None
77
86
 
78
87
  self.client = None
@@ -88,6 +97,8 @@ class OAuth2Request(OAuth2Payload):
88
97
 
89
98
  @property
90
99
  def form(self):
100
+ if self._body:
101
+ return self._body
91
102
  raise NotImplementedError()
92
103
 
93
104
  @property
@@ -154,6 +165,14 @@ class OAuth2Request(OAuth2Payload):
154
165
  )
155
166
  return self.payload.state
156
167
 
168
+ @property
169
+ def body(self):
170
+ deprecate(
171
+ "'request.body' is deprecated. Use the payload system instead.",
172
+ version="1.8",
173
+ )
174
+ return self._body
175
+
157
176
 
158
177
  class JsonPayload:
159
178
  @property
@@ -22,8 +22,12 @@ log = logging.getLogger(__name__)
22
22
  class OpenIDToken:
23
23
  def get_jwt_config(self, grant): # pragma: no cover
24
24
  """Get the JWT configuration for OpenIDCode extension. The JWT
25
- configuration will be used to generate ``id_token``. Developers
26
- MUST implement this method in subclass, e.g.::
25
+ configuration will be used to generate ``id_token``.
26
+ If ``alg`` is undefined, the ``id_token_signed_response_alg`` client
27
+ metadata will be used. By default ``RS256`` will be used.
28
+ If ``key`` is undefined, the ``jwks_uri`` or ``jwks`` client metadata
29
+ will be used.
30
+ Developers MUST implement this method in subclass, e.g.::
27
31
 
28
32
  def get_jwt_config(self, grant):
29
33
  return {
@@ -77,6 +81,13 @@ class OpenIDToken:
77
81
  config = self.get_jwt_config(grant)
78
82
  config["aud"] = self.get_audiences(request)
79
83
 
84
+ # Per OpenID Connect Registration 1.0 Section 2:
85
+ # Use client's id_token_signed_response_alg if specified
86
+ if not config.get("alg") and (
87
+ client_alg := request.client.id_token_signed_response_alg
88
+ ):
89
+ config["alg"] = client_alg
90
+
80
91
  if authorization_code:
81
92
  config["nonce"] = authorization_code.get_nonce()
82
93
  config["auth_time"] = authorization_code.get_auth_time()
@@ -4,6 +4,7 @@ from authlib.oauth2.rfc6749 import AccessDeniedError
4
4
  from authlib.oauth2.rfc6749 import ImplicitGrant
5
5
  from authlib.oauth2.rfc6749 import InvalidScopeError
6
6
  from authlib.oauth2.rfc6749 import OAuth2Error
7
+ from authlib.oauth2.rfc6749.errors import InvalidRequestError
7
8
  from authlib.oauth2.rfc6749.hooks import hooked
8
9
 
9
10
  from .util import create_response_mode_response
@@ -148,6 +149,26 @@ class OpenIDImplicitGrant(ImplicitGrant):
148
149
  if code is not None:
149
150
  config["code"] = code
150
151
 
152
+ # Per OpenID Connect Registration 1.0 Section 2:
153
+ # Use client's id_token_signed_response_alg if specified
154
+ if not config.get("alg") and (
155
+ client_alg := self.request.client.id_token_signed_response_alg
156
+ ):
157
+ if client_alg == "none":
158
+ # According to oidc-registration §2 the 'none' alg is not valid in
159
+ # implicit flows:
160
+ # The value none MUST NOT be used as the ID Token alg value unless
161
+ # the Client uses only Response Types that return no ID Token from
162
+ # the Authorization Endpoint (such as when only using the
163
+ # Authorization Code Flow).
164
+ raise InvalidRequestError(
165
+ "id_token must be signed in implicit flows",
166
+ redirect_uri=self.request.payload.redirect_uri,
167
+ redirect_fragment=True,
168
+ )
169
+
170
+ config["alg"] = client_alg
171
+
151
172
  user_info = self.generate_user_info(self.request.user, token["scope"])
152
173
  id_token = generate_id_token(token, user_info, **config)
153
174
  token["id_token"] = id_token
@@ -100,11 +100,15 @@ def generate_id_token(
100
100
  payload["amr"] = amr
101
101
 
102
102
  if code:
103
- payload["c_hash"] = to_native(create_half_hash(code, alg))
103
+ c_hash = create_half_hash(code, alg)
104
+ if c_hash is not None:
105
+ payload["c_hash"] = to_native(c_hash)
104
106
 
105
107
  access_token = token.get("access_token")
106
108
  if access_token:
107
- payload["at_hash"] = to_native(create_half_hash(access_token, alg))
109
+ at_hash = create_half_hash(access_token, alg)
110
+ if at_hash is not None:
111
+ payload["at_hash"] = to_native(at_hash)
108
112
 
109
113
  payload.update(user_info)
110
114
  return to_native(jwt.encode(header, payload, key))
@@ -5,10 +5,14 @@ from authlib.common.encoding import urlsafe_b64encode
5
5
 
6
6
 
7
7
  def create_half_hash(s, alg):
8
- hash_type = f"sha{alg[2:]}"
9
- hash_alg = getattr(hashlib, hash_type, None)
10
- if not hash_alg:
11
- return None
8
+ if alg == "EdDSA":
9
+ hash_alg = hashlib.sha512
10
+ else:
11
+ hash_type = f"sha{alg[2:]}"
12
+ hash_alg = getattr(hashlib, hash_type, None)
13
+ if not hash_alg:
14
+ return None
15
+
12
16
  data_digest = hash_alg(to_bytes(s)).digest()
13
17
  slice_index = int(len(data_digest) / 2)
14
18
  return urlsafe_b64encode(data_digest[:slice_index])
@@ -47,9 +47,11 @@ Blog = "https://blog.authlib.org/"
47
47
  dev = [
48
48
  "coverage",
49
49
  "cryptography",
50
- "pre-commit-uv>=4.1.4",
50
+ "diff-cover>=9.6.0",
51
+ "prek>=0.1.3",
51
52
  "pytest",
52
53
  "pytest-asyncio",
54
+ "pytest-env",
53
55
  "tox-uv >= 1.16.0",
54
56
  ]
55
57
 
@@ -120,6 +122,10 @@ docstring-code-format = true
120
122
  asyncio_default_fixture_loop_scope = "function"
121
123
  asyncio_mode = "auto"
122
124
  norecursedirs = ["authlib", "build", "dist", "docs", "htmlcov"]
125
+ pythonpath = ["."]
126
+ env = [
127
+ "DJANGO_SETTINGS_MODULE = tests.django_settings",
128
+ ]
123
129
 
124
130
  [tool.coverage.run]
125
131
  branch = true
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes