microsoft-agents-hosting-core 1.10.0.dev4__tar.gz → 1.10.0.dev5__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 (206) hide show
  1. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/PKG-INFO +2 -2
  2. microsoft_agents_hosting_core-1.10.0.dev5/VERSION.txt +1 -0
  3. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/connection_settings_base.py +93 -0
  4. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/jwt/__init__.py +4 -0
  5. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/jwt/_authorize_request.py +31 -4
  6. microsoft_agents_hosting_core-1.10.0.dev5/microsoft_agents/hosting/core/authorization/jwt/jwt_connection_settings.py +40 -0
  7. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/jwt/jwt_token_validator.py +65 -29
  8. microsoft_agents_hosting_core-1.10.0.dev5/microsoft_agents/hosting/core/authorization/jwt/token_validation_configuration.py +75 -0
  9. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents_hosting_core.egg-info/PKG-INFO +2 -2
  10. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents_hosting_core.egg-info/SOURCES.txt +2 -0
  11. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents_hosting_core.egg-info/requires.txt +1 -1
  12. microsoft_agents_hosting_core-1.10.0.dev4/VERSION.txt +0 -1
  13. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/LICENSE +0 -0
  14. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/MANIFEST.in +0 -0
  15. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/__init__.py +0 -0
  16. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_http_adapter_base.py +0 -0
  17. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_oauth/__init__.py +0 -0
  18. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_oauth/_flow_state.py +0 -0
  19. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_oauth/_flow_storage_client.py +0 -0
  20. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_oauth/_oauth_flow.py +0 -0
  21. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_utils/__init__.py +0 -0
  22. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_utils/_service_set.py +0 -0
  23. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/_utils/_turn_context_wrapper.py +0 -0
  24. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/activity_handler.py +0 -0
  25. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/agent.py +0 -0
  26. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/__init__.py +0 -0
  27. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/_routes/__init__.py +0 -0
  28. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/_routes/_route.py +0 -0
  29. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/_routes/_route_list.py +0 -0
  30. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/_routes/route_rank.py +0 -0
  31. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/_selector.py +0 -0
  32. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/_type_defs.py +0 -0
  33. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/_utils.py +0 -0
  34. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/adaptive_card/__init__.py +0 -0
  35. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/adaptive_card/_type_defs.py +0 -0
  36. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/adaptive_card/adaptive_card.py +0 -0
  37. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/adaptive_card/factory.py +0 -0
  38. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/adaptive_card/models.py +0 -0
  39. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/agent_application.py +0 -0
  40. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/app_error.py +0 -0
  41. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/app_options.py +0 -0
  42. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/attachment_downloader.py +0 -0
  43. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/input_file.py +0 -0
  44. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/m365_attachment_downloader.py +0 -0
  45. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/__init__.py +0 -0
  46. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/_handlers/__init__.py +0 -0
  47. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/_handlers/_authorization_handler.py +0 -0
  48. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/_handlers/_user_authorization.py +0 -0
  49. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/_handlers/agentic_user_authorization.py +0 -0
  50. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/_handlers/connector_user_authorization.py +0 -0
  51. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/_sign_in_response.py +0 -0
  52. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/_sign_in_state.py +0 -0
  53. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/auth_handler.py +0 -0
  54. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/authorization.py +0 -0
  55. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/telemetry/__init__.py +0 -0
  56. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/telemetry/constants.py +0 -0
  57. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/oauth/telemetry/spans.py +0 -0
  58. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/__init__.py +0 -0
  59. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/conversation.py +0 -0
  60. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/conversation_builder.py +0 -0
  61. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/conversation_reference_builder.py +0 -0
  62. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/create_conversation_options.py +0 -0
  63. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/proactive.py +0 -0
  64. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/proactive_options.py +0 -0
  65. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/telemetry/__init__.py +0 -0
  66. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/telemetry/_utils.py +0 -0
  67. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/telemetry/constants.py +0 -0
  68. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/proactive/telemetry/spans.py +0 -0
  69. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/query.py +0 -0
  70. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/state/__init__.py +0 -0
  71. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/state/conversation_state.py +0 -0
  72. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/state/state.py +0 -0
  73. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/state/temp_state.py +0 -0
  74. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/state/turn_state.py +0 -0
  75. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/streaming/__init__.py +0 -0
  76. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/streaming/citation.py +0 -0
  77. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/streaming/citation_util.py +0 -0
  78. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/streaming/streaming_response.py +0 -0
  79. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/telemetry/__init__.py +0 -0
  80. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/telemetry/constants.py +0 -0
  81. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/telemetry/metrics.py +0 -0
  82. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/telemetry/spans.py +0 -0
  83. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/app/typing_indicator.py +0 -0
  84. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/__init__.py +0 -0
  85. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/_entra_issuers.py +0 -0
  86. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/_helpers.py +0 -0
  87. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/_log_config.py +0 -0
  88. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/access_token_provider_base.py +0 -0
  89. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/agent_auth_configuration.py +0 -0
  90. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/anonymous_token_provider.py +0 -0
  91. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/auth_types.py +0 -0
  92. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/authentication_constants.py +0 -0
  93. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/claims_identity.py +0 -0
  94. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/connection_manager.py +0 -0
  95. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/connections.py +0 -0
  96. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/telemetry/__init__.py +0 -0
  97. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/telemetry/constants.py +0 -0
  98. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/telemetry/metrics.py +0 -0
  99. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/authorization/telemetry/spans.py +0 -0
  100. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/card_factory.py +0 -0
  101. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/channel_adapter.py +0 -0
  102. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/channel_api_handler_protocol.py +0 -0
  103. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/channel_service_adapter.py +0 -0
  104. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/channel_service_client_factory_base.py +0 -0
  105. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/__init__.py +0 -0
  106. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/agent_conversation_reference.py +0 -0
  107. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/channel_factory_protocol.py +0 -0
  108. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/channel_host_protocol.py +0 -0
  109. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/channel_info_protocol.py +0 -0
  110. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/channel_protocol.py +0 -0
  111. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/channels_configuration.py +0 -0
  112. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/configuration_channel_host.py +0 -0
  113. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/conversation_constants.py +0 -0
  114. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/conversation_id_factory.py +0 -0
  115. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/conversation_id_factory_options.py +0 -0
  116. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/conversation_id_factory_protocol.py +0 -0
  117. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/http_agent_channel.py +0 -0
  118. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/client/http_agent_channel_factory.py +0 -0
  119. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/__init__.py +0 -0
  120. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/_utils.py +0 -0
  121. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/agent_sign_in_base.py +0 -0
  122. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/attachments_base.py +0 -0
  123. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/client/__init__.py +0 -0
  124. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/client/_base_client.py +0 -0
  125. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/client/agent_sign_in.py +0 -0
  126. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/client/connector_client.py +0 -0
  127. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/client/user_token.py +0 -0
  128. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/client/user_token_client.py +0 -0
  129. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/connector_client_base.py +0 -0
  130. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/conversations_base.py +0 -0
  131. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/get_product_info.py +0 -0
  132. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/mcs/__init__.py +0 -0
  133. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/mcs/mcs_connector_client.py +0 -0
  134. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/teams/__init__.py +0 -0
  135. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/teams/teams_connector_client.py +0 -0
  136. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/telemetry/__init__.py +0 -0
  137. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/telemetry/_request_span_wrapper.py +0 -0
  138. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/telemetry/connector_spans.py +0 -0
  139. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/telemetry/constants.py +0 -0
  140. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/telemetry/metrics.py +0 -0
  141. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/telemetry/user_token_client_spans.py +0 -0
  142. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/user_token_base.py +0 -0
  143. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/connector/user_token_client_base.py +0 -0
  144. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/errors/__init__.py +0 -0
  145. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/errors/error_resources.py +0 -0
  146. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/header_propagation/__init__.py +0 -0
  147. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/header_propagation/agentic_header_provider.py +0 -0
  148. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/header_propagation/header_propagation_context.py +0 -0
  149. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/header_propagation/header_value_provider.py +0 -0
  150. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/http/__init__.py +0 -0
  151. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/http/_channel_service_routes.py +0 -0
  152. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/http/_http_request_protocol.py +0 -0
  153. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/http/_http_response.py +0 -0
  154. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/message_factory.py +0 -0
  155. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/middleware_set.py +0 -0
  156. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/py.typed +0 -0
  157. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/rest_channel_service_client_factory.py +0 -0
  158. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/security/__init__.py +0 -0
  159. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/security/_connector.py +0 -0
  160. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/security/_middleware.py +0 -0
  161. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/security/_utils.py +0 -0
  162. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/security/_validator.py +0 -0
  163. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/security/outbound_host_validator.py +0 -0
  164. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/state/__init__.py +0 -0
  165. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/state/agent_state.py +0 -0
  166. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/state/state_property_accessor.py +0 -0
  167. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/state/user_state.py +0 -0
  168. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/__init__.py +0 -0
  169. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/_type_aliases.py +0 -0
  170. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/error_handling.py +0 -0
  171. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/memory_storage.py +0 -0
  172. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/storage.py +0 -0
  173. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/store_item.py +0 -0
  174. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/telemetry/__init__.py +0 -0
  175. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/telemetry/constants.py +0 -0
  176. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/telemetry/metrics.py +0 -0
  177. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/telemetry/spans.py +0 -0
  178. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/transcript/__init__.py +0 -0
  179. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/transcript/transcript_file_store.py +0 -0
  180. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/transcript/transcript_info.py +0 -0
  181. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/transcript/transcript_logger.py +0 -0
  182. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/transcript/transcript_memory_store.py +0 -0
  183. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/storage/transcript/transcript_store.py +0 -0
  184. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/__init__.py +0 -0
  185. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/adapter/__init__.py +0 -0
  186. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/adapter/constants.py +0 -0
  187. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/adapter/metrics.py +0 -0
  188. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/adapter/spans.py +0 -0
  189. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/attributes.py +0 -0
  190. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/core/__init__.py +0 -0
  191. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/core/_agents_telemetry.py +0 -0
  192. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/core/base_span_wrapper.py +0 -0
  193. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/core/resource.py +0 -0
  194. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/core/simple_span_wrapper.py +0 -0
  195. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/core/type_defs.py +0 -0
  196. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/turn_context/__init__.py +0 -0
  197. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/turn_context/constants.py +0 -0
  198. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/turn_context/spans.py +0 -0
  199. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/telemetry/utils.py +0 -0
  200. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents/hosting/core/turn_context.py +0 -0
  201. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents_hosting_core.egg-info/dependency_links.txt +0 -0
  202. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/microsoft_agents_hosting_core.egg-info/top_level.txt +0 -0
  203. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/pyproject.toml +0 -0
  204. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/readme.md +0 -0
  205. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/setup.cfg +0 -0
  206. {microsoft_agents_hosting_core-1.10.0.dev4 → microsoft_agents_hosting_core-1.10.0.dev5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-core
3
- Version: 1.10.0.dev4
3
+ Version: 1.10.0.dev5
4
4
  Summary: Core library for Microsoft Agents
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: microsoft-agents-activity==1.10.0.dev4
18
+ Requires-Dist: microsoft-agents-activity==1.10.0.dev5
19
19
  Requires-Dist: pyjwt>=2.10.1
20
20
  Requires-Dist: isodate>=0.6.1
21
21
  Requires-Dist: python-dotenv>=1.1.1
@@ -0,0 +1 @@
1
+ 1.10.0.dev5
@@ -4,7 +4,16 @@
4
4
  from __future__ import annotations
5
5
 
6
6
  from collections.abc import Mapping
7
+ from dataclasses import dataclass, field, fields
7
8
  from typing import Any, TYPE_CHECKING
9
+ from typing_extensions import Self
10
+
11
+ from microsoft_agents.activity.config import (
12
+ Configuration,
13
+ _Configurable,
14
+ _resolve,
15
+ xpath,
16
+ )
8
17
 
9
18
  if TYPE_CHECKING:
10
19
  from .agent_auth_configuration import AgentAuthConfiguration
@@ -109,3 +118,87 @@ class _ConnectionSettingsBase:
109
118
  ) -> "_ConnectionSettingsBase":
