xtr-security-http 6.8.1__tar.gz → 7.0.0__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 (263) hide show
  1. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/PKG-INFO +47 -33
  2. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/README.md +30 -11
  3. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/pyproject.toml +28 -33
  4. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/pyproject.toml.orig +28 -33
  5. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/_form_content_type.py +4 -1
  6. xtr_security_http-7.0.0/src/xtr_security_http/_text.py +18 -0
  7. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_map.py +1 -3
  8. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/chain_access_token_extractor.py +1 -2
  9. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/form_encoded_body_extractor.py +1 -3
  10. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/header_access_token_extractor.py +1 -3
  11. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oauth2/oauth2_token_handler.py +3 -2
  12. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/oidc_user_info_token_handler.py +5 -4
  13. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/query_access_token_extractor.py +1 -3
  14. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/authenticator_manager.py +1 -2
  15. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/custom_authentication_failure_handler.py +13 -9
  16. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/custom_authentication_success_handler.py +16 -12
  17. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/default_authentication_failure_handler.py +1 -2
  18. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/default_authentication_success_handler.py +8 -3
  19. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/abstract_authenticator.py +1 -3
  20. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/abstract_login_form_authenticator.py +1 -3
  21. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/abstract_pre_authenticated_authenticator.py +1 -2
  22. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/access_token_authenticator.py +1 -2
  23. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/debug/traceable_authenticator.py +1 -2
  24. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/debug/traceable_authenticator_manager_listener.py +23 -7
  25. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/form_login_authenticator.py +1 -2
  26. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/http_basic_authenticator.py +1 -2
  27. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/json_login_authenticator.py +1 -2
  28. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/login_link_authenticator.py +1 -2
  29. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/oidc/oidc_jwks.py +1 -2
  30. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/oidc_login_authenticator.py +1 -2
  31. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/authentication_method_badge.py +1 -2
  32. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/csrf_token_badge.py +1 -3
  33. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/password_upgrade_badge.py +1 -3
  34. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/pre_authenticated_user_badge.py +1 -3
  35. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/remember_me_badge.py +1 -3
  36. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/user_badge.py +2 -3
  37. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/credentials/custom_credentials.py +1 -2
  38. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/credentials/password_credentials.py +1 -2
  39. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/passport.py +3 -5
  40. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/remember_me_authenticator.py +1 -2
  41. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/remote_user_authenticator.py +1 -2
  42. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/token/post_authentication_token.py +1 -2
  43. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/x509_authenticator.py +1 -2
  44. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authorization/insufficient_scope_access_denied_handler.py +1 -2
  45. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authorization/oauth2_scope_voter.py +1 -2
  46. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/firewall_listener_order.py +2 -3
  47. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/is_csrf_token_valid.py +1 -1
  48. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/is_granted.py +9 -11
  49. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/entry_point/fallback_authentication_entry_point_interface.py +1 -3
  50. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/authentication_proofs_listener.py +1 -2
  51. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/check_credentials_listener.py +4 -5
  52. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/check_remember_me_conditions_listener.py +1 -2
  53. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/clear_site_data_listener.py +1 -2
  54. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/cookie_clearing_listener.py +1 -2
  55. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/csrf_protection_listener.py +1 -2
  56. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/csrf_token_clearing_listener.py +1 -2
  57. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/default_logout_listener.py +1 -2
  58. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/login_throttling_listener.py +25 -67
  59. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/oidc_end_session_listener.py +1 -2
  60. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/password_migrating_listener.py +4 -5
  61. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/remember_me_listener.py +1 -2
  62. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/save_session_listener.py +5 -3
  63. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/session_logout_listener.py +1 -2
  64. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/session_strategy_listener.py +1 -2
  65. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/user_checker_listener.py +1 -2
  66. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/user_provider_listener.py +1 -2
  67. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/abstract_listener.py +1 -1
  68. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/access_listener.py +1 -2
  69. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/authenticator_manager_listener.py +10 -7
  70. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/channel_listener.py +1 -2
  71. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/context_listener.py +1 -2
  72. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/firewall.py +5 -6
  73. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/logout_listener.py +1 -2
  74. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/oidc_token_refresh_listener.py +1 -2
  75. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/switch_user_listener.py +1 -2
  76. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall_map.py +1 -2
  77. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/login_link/login_link_details.py +1 -3
  78. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/login_link/login_link_handler.py +21 -4
  79. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/access_token_type/bearer_token_type.py +1 -2
  80. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/abstract_client_assertion.py +1 -2
  81. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/abstract_tls_client_auth.py +1 -3
  82. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/client_secret_basic.py +1 -2
  83. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/client_secret_jwt.py +1 -2
  84. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/client_secret_post.py +1 -2
  85. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/no_client_authentication.py +1 -2
  86. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/private_key_jwt.py +1 -2
  87. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/self_signed_tls_client_auth.py +1 -3
  88. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/tls_client_auth.py +1 -3
  89. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/discovery_oidc_key_set_provider.py +1 -2
  90. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_client.py +1 -2
  91. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_discovery.py +3 -1
  92. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_jwks.py +1 -1
  93. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/rate_limiter/default_login_rate_limiter.py +1 -2
  94. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/abstract_remember_me_handler.py +9 -6
  95. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/persistent_remember_me_handler.py +21 -3
  96. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/remember_me_details.py +12 -6
  97. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/response_listener.py +1 -2
  98. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/signature_remember_me_handler.py +1 -2
  99. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/security_request_attributes.py +0 -4
  100. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/_session_kinds.py +4 -6
  101. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/authentication_error_serializer.py +1 -1
  102. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/password_session_user.py +1 -2
  103. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/session_authentication_strategy.py +1 -2
  104. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/session_token_serializer.py +6 -7
  105. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/session_user.py +1 -2
  106. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/LICENSE +0 -0
  107. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/__init__.py +0 -0
  108. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/_challenge.py +0 -0
  109. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/_request_parameters.py +0 -0
  110. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/_same_origin.py +0 -0
  111. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/_security_state.py +0 -0
  112. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_map_interface.py +0 -0
  113. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/__init__.py +0 -0
  114. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/access_token_extractor_interface.py +0 -0
  115. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/access_token_handler_interface.py +0 -0
  116. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oauth2/__init__.py +0 -0
  117. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oauth2/_introspected_user.py +0 -0
  118. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oauth2/_introspection_claims.py +0 -0
  119. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oauth2/_signed_response.py +0 -0
  120. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oauth2/_signed_response_discovery.py +0 -0
  121. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/__init__.py +0 -0
  122. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/exception/__init__.py +0 -0
  123. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/exception/invalid_signature_error.py +0 -0
  124. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/exception/missing_claim_error.py +0 -0
  125. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/exception/oidc_key_set_error.py +0 -0
  126. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/oidc_token_generator.py +0 -0
  127. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/oidc_token_handler.py +0 -0
  128. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/oidc/oidc_trait.py +0 -0
  129. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/access_token/sender_constraint_interface.py +0 -0
  130. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/__init__.py +0 -0
  131. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/_authentication_outcome.py +0 -0
  132. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/_manager_reporting.py +0 -0
  133. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/_referer.py +0 -0
  134. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/_sensitive.py +0 -0
  135. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/_supports_pass.py +0 -0
  136. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/authentication_failure_handler_interface.py +0 -0
  137. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/authentication_success_handler_interface.py +0 -0
  138. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/authentication_utils.py +0 -0
  139. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/authenticator_manager_interface.py +0 -0
  140. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/expose_security_level.py +0 -0
  141. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authentication/user_authenticator_interface.py +0 -0
  142. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/__init__.py +0 -0
  143. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_access_token_challenge.py +0 -0
  144. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_access_token_scopes.py +0 -0
  145. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_form_login_credentials.py +0 -0
  146. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_oidc_login_attempts.py +0 -0
  147. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_oidc_login_authorization.py +0 -0
  148. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_oidc_login_callback.py +0 -0
  149. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_oidc_login_claims.py +0 -0
  150. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_oidc_login_options.py +0 -0
  151. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_oidc_login_public_client.py +0 -0
  152. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/_oidc_login_token.py +0 -0
  153. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/authenticator_interface.py +0 -0
  154. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/debug/__init__.py +0 -0
  155. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/debug/unsupported_reasons.py +0 -0
  156. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/fallback_user_loader.py +0 -0
  157. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/interactive_authenticator_interface.py +0 -0
  158. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/oidc/__init__.py +0 -0
  159. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/__init__.py +0 -0
  160. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/__init__.py +0 -0
  161. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/badge/badge_interface.py +0 -0
  162. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/credentials/__init__.py +0 -0
  163. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/credentials/credentials_interface.py +0 -0
  164. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/passport/self_validating_passport.py +0 -0
  165. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authenticator/token/__init__.py +0 -0
  166. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authorization/__init__.py +0 -0
  167. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/authorization/access_denied_handler_interface.py +0 -0
  168. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/command/__init__.py +0 -0
  169. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/command/_registry.py +0 -0
  170. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/command/oidc_token_generate_command.py +0 -0
  171. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/__init__.py +0 -0
  172. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/_methods.py +0 -0
  173. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/current_token.py +0 -0
  174. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/current_user.py +0 -0
  175. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/decorator/is_granted_context.py +0 -0
  176. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/entry_point/__init__.py +0 -0
  177. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/entry_point/authentication_entry_point_interface.py +0 -0
  178. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/entry_point/re_authentication_entry_point_interface.py +0 -0
  179. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/__init__.py +0 -0
  180. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/authentication_token_created_event.py +0 -0
  181. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/check_passport_event.py +0 -0
  182. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/check_refreshed_user_event.py +0 -0
  183. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/interactive_login_event.py +0 -0
  184. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/login_failure_event.py +0 -0
  185. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/login_success_event.py +0 -0
  186. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/logout_event.py +0 -0
  187. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/oidc_authorization_request_event.py +0 -0
  188. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/switch_user_event.py +0 -0
  189. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event/token_deauthenticated_event.py +0 -0
  190. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/__init__.py +0 -0
  191. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/cleared_cookie.py +0 -0
  192. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/event_listener/oidc_back_channel_logout_listener.py +0 -0
  193. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/__init__.py +0 -0
  194. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/expired_login_link_error.py +0 -0
  195. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/impersonation_error.py +0 -0
  196. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/invalid_access_token_error.py +0 -0
  197. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/invalid_csrf_token_error.py +0 -0
  198. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/invalid_login_link_authentication_error.py +0 -0
  199. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/invalid_login_link_error.py +0 -0
  200. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/invalid_login_link_error_interface.py +0 -0
  201. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/invalid_session_strategy_error.py +0 -0
  202. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/logout_error.py +0 -0
  203. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/missing_session_error.py +0 -0
  204. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/missing_state_bag_error.py +0 -0
  205. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/oidc_invalid_grant_error.py +0 -0
  206. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/oidc_session_ended_error.py +0 -0
  207. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/exception/unknown_firewall_error.py +0 -0
  208. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/__init__.py +0 -0
  209. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/_exception_answers.py +0 -0
  210. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/_re_authentication.py +0 -0
  211. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/_switch_load.py +0 -0
  212. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/_switch_request.py +0 -0
  213. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/_switch_uri.py +0 -0
  214. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/_user_refresh.py +0 -0
  215. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/exception_listener.py +0 -0
  216. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/firewall_listener_interface.py +0 -0
  217. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/refresh_user_result.py +0 -0
  218. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall/user_changed.py +0 -0
  219. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall_context_interface.py +0 -0
  220. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/firewall_map_interface.py +0 -0
  221. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/http_utils.py +0 -0
  222. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/impersonate/__init__.py +0 -0
  223. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/impersonate/impersonate_url_generator.py +0 -0
  224. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/impersonate/impersonation_form.py +0 -0
  225. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/impersonate/switch_user_config.py +0 -0
  226. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/impersonate/switch_user_config_lookup_interface.py +0 -0
  227. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/login_link/__init__.py +0 -0
  228. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/login_link/_presented_link.py +0 -0
  229. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/login_link/login_link_handler_interface.py +0 -0
  230. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/logout/__init__.py +0 -0
  231. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/logout/logout_form.py +0 -0
  232. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/logout/logout_url_generator.py +0 -0
  233. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/__init__.py +0 -0
  234. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/access_token_type/__init__.py +0 -0
  235. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/access_token_type/access_token_type_interface.py +0 -0
  236. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/__init__.py +0 -0
  237. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/client_authentication/client_authentication_interface.py +0 -0
  238. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oauth2/jws_algorithms.py +0 -0
  239. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/__init__.py +0 -0
  240. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_back_channel_logout.py +0 -0
  241. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_client_interface.py +0 -0
  242. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_ended_sessions.py +0 -0
  243. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_id_token.py +0 -0
  244. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_logout_token.py +0 -0
  245. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_signature_verifier.py +0 -0
  246. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/oidc/oidc_token_refresher.py +0 -0
  247. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/parked_session.py +0 -0
  248. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/py.typed +0 -0
  249. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/rate_limiter/__init__.py +0 -0
  250. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/__init__.py +0 -0
  251. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/_signature_digest.py +0 -0
  252. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/remember_me_cookie.py +0 -0
  253. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/remember_me/remember_me_handler_interface.py +0 -0
  254. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/resolver/__init__.py +0 -0
  255. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/resolver/csrf_token_checker.py +0 -0
  256. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/resolver/is_granted_checker.py +0 -0
  257. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/resolver/security_token_resolver.py +0 -0
  258. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/resolver/user_value_resolver.py +0 -0
  259. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/security_events.py +0 -0
  260. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/__init__.py +0 -0
  261. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/session/session_authentication_strategy_interface.py +0 -0
  262. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/util/__init__.py +0 -0
  263. {xtr_security_http-6.8.1 → xtr_security_http-7.0.0}/src/xtr_security_http/util/target_path.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xtr-security-http