110
119
  """Build base settings from an :class:`AgentAuthConfiguration`."""
111
120
  return cls(**cls.base_kwargs_from_configuration(configuration))
121
+
122
+
123
+ _KNOWN_KWARGS_CACHE: dict[type[ConnectionSettingsBase], list[str]] = {}
124
+
125
+
126
+ @dataclass(frozen=True)
127
+ class ConnectionSettingsBase(_Configurable):
128
+ """Provider-independent settings bound from Configuration.
129
+
130
+ Frozen fields cannot be reassigned, but scopes and extras remain mutable.
131
+ Treat those containers as read-only after handing settings to a provider.
132
+ """
133
+
134
+ client_id: str | None = None
135
+ authority: str | None = None
136
+ tenant_id: str | None = None
137
+ alternate_blueprint_connection_name: str | None = None
138
+ scopes: list[str] = field(default_factory=list)
139
+ _extras: Configuration = field(default_factory=Configuration)
140
+
141
+ @property
142
+ def extras(self) -> Configuration:
143
+ """Return unrecognized provider settings, not an immutable copy."""
144
+ return self._extras
145
+
146
+ @classmethod
147
+ def _from_agent_auth_config(cls, agent_auth_config: AgentAuthConfiguration) -> Self:
148
+ attrs = dict(vars(agent_auth_config))
149
+ attrs.update(attrs.pop("provider_settings", {}))
150
+ attrs["ISSUERS"] = agent_auth_config.ISSUERS
151
+ if isinstance(attrs.get("SCOPES"), Mapping):
152
+ # TODO: Temporary compatibility for legacy indexed scopes; the next
153
+ # PR's configuration-loader migration will normalize these mappings.
154
+ attrs["SCOPES"] = _resolve({"SCOPES": attrs["SCOPES"]})["SCOPES"]
155
+ return cls.from_mapping(attrs)
156
+
157
+ @classmethod
158
+ def _get_init_kwargs(cls, config: Configuration) -> dict:
159
+ return {
160
+ "client_id": config.get_strn(cls._xpath("client_id")),
161
+ "authority": config.get_strn(
162
+ cls._xpath("authority"), cls._xpath("authorityendpoint")
163
+ ),
164
+ "tenant_id": config.get_strn(cls._xpath("tenant_id")),
165
+ "scopes": config.get_scopes(cls._xpath("scopes")),
166
+ "alternate_blueprint_connection_name": config.get_strn(
167
+ "alt_blueprint_name",
168
+ "ALT_BLUEPRINT_NAME",
169
+ "alt_blueprint_id",
170
+ "ALT_BLUEPRINT_ID",
171
+ *cls._xpath("alternate_blueprint_connection_name"),
172
+ ),
173
+ }
174
+
175
+ @classmethod
176
+ def _known_kwargs(cls) -> list[str]:
177
+ if cls not in _KNOWN_KWARGS_CACHE:
178
+ _KNOWN_KWARGS_CACHE[cls] = [
179
+ alias
180
+ for f in fields(cls)
181
+ if f.init and f.name != "_extras"
182
+ for alias in xpath(f.name)
183
+ ]
184
+ return _KNOWN_KWARGS_CACHE[cls]
185
+
186
+ @classmethod
187
+ def _get_extras(cls, config: Configuration) -> Configuration:
188
+ known_kwargs = cls._known_kwargs()
189
+ base = {k: v for k, v in config.items() if k not in known_kwargs}
190
+ return Configuration.from_mapping(
191
+ base, _base_path=config._base_path, **base.pop("extras", {})
192
+ )
193
+
194
+ @classmethod
195
+ def _from_configuration(cls, config: Configuration) -> Self:
196
+ try:
197
+ settings = config.get_section(xpath("settings"))
198
+ except KeyError:
199
+ settings = config
200
+ return cls(**cls._get_init_kwargs(settings), _extras=cls._get_extras(settings))
201
+
202
+ @staticmethod
203
+ def _xpath(name: str) -> list[str]:
204
+ return xpath(name, lower_snake=True)
@@ -3,8 +3,12 @@
3
3
 
4
4
  from ._authorize_request import _authorize_request
5
5
  from .jwt_token_validator import JwtTokenValidator
6
+ from .jwt_connection_settings import JwtConnectionSettings
7
+ from .token_validation_configuration import TokenValidationConfiguration
6
8
 
7
9
  __all__ = [
8
10
  "JwtTokenValidator",
9
11
  "_authorize_request",
12
+ "JwtConnectionSettings",
13
+ "TokenValidationConfiguration",
10
14
  ]
@@ -4,7 +4,10 @@
4
4
  import logging
5
5
 
6
6
  from jwt import PyJWTError
7
+ from typing import Any, Mapping
8
+ from weakref import WeakKeyDictionary
7
9
 
10
+ from microsoft_agents.activity.config import Configuration
8
11
  from microsoft_agents.hosting.core.http import HttpResponse
9
12
 
10
13
  from ..agent_auth_configuration import AgentAuthConfiguration
@@ -13,9 +16,33 @@ from .jwt_token_validator import JwtTokenValidator
13
16
 
14
17
  logger = logging.getLogger(__name__)
15
18
 
19
+ _TOKEN_VALIDATION_CACHE: WeakKeyDictionary[Any, JwtTokenValidator] = WeakKeyDictionary()
20
+
21
+
22
+ def _resolve_token_validator(
23
+ auth_config: Configuration | AgentAuthConfiguration | None,
24
+ cache_key: Any = None,
25
+ ) -> JwtTokenValidator | None:
26
+
27
+ if cache_key is not None and cache_key in _TOKEN_VALIDATION_CACHE:
28
+ return _TOKEN_VALIDATION_CACHE[cache_key]
29
+
30
+ if auth_config is not None:
31
+ config: AgentAuthConfiguration | Configuration = auth_config
32
+ if not isinstance(auth_config, AgentAuthConfiguration):
33
+ config = Configuration(auth_config)
34
+ validator = JwtTokenValidator(config)
35
+ if cache_key is not None:
36
+ _TOKEN_VALIDATION_CACHE[cache_key] = validator
37
+ return validator
38
+ return None
39
+
16
40
 