3
- Version: 6.8.1
3
+ Version: 7.0.0
4
4
  Summary: The HTTP edge of xtr security: firewalls, authenticators, bearer access tokens and the request surface.
5
5
  Keywords: security,authentication,firewall,fastapi,oauth2
6
6
  Author: Xterr
@@ -9,31 +9,26 @@ License-Expression: MIT
9
9
  License-File: LICENSE
10
10
  Classifier: Development Status :: 3 - Alpha
11
11
  Classifier: Intended Audience :: Developers
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
12
  Classifier: Programming Language :: Python :: 3.14
16
13
  Classifier: Typing :: Typed
17
- Requires-Dist: xtr-security-core>=6.0,<7
18
- Requires-Dist: xtr-security-csrf>=6.0,<7
19
- Requires-Dist: xtr-http-kernel>=6.0,<7
20
- Requires-Dist: xtr-http-foundation>=6.0,<7
21
- Requires-Dist: xtr-http-message-contracts>=6.0,<7
22
- Requires-Dist: xtr-http-client-contracts>=6.0,<7
23
- Requires-Dist: xtr-cache-contracts>=6.0,<7
24
- Requires-Dist: xtr-dependency-injection>=6.0,<7
25
- Requires-Dist: xtr-event-dispatcher>=6.0,<7
26
- Requires-Dist: xtr-event-dispatcher-contracts>=6.0,<7
27
- Requires-Dist: xtr-clock>=6.0,<7
28
- Requires-Dist: xtr-logging-contracts>=6.0,<7
29
- Requires-Dist: xtr-password-hasher>=6.0,<7
30
- Requires-Dist: xtr-rate-limiter>=6.0,<7
14
+ Requires-Dist: xtr-security-core>=7.0,<8
15
+ Requires-Dist: xtr-security-csrf>=7.0,<8
16
+ Requires-Dist: xtr-http-kernel>=7.0,<8
17
+ Requires-Dist: xtr-http-foundation>=7.0,<8
18
+ Requires-Dist: xtr-http-message-contracts>=7.0,<8
19
+ Requires-Dist: xtr-http-client-contracts>=7.0,<8
20
+ Requires-Dist: xtr-cache-contracts>=7.0,<8
21
+ Requires-Dist: xtr-dependency-injection>=7.0,<8
22
+ Requires-Dist: xtr-event-dispatcher>=7.0,<8
23
+ Requires-Dist: xtr-event-dispatcher-contracts>=7.0,<8
24
+ Requires-Dist: xtr-clock>=7.0,<8
25
+ Requires-Dist: xtr-logging-contracts>=7.0,<8
26
+ Requires-Dist: xtr-password-hasher>=7.0,<8
27
+ Requires-Dist: xtr-rate-limiter>=7.0,<8
31
28
  Requires-Dist: fastapi>=0.143.1
32
- Requires-Dist: starlette>=1.3.1
33
- Requires-Dist: anyio>=4.0
34
- Requires-Dist: typing-extensions>=4.12
29
+ Requires-Dist: starlette>=1.6
35
30
  Requires-Dist: joserfc>=1.7 ; extra == 'oidc'
36
- Requires-Python: >=3.11
31
+ Requires-Python: >=3.14.4
37
32
  Provides-Extra: oidc
38
33
  Description-Content-Type: text/markdown
39
34
 
@@ -43,7 +38,7 @@ Description-Content-Type: text/markdown
43
38
 
44
39
  **The HTTP edge of security: firewalls, authenticators, bearer access tokens and the request surface.**
45
40
 
46
- <img alt="python 3.11+" src="https://img.shields.io/badge/python-%E2%89%A5%203.11-3776AB?logo=python&logoColor=white">
41
+ <img alt="python 3.14+" src="https://img.shields.io/badge/python-%E2%89%A5%203.14-3776AB?logo=python&logoColor=white">
47
42
  <img alt="typed" src="https://img.shields.io/badge/typed-ty%20%2B%20basedpyright-1f6feb">
48
43
  <img alt="license MIT" src="https://img.shields.io/badge/license-MIT-blue">
49
44
 
@@ -86,7 +81,7 @@ uv add xtr-security-http # firewalls, authenticators, access tok
86
81
  uv add "xtr-security-http[oidc]" # + verifying a third-party OIDC issuer's tokens