17
41
  async def _authorize_request(
18
- authorization_header: str | None, auth_config: AgentAuthConfiguration | None
42
+ authorization_header: str | None,
43
+ auth_config: Configuration | AgentAuthConfiguration | None,
44
+ *,
45
+ cache_key: Any = None
19
46
  ) -> ClaimsIdentity | HttpResponse:
20
47
  """
21
48
  Authorizes a request based on the provided JWT token in the Authorization header.
@@ -25,16 +52,16 @@ async def _authorize_request(
25
52
  :return: A ClaimsIdentity object if the token is valid, or an HttpResponse with an
26
53
  error message and status code if the token is invalid or missing.
27
54
  """
55
+ validator = _resolve_token_validator(auth_config, cache_key)
28
56
 
29
- if auth_config is None:
57
+ if not validator:
30
58
  return HttpResponse(
31
59
  body={"error": "Agent Authentication configuration not found"},
32
60
  status_code=500,
33
61
  )
34
- validator = JwtTokenValidator(auth_config)
35
62
 
36
63
  if not authorization_header:
37
- if auth_config.ANONYMOUS_ALLOWED:
64
+ if validator.config.anonymous_allowed:
38
65
  claims_identity = validator.get_anonymous_claims()
39
66
  return claims_identity
40
67
  return HttpResponse(
@@ -0,0 +1,40 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from __future__ import annotations
5
+
6
+ from dataclasses import dataclass, field
7
+
8
+ from microsoft_agents.activity.config import Configuration, xpath
9
+
10
+ from .._entra_issuers import default_connection_issuers
11
+ from ..connection_settings_base import ConnectionSettingsBase
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class JwtConnectionSettings(ConnectionSettingsBase):
16
+ """Provider-independent connection settings for inbound JWT validation."""
17
+
18
+ validate_issuer: bool = False
19
+ issuers: list[str] = field(default_factory=list)
20
+ anonymous_allowed: bool = False
21
+
22
+ @classmethod
23
+ def _get_init_kwargs(cls, config: Configuration) -> dict:
24
+ base = super()._get_init_kwargs(config)
25
+ issuers = config.get_str_list(xpath("issuers"))
26
+ issuers = issuers or default_connection_issuers(
27
+ base.get("tenant_id"), base.get("authority")
28
+ )
29
+ base.update(
30
+ {
31
+ "validate_issuer": config.get_bool(
32
+ xpath("validate_issuer"), default=False
33
+ ),
34
+ "issuers": issuers,
35
+ "anonymous_allowed": config.get_bool(
36
+ xpath("anonymous_allowed"), default=False
37
+ ),
38
+ }
39
+ )
40
+ return base
@@ -9,6 +9,8 @@ from dataclasses import dataclass
9
9
 
10
10
  from jwt import PyJWKClient, PyJWK, decode, get_unverified_header
11
11
 
12
+ from microsoft_agents.activity.config import Configuration
13
+
12
14
  from ..agent_auth_configuration import AgentAuthConfiguration
13
15
  from ..authentication_constants import AuthenticationConstants
14
16
  from ..claims_identity import ClaimsIdentity
@@ -20,6 +22,8 @@ from .._entra_issuers import (
20
22
  jwks_login_host,
21
23
  well_known_first_party_issuers,
22
24
  )
25
+ from .token_validation_configuration import TokenValidationConfiguration
26
+ from .jwt_connection_settings import JwtConnectionSettings
23
27
 
24
28
  logger = logging.getLogger(__name__)
25
29
 
@@ -75,12 +79,39 @@ class JwtTokenValidator:
75
79
 
76
80
  _jwk_client_manager = _JwkClientManager()
77
81
 
78
- def __init__(self, configuration: AgentAuthConfiguration):
82
+ def __init__(self, configuration: AgentAuthConfiguration | Configuration):
79
83
  """Initializes the JwtTokenValidator with the given configuration.
80
84
 
81
- :param configuration: An instance of AgentAuthConfiguration containing the necessary settings for token validation.
85
+ :param configuration: Application Configuration used to bind
86
+ TokenValidationConfiguration. AgentAuthConfiguration is accepted
87
+ through a legacy conversion path.
82
88
  """
83
- self.configuration = configuration
89
+ if isinstance(configuration, AgentAuthConfiguration):
90
+ self._config = TokenValidationConfiguration(
91
+ tenant_id=configuration.tenant_id,
92
+ anonymous_allowed=configuration.ANONYMOUS_ALLOWED,
93
+ audiences=[
94
+ conn.CLIENT_ID
95
+ for conn in configuration._connections.values()
96
+ if conn.CLIENT_ID
97
+ ],
98
+ connections={
99
+ name: JwtConnectionSettings._from_agent_auth_config(conn)
100
+ for name, conn in configuration._connections.items()
101
+ },
102
+ default_jwt_settings=JwtConnectionSettings._from_agent_auth_config(
103
+ configuration
104
+ ),
105
+ )
106
+ else:
107
+ self._config = TokenValidationConfiguration.from_configuration(
108
+ configuration
109
+ )
110
+
111
+ @property
112
+ def config(self) -> TokenValidationConfiguration:
113
+ """Return the bound token-validation policy and connection settings."""
114
+ return self._config
84
115
 
85
116
  async def validate_token(self, token: str) -> ClaimsIdentity:
86
117
  """Validates a JWT token.
@@ -106,15 +137,17 @@ class JwtTokenValidator:
106
137
  # root-configuration endpoint for backward-compatible network egress.
107
138
  # This is routing only -- final acceptance is checked against the
108
139
  # signature-verified claims below.
109
- routing_config = (
110
- self.configuration._jwt_patch_find_connection(
111
- unverified_payload.get(AuthenticationConstants.AUDIENCE_CLAIM)
112
- )
113
- or self.configuration
140
+ routing_config = self._config.get_connection_settings(
141
+ unverified_payload.get(AuthenticationConstants.AUDIENCE_CLAIM)
114
142
  )
143
+ if not routing_config:
144
+ logger.warning(
145
+ "No default or specific routing configuration found for the given audience."
146
+ )
147
+ raise ValueError("Invalid audience.")
115
148
  jwks_uri = _build_jwks_uri(
116
149
  unverified_payload.get(AuthenticationConstants.ISSUER_CLAIM),
117
- self.configuration,
150
+ self.config,
118
151
  routing_config,
119
152
  )
120
153
  key = await self._jwk_client_manager.get_signing_key(jwks_uri, header)
@@ -128,23 +161,26 @@ class JwtTokenValidator:
128
161
  )
129
162
 
130
163
  aud = decoded_token.get(AuthenticationConstants.AUDIENCE_CLAIM, "")
131
- if not self.configuration._jwt_patch_is_valid_aud(aud):
164
+ if not self._config.validate_audience(aud):
132
165
  logger.warning("JWT audience not accepted.")
133
166
  raise ValueError("Invalid audience.")
134
167
 
135
- matched_config = (
136
- self.configuration._jwt_patch_find_connection(aud) or routing_config
137
- )
168
+ matched_config = self._config.get_connection_settings(aud)
169
+ if not matched_config:
170
+ logger.warning(
171
+ "No default or specific routing configuration found for the given audience."
172
+ )
173
+ raise ValueError("Invalid audience.")
138
174
 
139
175
  # Issuer allow-list validation is explicit opt-in
140
- # (AgentAuthConfiguration.VALIDATE_ISSUER) to preserve backward
176
+ # (JwtConnectionSettings.validate_issuer) to preserve backward
141
177
  # compatibility for existing deployments. Tid-to-issuer binding,
142
178
  # however, is always enforced per issue #626: it only engages when
143
179
  # the (verified) issuer is itself a recognized Entra issuer carrying
144
180
  # a GUID tenant, so Bot Framework/non-Entra and tenant-alias issuers
145
181
  # are unaffected, and a missing ``tid`` claim skips the check rather
146
182
  # than failing closed.
147
- if matched_config.VALIDATE_ISSUER:
183
+ if matched_config.validate_issuer:
148
184
  _validate_issuer(
149
185
  decoded_token.get(AuthenticationConstants.ISSUER_CLAIM), matched_config
150
186
  )
@@ -164,8 +200,8 @@ class JwtTokenValidator:
164
200
 
165
201
  def _build_jwks_uri(
166
202
  iss: Any,
167
- root_config: AgentAuthConfiguration,
168
- routing_config: AgentAuthConfiguration,
203
+ root_config: TokenValidationConfiguration,
204
+ routing_config: JwtConnectionSettings,
169
205
  ) -> str:
170
206
  """Builds the JWKS URI for the (unverified, routing-only) issuer and the
171
207
  root and audience-selected connection configurations.
@@ -186,29 +222,29 @@ def _build_jwks_uri(
186
222
  if bf_uri:
187
223
  return bf_uri
188
224
 
189
- if is_gov_authority(routing_config.AUTHORITY):
190
- host = jwks_login_host(routing_config.AUTHORITY)
225
+ if is_gov_authority(routing_config.authority):
226
+ host = jwks_login_host(routing_config.authority)
191
227
  tenant = (
192
- effective_tenant(routing_config.TENANT_ID, routing_config.AUTHORITY)
228
+ effective_tenant(routing_config.tenant_id, routing_config.authority)
193
229
  or "common"
194
230
  )
195
231
  return f"{host}/{tenant}/discovery/v2.0/keys"
196
232
 
197
233
  return (
198
234
  "https://login.microsoftonline.com/"
199
- f"{root_config.TENANT_ID or 'common'}/discovery/v2.0/keys"
235
+ f"{root_config.tenant_id or 'common'}/discovery/v2.0/keys"
200
236
  )
201
237
 
202
238
 
203
- def _get_valid_issuers(config: AgentAuthConfiguration) -> set[str]:
239
+ def _get_valid_issuers(config: JwtConnectionSettings) -> set[str]:
204
240
  """Case-insensitive union of the connection's configured/default issuers
205
- (``AgentAuthConfiguration.ISSUERS``) and the always-trusted Microsoft
241
+ (``JwtConnectionSettings.issuers``) and the always-trusted Microsoft
206
242
  first-party issuers for the connection's cloud."""
207
- combined = list(config.ISSUERS) + well_known_first_party_issuers(config.AUTHORITY)
243
+ combined = list(config.issuers) + well_known_first_party_issuers(config.authority)
208
244
  return {issuer.lower() for issuer in combined}
209
245
 
210
246
 
211
- def _is_multi_tenant(config: AgentAuthConfiguration) -> bool:
247
+ def _is_multi_tenant(config: JwtConnectionSettings) -> bool:
212
248
  """A connection configured for the Entra ``common``/``organizations``
213
249
  meta-tenant ("blueprint" agent) has no single known calling tenant at
214
250
  configuration time, so :func:`_is_acceptable_tenant_issuer` is used instead
@@ -221,11 +257,11 @@ def _is_multi_tenant(config: AgentAuthConfiguration) -> bool:
221
257
  AUTHORITY embeds ``common``/``organizations`` (rather than TENANT_ID) is
222
258
  still recognized as multi-tenant.
223
259
  """
224
- tenant = (effective_tenant(config.TENANT_ID, config.AUTHORITY) or "").lower()
260
+ tenant = (effective_tenant(config.tenant_id, config.authority) or "").lower()
225
261
  return tenant in ("common", "organizations")
226
262
 
227
263
 
228
- def _is_acceptable_tenant_issuer(iss: str, config: AgentAuthConfiguration) -> bool:
264
+ def _is_acceptable_tenant_issuer(iss: str, config: JwtConnectionSettings) -> bool:
229
265
  """Whether ``iss`` is a canonical Entra issuer acceptable for a multi-tenant
230
266
  connection: it must carry a tenant GUID and, for cloud-specific v2 issuers,
231
267
  match the connection's cloud (public vs US Government). The cloud-agnostic
@@ -233,10 +269,10 @@ def _is_acceptable_tenant_issuer(iss: str, config: AgentAuthConfiguration) -> bo
233
269
  info = entra_issuer_info(iss)
234
270
  if info is None:
235
271
  return False
236
- return info.gov is None or info.gov == is_gov_authority(config.AUTHORITY)
272
+ return info.gov is None or info.gov == is_gov_authority(config.authority)
237
273
 
238
274
 
239
- def _validate_issuer(iss: Any, config: AgentAuthConfiguration) -> None:
275
+ def _validate_issuer(iss: Any, config: JwtConnectionSettings) -> None:
240
276
  """Validates that the token's ``iss`` claim is accepted for the matched
241
277
  connection: either present in the connection's issuer allow-list, or, for
242
278
  a multi-tenant (``common``/``organizations``) connection, a canonical
@@ -0,0 +1,75 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from __future__ import annotations
5
+
6
+ from dataclasses import dataclass, field
7
+ from typing import Any
8
+
9
+ from microsoft_agents.activity.config import Configuration, _Configurable, xpath
10
+
11
+ from .jwt_connection_settings import JwtConnectionSettings
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class TokenValidationConfiguration(_Configurable):
16
+ tenant_id: str | None = None
17
+ audiences: list[str] = field(default_factory=list)
18
+ anonymous_allowed: bool = False
19
+ default_jwt_settings: JwtConnectionSettings | None = None
20
+ connections: dict[str, JwtConnectionSettings] = field(default_factory=dict)
21
+
22
+ @classmethod
23
+ def _from_configuration(
24
+ cls, configuration: Configuration
25
+ ) -> TokenValidationConfiguration:
26
+ token_validation = configuration.get_section(
27
+ xpath("token_validation"), default=Configuration()
28
+ )
29
+ audiences = token_validation.get_str_list(xpath("audiences"))
30
+ tenant_id = token_validation.get_strn(xpath("tenant_id"))
31
+ anonymous_allowed = token_validation.get_booln(xpath("anonymous_allowed"))
32
+
33
+ connections: dict[str, JwtConnectionSettings] = {}
34
+ connection_config = configuration.get_section(
35
+ xpath("connections"), default=Configuration()
36
+ )
37
+ for name in connection_config:
38
+ connections[name] = JwtConnectionSettings.from_configuration(
39
+ connection_config.get_section(name)
40
+ )
41
+
42
+ update_audiences = not audiences
43
+ update_tenant_id = not tenant_id
44
+ default_jwt_settings: JwtConnectionSettings | None = None
45
+ for conn_name, conn in connections.items():
46
+ if conn_name.upper() == "SERVICE_CONNECTION":
47
+ if update_tenant_id:
48
+ tenant_id = conn.tenant_id
49
+ default_jwt_settings = conn
50
+ if update_audiences and conn.client_id:
51
+ audiences.append(conn.client_id)
52
+
53
+ if default_jwt_settings is not None and anonymous_allowed is None:
54
+ anonymous_allowed = default_jwt_settings.anonymous_allowed
55
+
56
+ return cls(
57
+ tenant_id=tenant_id,
58
+ audiences=audiences,
59
+ connections=connections,
60
+ default_jwt_settings=default_jwt_settings,
61
+ anonymous_allowed=anonymous_allowed or False,
62
+ )
63
+
64
+ def validate_audience(self, aud: Any) -> bool:
65
+ if not aud or not isinstance(aud, str):
66
+ return False
67
+ return any(aud.lower() == target.lower() for target in self.audiences)
68
+
69
+ def get_connection_settings(self, aud: Any) -> JwtConnectionSettings | None:
70
+ if not aud or not isinstance(aud, str):
71
+ return None
72
+ for conn in self.connections.values():
73
+ if conn.client_id and conn.client_id.lower() == aud.lower():
74
+ return conn
75
+ return self.default_jwt_settings
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-core
3
- Version: 1.10.0.dev4
3
+ Version: 1.10.0.dev5
4
4
  Summary: Core library for Microsoft Agents
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: microsoft-agents-activity==1.10.0.dev4
18
+ Requires-Dist: microsoft-agents-activity==1.10.0.dev5
19
19
  Requires-Dist: pyjwt>=2.10.1
20
20
  Requires-Dist: isodate>=0.6.1
21
21
  Requires-Dist: python-dotenv>=1.1.1
@@ -98,7 +98,9 @@ microsoft_agents/hosting/core/authorization/connection_settings_base.py
98
98
  microsoft_agents/hosting/core/authorization/connections.py
99
99
  microsoft_agents/hosting/core/authorization/jwt/__init__.py
100
100
  microsoft_agents/hosting/core/authorization/jwt/_authorize_request.py
101
+ microsoft_agents/hosting/core/authorization/jwt/jwt_connection_settings.py
101
102
  microsoft_agents/hosting/core/authorization/jwt/jwt_token_validator.py
103
+ microsoft_agents/hosting/core/authorization/jwt/token_validation_configuration.py
102
104
  microsoft_agents/hosting/core/authorization/telemetry/__init__.py
103
105
  microsoft_agents/hosting/core/authorization/telemetry/constants.py
104
106
  microsoft_agents/hosting/core/authorization/telemetry/metrics.py
@@ -1,4 +1,4 @@
1
- microsoft-agents-activity==1.10.0.dev4
1
+ microsoft-agents-activity==1.10.0.dev5
2
2
  pyjwt>=2.10.1
3
3
  isodate>=0.6.1
4
4
  python-dotenv>=1.1.1
@@ -1 +0,0 @@
1
- 1.10.0.dev4