87
82
  ```
88
83
 
89
- Requires Python 3.11+. The web framework and the security core come with the package; the `oidc`
84
+ Requires Python 3.14.4+. The web framework and the security core come with the package; the `oidc`
90
85
  extra adds [joserfc](https://jose.authlib.org/) and [httpx](https://www.python-httpx.org/) for
91
86
  verifying and discovering an issuer's keys, and for verifying the signed introspection responses
92
87
  the OAuth2 handler can ask for.
@@ -437,7 +432,9 @@ regexps of `HttpUtils`, when configured, still weigh whichever target wins.
437
432
  **`CustomAuthenticationSuccessHandler(handler, options, firewall_name)`** and
438
433
  **`CustomAuthenticationFailureHandler(handler, options)`** are the seams for an application's own
439
434
  handlers, handing them the wiring's options — and the firewall's name, for a success handler that
440
- keys by one — through duck-typed setters.
435
+ keys by one — through duck-typed setters. Each wrapper sets them once, on a shallow copy of the
436
+ handler of its own, so two firewalls sharing one handler never answer with each other's options;
437
+ a handler's setters must rebind what they set rather than change state the copies share.
441
438
 
442
439
  **`AuthenticationUtils(request)`** reads what the last login attempt left, for the page that
443
440
  renders the form again: `get_last_authentication_error(clear_session=True)`, `get_last_username()`
@@ -479,9 +476,13 @@ names and stages every cookie; its options default to the name `REMEMBERME`, a o
479
476
  presented again raises the core `CookieTheftError`), skips the rotation within a 60-second
480
477
  window so concurrent requests do not spend one another, and binds a digest of the user's
481
478
  signature properties — the password by default, properties the user does not expose skipped —
482
- so a changed password retires the series. A verifier accepts a value the store no longer holds
483
- exactly; the provider itself is used when it implements the verifier's contract. Clearing drops
484
- the series the request's own cookie names.
479
+ so a changed password retires the series. The rotation is conditional — `update_token(series,
480
+ expected_value, token_value, last_used) -> bool` stores the new value only over the one
481
+ presented — so of two requests rotating at once one wins; the other stages no cookie and
482
+ passes when the stored value was rotated within the window, and raises `CookieTheftError`
483
+ otherwise. A verifier accepts a value the store no longer holds exactly, and is told of a
484
+ rotation only once the store took it; the provider itself is used when it implements the
485
+ verifier's contract. Clearing drops the series the request's own cookie names.
485
486
 
486
487
  Around the handlers: **`CheckRememberMeConditionsListener(options, logger)`** enables the passport's
487
488
  `RememberMeBadge` on a successful login when the application always wants the cookie or the request
@@ -581,6 +582,8 @@ distinguished name when the email is not there — `emailAddress` also answers i
581
582
  spelling `1.2.840.113549.1.9.1`, a custom identifier is matched anywhere in the name, and the
582
583
  value read out of a name is trimmed. A request carrying neither key, or a name without the
583
584
  identifier, is refused.
585
+ Both read the request's server parameters, which an ASGI server served through the HTTP kernel
586
+ never fills with these keys: there, neither signs anyone in.
584
587
 
585
588
  ### Listeners
586
589
 
@@ -608,18 +611,21 @@ event, on the application's main dispatcher.
608
611
 
609
612
  **Login throttling.** The throttling listener runs first of all on the passport check (priority
610
613
  2080, above the provider listener's 2048), and answers through one request limiter —
611
- `RequestRateLimiterInterface` from [xtr-http-foundation](../xtr-http-foundation), a peekable one
612
- preferred. The limiter builds its own keys, and the default one —
614
+ `RequestRateLimiterInterface` from [xtr-http-foundation](../xtr-http-foundation). The limiter
615
+ builds its own keys, and the default one —
613
616
  `DefaultLoginRateLimiter` in `rate_limiter/`, over the [xtr-rate-limiter](../xtr-rate-limiter)
614
617
  factories — counts a login twice: under the address it came from (a global limit, bounding how
615
618
  many accounts one client may sweep) and under the account it named from that address (a local
616
619
  limit). Both keys are eight-character HMAC-SHA256 prefixes over a non-empty application secret,
617
620
  so a store shared across servers keeps no readable account or address; a successful login forgets
618
621
  the local count only — the global one must survive the successful login of any one account. A
619
- peekable limiter is looked ahead at on the check (nothing spent), counted on a failure; a
620
- non-peekable one is counted on the check and still forgotten on a success. An attempt over the
622
+ login is counted on the passport check, before its password is checked, so a burst of concurrent
623
+ attempts past the limit is refused without a single password verified; a failure counts nothing
624
+ more. An attempt over the
621
625
  limit is refused with the core `TooManyLoginAttemptsAuthenticationError`, carrying the minutes to
622
- wait, and announced as a `RateLimitExceededEvent` on the dispatcher the listener was given.
626
+ wait, and announced as a `RateLimitExceededEvent` on the dispatcher the listener was given. The
627
+ limiter keys the address on the connection's client (`scope["client"]`): behind a reverse proxy,
628
+ have the server trust the proxy's forwarded headers, or every login counts under the proxy's address.
623
629
 
624
630
  **The dummy-hash timing guard.** When a password passport names an *unknown* user,
625
631
  `CheckCredentialsListener` still verifies against a dummy hash, so the timing of a bad username
@@ -687,6 +693,9 @@ The session is built from the request here and nowhere else, reading its ID from
687
693
  Every later step of the request reaches that same session, so the cookie a login's rotation, a
688
694
  logout's invalidation and the save stage is always this one.
689
695
  Any step reads it with **`parked_session_of(request)`** — `None` for a request no stateful chain ran.
696
+ An application's route reads it the same way, from the request message carrying the request's
697
+ state (`SecurityRequestAttributes.STATE_BAG` set to the ASGI scope's `"state"`) — see the
698
+ [xtr-security](../xtr-security#reading-the-session-in-a-route) README.
690
699
 
691
700
  The response half, **`on_response(response_event)`** — registered beside the chain on the
692
701
  kernel's response event — writes the token back: what the request authenticated is stored under
@@ -1804,6 +1813,11 @@ authenticators, the access map, the exception listener, the `Firewall` subscribe
1804
1813
  firewalls written as configuration. See that package's
1805
1814
  [Use in an application](../xtr-security#use-in-an-application).
1806
1815
 
1816
+ ## Upgrading
1817
+
1818
+ What changes for an application moving to 7.0, and how to keep the old behaviour where that is
1819
+ still possible: [Upgrading to 7.0](../../UPGRADING.md#xtr-security-http).
1820
+
1807
1821
  ## Development
1808
1822
 
1809
1823
  Developed in the [python-xtr](https://github.com/xterr/python-xtr) monorepo, under
@@ -4,7 +4,7 @@
4
4
 
5
5
  **The HTTP edge of security: firewalls, authenticators, bearer access tokens and the request surface.**
6
6
 
7
- <img alt="python 3.11+" src="https://img.shields.io/badge/python-%E2%89%A5%203.11-3776AB?logo=python&logoColor=white">
7
+ <img alt="python 3.14+" src="https://img.shields.io/badge/python-%E2%89%A5%203.14-3776AB?logo=python&logoColor=white">
8
8
  <img alt="typed" src="https://img.shields.io/badge/typed-ty%20%2B%20basedpyright-1f6feb">
9
9
  <img alt="license MIT" src="https://img.shields.io/badge/license-MIT-blue">
10
10
 
@@ -47,7 +47,7 @@ uv add xtr-security-http # firewalls, authenticators, access tok
47
47
  uv add "xtr-security-http[oidc]" # + verifying a third-party OIDC issuer's tokens
48
48
  ```
49
49
 
50
- Requires Python 3.11+. The web framework and the security core come with the package; the `oidc`
50
+ Requires Python 3.14.4+. The web framework and the security core come with the package; the `oidc`
51
51
  extra adds [joserfc](https://jose.authlib.org/) and [httpx](https://www.python-httpx.org/) for
52
52
  verifying and discovering an issuer's keys, and for verifying the signed introspection responses
53
53
  the OAuth2 handler can ask for.
@@ -398,7 +398,9 @@ regexps of `HttpUtils`, when configured, still weigh whichever target wins.
398
398
  **`CustomAuthenticationSuccessHandler(handler, options, firewall_name)`** and
399
399
  **`CustomAuthenticationFailureHandler(handler, options)`** are the seams for an application's own
400
400
  handlers, handing them the wiring's options — and the firewall's name, for a success handler that
401
- keys by one — through duck-typed setters.
401
+ keys by one — through duck-typed setters. Each wrapper sets them once, on a shallow copy of the
402
+ handler of its own, so two firewalls sharing one handler never answer with each other's options;
403
+ a handler's setters must rebind what they set rather than change state the copies share.
402
404
 
403
405
  **`AuthenticationUtils(request)`** reads what the last login attempt left, for the page that
404
406
  renders the form again: `get_last_authentication_error(clear_session=True)`, `get_last_username()`
@@ -440,9 +442,13 @@ names and stages every cookie; its options default to the name `REMEMBERME`, a o
440
442
  presented again raises the core `CookieTheftError`), skips the rotation within a 60-second
441
443
  window so concurrent requests do not spend one another, and binds a digest of the user's
442
444
  signature properties — the password by default, properties the user does not expose skipped —
443
- so a changed password retires the series. A verifier accepts a value the store no longer holds
444
- exactly; the provider itself is used when it implements the verifier's contract. Clearing drops
445
- the series the request's own cookie names.
445
+ so a changed password retires the series. The rotation is conditional — `update_token(series,
446
+ expected_value, token_value, last_used) -> bool` stores the new value only over the one
447
+ presented — so of two requests rotating at once one wins; the other stages no cookie and
448
+ passes when the stored value was rotated within the window, and raises `CookieTheftError`
449
+ otherwise. A verifier accepts a value the store no longer holds exactly, and is told of a
450
+ rotation only once the store took it; the provider itself is used when it implements the
451
+ verifier's contract. Clearing drops the series the request's own cookie names.
446
452
 
447
453
  Around the handlers: **`CheckRememberMeConditionsListener(options, logger)`** enables the passport's
448
454
  `RememberMeBadge` on a successful login when the application always wants the cookie or the request
@@ -542,6 +548,8 @@ distinguished name when the email is not there — `emailAddress` also answers i
542
548
  spelling `1.2.840.113549.1.9.1`, a custom identifier is matched anywhere in the name, and the
543
549
  value read out of a name is trimmed. A request carrying neither key, or a name without the
544
550
  identifier, is refused.
551
+ Both read the request's server parameters, which an ASGI server served through the HTTP kernel
552
+ never fills with these keys: there, neither signs anyone in.
545
553
 
546
554
  ### Listeners
547
555
 
@@ -569,18 +577,21 @@ event, on the application's main dispatcher.
569
577
 
570
578
  **Login throttling.** The throttling listener runs first of all on the passport check (priority
571
579
  2080, above the provider listener's 2048), and answers through one request limiter —
572
- `RequestRateLimiterInterface` from [xtr-http-foundation](../xtr-http-foundation), a peekable one
573
- preferred. The limiter builds its own keys, and the default one —
580
+ `RequestRateLimiterInterface` from [xtr-http-foundation](../xtr-http-foundation). The limiter
581
+ builds its own keys, and the default one —
574
582
  `DefaultLoginRateLimiter` in `rate_limiter/`, over the [xtr-rate-limiter](../xtr-rate-limiter)
575
583
  factories — counts a login twice: under the address it came from (a global limit, bounding how
576
584
  many accounts one client may sweep) and under the account it named from that address (a local
577
585
  limit). Both keys are eight-character HMAC-SHA256 prefixes over a non-empty application secret,
578
586
  so a store shared across servers keeps no readable account or address; a successful login forgets
579
587
  the local count only — the global one must survive the successful login of any one account. A
580
- peekable limiter is looked ahead at on the check (nothing spent), counted on a failure; a
581
- non-peekable one is counted on the check and still forgotten on a success. An attempt over the
588
+ login is counted on the passport check, before its password is checked, so a burst of concurrent
589
+ attempts past the limit is refused without a single password verified; a failure counts nothing
590
+ more. An attempt over the
582
591
  limit is refused with the core `TooManyLoginAttemptsAuthenticationError`, carrying the minutes to
583
- wait, and announced as a `RateLimitExceededEvent` on the dispatcher the listener was given.
592
+ wait, and announced as a `RateLimitExceededEvent` on the dispatcher the listener was given. The
593
+ limiter keys the address on the connection's client (`scope["client"]`): behind a reverse proxy,
594
+ have the server trust the proxy's forwarded headers, or every login counts under the proxy's address.
584
595
 
585
596
  **The dummy-hash timing guard.** When a password passport names an *unknown* user,
586
597
  `CheckCredentialsListener` still verifies against a dummy hash, so the timing of a bad username
@@ -648,6 +659,9 @@ The session is built from the request here and nowhere else, reading its ID from
648
659
  Every later step of the request reaches that same session, so the cookie a login's rotation, a
649
660
  logout's invalidation and the save stage is always this one.
650
661
  Any step reads it with **`parked_session_of(request)`** — `None` for a request no stateful chain ran.
662
+ An application's route reads it the same way, from the request message carrying the request's
663
+ state (`SecurityRequestAttributes.STATE_BAG` set to the ASGI scope's `"state"`) — see the
664
+ [xtr-security](../xtr-security#reading-the-session-in-a-route) README.
651
665
 
652
666
  The response half, **`on_response(response_event)`** — registered beside the chain on the
653
667
  kernel's response event — writes the token back: what the request authenticated is stored under
@@ -1765,6 +1779,11 @@ authenticators, the access map, the exception listener, the `Firewall` subscribe
1765
1779
  firewalls written as configuration. See that package's
1766
1780
  [Use in an application](../xtr-security#use-in-an-application).
1767
1781
 
1782
+ ## Upgrading
1783
+
1784
+ What changes for an application moving to 7.0, and how to keep the old behaviour where that is
1785
+ still possible: [Upgrading to 7.0](../../UPGRADING.md#xtr-security-http).
1786
+
1768
1787
  ## Development
1769
1788
 
1770
1789
  Developed in the [python-xtr](https://github.com/xterr/python-xtr) monorepo, under
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "xtr-security-http"
3
- version = "6.8.1"
3
+ version = "7.0.0"
4
4
  description = "The HTTP edge of xtr security: firewalls, authenticators, bearer access tokens and the request surface."
5
5
  readme = "README.md"
6
- requires-python = ">=3.11"
6
+ requires-python = ">=3.14.4"
7
7
  license = "MIT"
8
8
  license-files = ["LICENSE"]
9
9
  keywords = [
@@ -16,31 +16,26 @@ keywords = [
16
16
  classifiers = [
17
17
  "Development Status :: 3 - Alpha",
18
18
  "Intended Audience :: Developers",
19
- "Programming Language :: Python :: 3.11",
20
- "Programming Language :: Python :: 3.12",
21
- "Programming Language :: Python :: 3.13",
22
19
  "Programming Language :: Python :: 3.14",
23
20
  "Typing :: Typed",
24
21
  ]
25
22
  dependencies = [
26
- "xtr-security-core>=6.0,<7",
27
- "xtr-security-csrf>=6.0,<7",
28
- "xtr-http-kernel>=6.0,<7",
29
- "xtr-http-foundation>=6.0,<7",
30
- "xtr-http-message-contracts>=6.0,<7",
31
- "xtr-http-client-contracts>=6.0,<7",
32
- "xtr-cache-contracts>=6.0,<7",
33
- "xtr-dependency-injection>=6.0,<7",
34
- "xtr-event-dispatcher>=6.0,<7",
35
- "xtr-event-dispatcher-contracts>=6.0,<7",
36
- "xtr-clock>=6.0,<7",
37
- "xtr-logging-contracts>=6.0,<7",
38
- "xtr-password-hasher>=6.0,<7",
39
- "xtr-rate-limiter>=6.0,<7",
23
+ "xtr-security-core>=7.0,<8",
24
+ "xtr-security-csrf>=7.0,<8",
25
+ "xtr-http-kernel>=7.0,<8",
26
+ "xtr-http-foundation>=7.0,<8",
27
+ "xtr-http-message-contracts>=7.0,<8",
28
+ "xtr-http-client-contracts>=7.0,<8",
29
+ "xtr-cache-contracts>=7.0,<8",
30
+ "xtr-dependency-injection>=7.0,<8",
31
+ "xtr-event-dispatcher>=7.0,<8",
32
+ "xtr-event-dispatcher-contracts>=7.0,<8",
33
+ "xtr-clock>=7.0,<8",
34
+ "xtr-logging-contracts>=7.0,<8",
35
+ "xtr-password-hasher>=7.0,<8",
36
+ "xtr-rate-limiter>=7.0,<8",
40
37
  "fastapi>=0.143.1",
41
- "starlette>=1.3.1",
42
- "anyio>=4.0",
43
- "typing-extensions>=4.12",
38
+ "starlette>=1.6",
44
39
  ]
45
40
 
46
41
  [[project.authors]]
@@ -52,17 +47,17 @@ oidc = ["joserfc>=1.7"]
52
47
 
53
48
  [dependency-groups]
54
49
  dev = [
55
- "basedpyright>=1.21",
56
- "ruff>=0.8",
57
- "pytest>=8",
58
- "pytest-cov>=5",
59
- "anyio>=4.0",
50
+ "basedpyright>=1.31.7",
51
+ "ruff>=0.14.7",
52
+ "pytest>=8.4",
53
+ "pytest-cov>=7.1",
54
+ "anyio>=4.10",
60
55
  "ty>=0.0.83",
61
56
  "joserfc>=1.7",
62
- "xtr-http-message>=6.0,<7",
63
- "xtr-http-client>=6.0,<7",
64
- "xtr-cache>=6.0,<7",
65
- "xtr-console>=6.0,<7",
57
+ "xtr-http-message>=7.0,<8",
58
+ "xtr-http-client>=7.0,<8",
59
+ "xtr-cache>=7.0,<8",
60
+ "xtr-console>=7.0,<8",
66
61
  ]
67
62
 
68
63
  [build-system]
@@ -71,7 +66,7 @@ build-backend = "uv_build"
71
66
 
72
67
  [tool.basedpyright]
73
68
  typeCheckingMode = "all"
74
- pythonVersion = "3.11"
69
+ pythonVersion = "3.14"
75
70
  pythonPlatform = "All"
76
71
  include = [
77
72
  "src",
@@ -101,7 +96,7 @@ extraPaths = ["."]
101
96
  reportPrivateUsage = "none"
102
97
 
103
98
  [tool.ruff]
104
- target-version = "py311"
99
+ target-version = "py314"
105
100
  line-length = 100
106
101
  src = [
107
102
  "src",
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "xtr-security-http"
3
- version = "6.8.1"
3
+ version = "7.0.0"
4
4
  description = "The HTTP edge of xtr security: firewalls, authenticators, bearer access tokens and the request surface."
5
5
  readme = "README.md"
6
- requires-python = ">=3.11"
6
+ requires-python = ">=3.14.4"
7
7
  license = "MIT"
8
8
  license-files = ["LICENSE"]
9
9
  authors = [
@@ -13,36 +13,31 @@ keywords = ["security", "authentication", "firewall", "fastapi", "oauth2"]
13
13
  classifiers = [
14
14
  "Development Status :: 3 - Alpha",
15
15
  "Intended Audience :: Developers",
16
- "Programming Language :: Python :: 3.11",
17
- "Programming Language :: Python :: 3.12",
18
- "Programming Language :: Python :: 3.13",
19
16
  "Programming Language :: Python :: 3.14",
20
17
  "Typing :: Typed",
21
18
  ]
22
19
  dependencies = [
23
- "xtr-security-core>=6.0,<7",
24
- "xtr-security-csrf>=6.0,<7",
25
- "xtr-http-kernel>=6.0,<7",
26
- "xtr-http-foundation>=6.0,<7",
27
- "xtr-http-message-contracts>=6.0,<7",
20
+ "xtr-security-core>=7.0,<8",
21
+ "xtr-security-csrf>=7.0,<8",
22
+ "xtr-http-kernel>=7.0,<8",
23
+ "xtr-http-foundation>=7.0,<8",
24
+ "xtr-http-message-contracts>=7.0,<8",
28
25
  # The client interface the introspection endpoint is reached through; the client
29
26
  # itself is installed by the application that introspects.
30
- "xtr-http-client-contracts>=6.0,<7",
27
+ "xtr-http-client-contracts>=7.0,<8",
31
28
  # The cache contract the introspection responses are cached under; the pool
32
29
  # behind it is the application's choice.
33
- "xtr-cache-contracts>=6.0,<7",
34
- "xtr-dependency-injection>=6.0,<7",
35
- "xtr-event-dispatcher>=6.0,<7",
36
- "xtr-event-dispatcher-contracts>=6.0,<7",
37
- "xtr-clock>=6.0,<7",
38
- "xtr-logging-contracts>=6.0,<7",
39
- "xtr-password-hasher>=6.0,<7",
40
- "xtr-rate-limiter>=6.0,<7",
30
+ "xtr-cache-contracts>=7.0,<8",
31
+ "xtr-dependency-injection>=7.0,<8",
32
+ "xtr-event-dispatcher>=7.0,<8",
33
+ "xtr-event-dispatcher-contracts>=7.0,<8",
34
+ "xtr-clock>=7.0,<8",
35
+ "xtr-logging-contracts>=7.0,<8",
36
+ "xtr-password-hasher>=7.0,<8",
37
+ "xtr-rate-limiter>=7.0,<8",
41
38
  # The floors xtr-http-kernel serves on; see its pyproject.toml for why.
42
39
  "fastapi>=0.143.1",
43
- "starlette>=1.3.1",
44
- "anyio>=4.0",
45
- "typing-extensions>=4.12",
40
+ "starlette>=1.6",
46
41
  ]
47
42
 
48
43
  [project.optional-dependencies]
@@ -52,20 +47,20 @@ oidc = [
52
47
 
53
48
  [dependency-groups]
54
49
  dev = [
55
- "basedpyright>=1.21",
56
- "ruff>=0.8",
57
- "pytest>=8",
58
- "pytest-cov>=5",
59
- "anyio>=4.0",
50
+ "basedpyright>=1.31.7",
51
+ "ruff>=0.14.7",
52
+ "pytest>=8.4",
53
+ "pytest-cov>=7.1",
54
+ "anyio>=4.10",
60
55
  "ty>=0.0.83",
61
56
  "joserfc>=1.7",
62
57
  # The tests match real requests, so they build the request messages.
63
- "xtr-http-message>=6.0,<7",
58
+ "xtr-http-message>=7.0,<8",
64
59
  # The tests drive the introspection endpoint through the scripted client and
65
60
  # cache the responses in the in-memory pool.
66
- "xtr-http-client>=6.0,<7",
67
- "xtr-cache>=6.0,<7",
68
- "xtr-console>=6.0,<7",
61
+ "xtr-http-client>=7.0,<8",
62
+ "xtr-cache>=7.0,<8",
63
+ "xtr-console>=7.0,<8",
69
64
  ]
70
65
 
71
66
  [build-system]
@@ -74,7 +69,7 @@ build-backend = "uv_build"
74
69
 
75
70
  [tool.basedpyright]
76
71
  typeCheckingMode = "all"
77
- pythonVersion = "3.11"
72
+ pythonVersion = "3.14"
78
73
  pythonPlatform = "All"
79
74
  include = ["src", "tests"]
80
75
  exclude = ["**/__pycache__", "**/.venv", "**/build", "**/dist", ".tmp"]
@@ -104,7 +99,7 @@ extraPaths = ["."]
104
99
  reportPrivateUsage = "none"
105
100
 
106
101
  [tool.ruff]
107
- target-version = "py311"
102
+ target-version = "py314"
108
103
  line-length = 100
109
104
  src = ["src", "tests"]
110
105
 
@@ -12,11 +12,14 @@ from __future__ import annotations
12
12
 
13
13
  from typing import Final
14
14
 
15
- __all__ = ["is_form_content_type"]
15
+ __all__ = ["URLENCODED_FORM", "is_form_content_type"]
16
16
 
17
17
  #: The media types a submitted form is encoded in.
18
18
  _FORM_MEDIA_TYPES: Final = frozenset({"application/x-www-form-urlencoded", "multipart/form-data"})
19
19
 
20
+ #: The one encoding whose body is small enough to read before it is asked for.
21
+ URLENCODED_FORM: Final = frozenset({"application/x-www-form-urlencoded"})
22
+
20
23
 
21
24
  def is_form_content_type(
22
25
  content_type: str,
@@ -0,0 +1,18 @@
1
+ """Turning an error into text, whatever the error does."""
2
+
3
+ from __future__ import annotations
4
+
5
+ __all__ = ["safe_str"]
6
+
7
+
8
+ def safe_str(error: BaseException) -> str:
9
+ """Return ``str(error)``, or a stand-in naming its class when ``__str__`` raises.
10
+
11
+ A token handler turns any failure into a refused token; a second exception
12
+ raised while describing the failure would escape as a crash instead.
13
+ """
14
+ try:
15
+ return str(error)
16
+ except Exception: # noqa: BLE001 — whatever it raises, the failure is still reported
17
+ kind = type(error)
18
+ return f"[unprintable {kind.__module__}.{kind.__qualname__}]"
@@ -2,9 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import TYPE_CHECKING, final
6
-
7
- from typing_extensions import override
5
+ from typing import TYPE_CHECKING, final, override
8
6
 
9
7
  from .access_map_interface import AccessMapInterface
10
8
 
@@ -2,9 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import TYPE_CHECKING, final
5
+ from typing import TYPE_CHECKING, final, override
6
6
 
7
- from typing_extensions import override
8
7
  from xtr_security_core.exception import InvalidArgumentError
9
8
 
10
9
  from .access_token_extractor_interface import AccessTokenExtractorInterface
@@ -3,9 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from collections.abc import Mapping
6
- from typing import TYPE_CHECKING, Final, cast, final
7
-
8
- from typing_extensions import override
6
+ from typing import TYPE_CHECKING, Final, cast, final, override
9
7
 
10
8
  from xtr_security_http._form_content_type import is_form_content_type
11
9
 
@@ -2,9 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import TYPE_CHECKING, final
6
-
7
- from typing_extensions import override
5
+ from typing import TYPE_CHECKING, final, override
8
6
 
9
7
  from .access_token_extractor_interface import AccessTokenExtractorInterface
10
8
 
@@ -10,6 +10,7 @@ from xtr_clock import SystemClock
10
10
  from xtr_logging_contracts import EXCEPTION_KEY, NullLogger
11
11
  from xtr_security_core.exception import InvalidArgumentError
12
12
 
13
+ from xtr_security_http._text import safe_str
13
14
  from xtr_security_http.authenticator.passport.badge.user_badge import UserBadge
14
15
  from xtr_security_http.exception.invalid_access_token_error import InvalidAccessTokenError
15
16
 
@@ -296,7 +297,7 @@ class Oauth2TokenHandler:
296
297
  except Exception as error:
297
298
  self._log_failure(error)
298
299
  raise InvalidAccessTokenError(
299
- f"An error occurred on the authorization server: {error}",
300
+ f"An error occurred on the authorization server: {safe_str(error)}",
300
301
  ) from error
301
302
 
302
303
  async def _badge_from(self, access_token: str) -> UserBadge:
@@ -457,7 +458,7 @@ class Oauth2TokenHandler:
457
458
  """Write the failure the authorization server's answer explains."""
458
459
  self._logger.error(
459
460
  "An error occurred on the authorization server.",
460
- {"error": str(error), EXCEPTION_KEY: error},
461
+ {"error": safe_str(error), EXCEPTION_KEY: error},
461
462
  )
462
463
 
463
464
 
@@ -6,6 +6,7 @@ from typing import TYPE_CHECKING, final
6
6
 
7
7
  from xtr_logging_contracts import EXCEPTION_KEY, NullLogger
8
8
 
9
+ from xtr_security_http._text import safe_str
9
10
  from xtr_security_http.authenticator.fallback_user_loader import FallbackUserLoader
10
11
  from xtr_security_http.authenticator.passport.badge.user_badge import UserBadge
11
12
  from xtr_security_http.exception.invalid_access_token_error import InvalidAccessTokenError
@@ -135,7 +136,7 @@ class OidcUserInfoTokenHandler(OidcTrait):
135
136
  except Exception as error:
136
137
  self._log_configuration_failure(error)
137
138
  raise InvalidAccessTokenError(
138
- f"An error occurred while requesting the OIDC configuration: {error}",
139
+ f"An error occurred while requesting the OIDC configuration: {safe_str(error)}",
139
140
  ) from error
140
141
  try:
141
142
  claims = await self._claims(access_token, endpoint)
@@ -148,7 +149,7 @@ class OidcUserInfoTokenHandler(OidcTrait):
148
149
  except Exception as error:
149
150
  self._log_server_failure(error)
150
151
  raise InvalidAccessTokenError(
151
- f"An error occurred on the OIDC server: {error}",
152
+ f"An error occurred on the OIDC server: {safe_str(error)}",
152
153
  ) from error
153
154
 
154
155
  async def _claims(self, access_token: str, endpoint: str) -> dict[str, object]:
@@ -207,12 +208,12 @@ class OidcUserInfoTokenHandler(OidcTrait):
207
208
  """Write the failure the discovery read explains."""
208
209
  self._logger.error(
209
210
  "An error occurred while requesting the OIDC configuration.",
210
- {"error": str(error), EXCEPTION_KEY: error},
211
+ {"error": safe_str(error), EXCEPTION_KEY: error},
211
212
  )
212
213
 
213
214
  def _log_server_failure(self, error: Exception) -> None:
214
215
  """Write the failure the OIDC server's answer explains."""
215
216
  self._logger.error(
216
217
  "An error occurred on the OIDC server.",
217
- {"error": str(error), EXCEPTION_KEY: error},
218
+ {"error": safe_str(error), EXCEPTION_KEY: error},
218
219
  )
@@ -2,9 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import TYPE_CHECKING, final
6
-
7
- from typing_extensions import override
5
+ from typing import TYPE_CHECKING, final, override
8
6
 
9
7
  from .access_token_extractor_interface import AccessTokenExtractorInterface
10
8