microsoft-agents-hosting-core 1.10.0.dev6__tar.gz → 1.10.0.dev8__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 (211) hide show
  1. {microsoft_agents_hosting_core-1.10.0.dev6/microsoft_agents_hosting_core.egg-info → microsoft_agents_hosting_core-1.10.0.dev8}/PKG-INFO +2 -2
  2. microsoft_agents_hosting_core-1.10.0.dev8/VERSION.txt +1 -0
  3. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/__init__.py +2 -0
  4. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/__init__.py +3 -2
  5. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/app_options.py +7 -5
  6. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/__init__.py +2 -1
  7. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/_handlers/_authorization_handler.py +47 -20
  8. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/_handlers/_user_authorization.py +1 -1
  9. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/_handlers/agentic_user_authorization.py +33 -23
  10. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/_handlers/connector_user_authorization.py +33 -24
  11. microsoft_agents_hosting_core-1.10.0.dev8/microsoft_agents/hosting/core/app/oauth/auth_handler.py +118 -0
  12. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/authorization.py +63 -35
  13. microsoft_agents_hosting_core-1.10.0.dev8/microsoft_agents/hosting/core/app/oauth/authorization_settings.py +68 -0
  14. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/jwt/jwt_token_validator.py +16 -6
  15. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/jwt/token_validation_configuration.py +30 -4
  16. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/channel_service_adapter.py +118 -107
  17. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8/microsoft_agents_hosting_core.egg-info}/PKG-INFO +2 -2
  18. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents_hosting_core.egg-info/SOURCES.txt +1 -0
  19. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents_hosting_core.egg-info/requires.txt +1 -1
  20. microsoft_agents_hosting_core-1.10.0.dev6/VERSION.txt +0 -1
  21. microsoft_agents_hosting_core-1.10.0.dev6/microsoft_agents/hosting/core/app/oauth/auth_handler.py +0 -102
  22. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/LICENSE +0 -0
  23. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/MANIFEST.in +0 -0
  24. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_http_adapter_base.py +0 -0
  25. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_oauth/__init__.py +0 -0
  26. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_oauth/_flow_state.py +0 -0
  27. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_oauth/_flow_storage_client.py +0 -0
  28. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_oauth/_oauth_flow.py +0 -0
  29. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_utils/__init__.py +0 -0
  30. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_utils/_service_set.py +0 -0
  31. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/_utils/_turn_context_wrapper.py +0 -0
  32. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/activity_handler.py +0 -0
  33. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/agent.py +0 -0
  34. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/_routes/__init__.py +0 -0
  35. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/_routes/_route.py +0 -0
  36. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/_routes/_route_list.py +0 -0
  37. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/_routes/route_rank.py +0 -0
  38. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/_selector.py +0 -0
  39. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/_type_defs.py +0 -0
  40. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/_utils.py +0 -0
  41. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/adaptive_card/__init__.py +0 -0
  42. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/adaptive_card/_type_defs.py +0 -0
  43. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/adaptive_card/adaptive_card.py +0 -0
  44. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/adaptive_card/factory.py +0 -0
  45. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/adaptive_card/models.py +0 -0
  46. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/agent_application.py +0 -0
  47. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/app_error.py +0 -0
  48. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/attachment_downloader.py +0 -0
  49. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/input_file.py +0 -0
  50. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/m365_attachment_downloader.py +0 -0
  51. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/_handlers/__init__.py +0 -0
  52. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/_sign_in_response.py +0 -0
  53. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/_sign_in_state.py +0 -0
  54. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/telemetry/__init__.py +0 -0
  55. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/telemetry/constants.py +0 -0
  56. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/oauth/telemetry/spans.py +0 -0
  57. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/__init__.py +0 -0
  58. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/conversation.py +0 -0
  59. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/conversation_builder.py +0 -0
  60. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/conversation_reference_builder.py +0 -0
  61. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/create_conversation_options.py +0 -0
  62. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/proactive.py +0 -0
  63. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/proactive_options.py +0 -0
  64. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/telemetry/__init__.py +0 -0
  65. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/telemetry/_utils.py +0 -0
  66. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/telemetry/constants.py +0 -0
  67. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/proactive/telemetry/spans.py +0 -0
  68. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/query.py +0 -0
  69. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/state/__init__.py +0 -0
  70. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/state/conversation_state.py +0 -0
  71. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/state/state.py +0 -0
  72. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/state/temp_state.py +0 -0
  73. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/state/turn_state.py +0 -0
  74. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/streaming/__init__.py +0 -0
  75. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/streaming/citation.py +0 -0
  76. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/streaming/citation_util.py +0 -0
  77. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/streaming/streaming_response.py +0 -0
  78. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/telemetry/__init__.py +0 -0
  79. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/telemetry/constants.py +0 -0
  80. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/telemetry/metrics.py +0 -0
  81. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/telemetry/spans.py +0 -0
  82. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/app/typing_indicator.py +0 -0
  83. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/__init__.py +0 -0
  84. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/_entra_issuers.py +0 -0
  85. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/_helpers.py +0 -0
  86. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/_log_config.py +0 -0
  87. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/access_token_provider_base.py +0 -0
  88. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/anonymous_token_provider.py +0 -0
  89. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/auth_types.py +0 -0
  90. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/authentication_constants.py +0 -0
  91. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/claims_identity.py +0 -0
  92. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/connection_manager.py +0 -0
  93. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/connections/__init__.py +0 -0
  94. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/connections/agent_auth_configuration.py +0 -0
  95. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/connections/connection_manager.py +0 -0
  96. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/connections/connection_settings_base.py +0 -0
  97. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/connections/connections.py +0 -0
  98. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/connections/connections_map.py +0 -0
  99. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/jwt/__init__.py +0 -0
  100. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/jwt/_authorize_request.py +0 -0
  101. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/jwt/jwt_connection_settings.py +0 -0
  102. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/telemetry/__init__.py +0 -0
  103. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/telemetry/constants.py +0 -0
  104. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/telemetry/metrics.py +0 -0
  105. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/authorization/telemetry/spans.py +0 -0
  106. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/card_factory.py +0 -0
  107. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/channel_adapter.py +0 -0
  108. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/channel_api_handler_protocol.py +0 -0
  109. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/channel_service_client_factory_base.py +0 -0
  110. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/__init__.py +0 -0
  111. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/agent_conversation_reference.py +0 -0
  112. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/channel_factory_protocol.py +0 -0
  113. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/channel_host_protocol.py +0 -0
  114. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/channel_info_protocol.py +0 -0
  115. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/channel_protocol.py +0 -0
  116. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/channels_configuration.py +0 -0
  117. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/configuration_channel_host.py +0 -0
  118. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/conversation_constants.py +0 -0
  119. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/conversation_id_factory.py +0 -0
  120. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/conversation_id_factory_options.py +0 -0
  121. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/conversation_id_factory_protocol.py +0 -0
  122. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/http_agent_channel.py +0 -0
  123. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/client/http_agent_channel_factory.py +0 -0
  124. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/__init__.py +0 -0
  125. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/_utils.py +0 -0
  126. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/agent_sign_in_base.py +0 -0
  127. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/attachments_base.py +0 -0
  128. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/client/__init__.py +0 -0
  129. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/client/_base_client.py +0 -0
  130. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/client/agent_sign_in.py +0 -0
  131. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/client/connector_client.py +0 -0
  132. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/client/user_token.py +0 -0
  133. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/client/user_token_client.py +0 -0
  134. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/connector_client_base.py +0 -0
  135. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/conversations_base.py +0 -0
  136. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/get_product_info.py +0 -0
  137. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/mcs/__init__.py +0 -0
  138. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/mcs/mcs_connector_client.py +0 -0
  139. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/teams/__init__.py +0 -0
  140. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/teams/teams_connector_client.py +0 -0
  141. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/telemetry/__init__.py +0 -0
  142. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/telemetry/_request_span_wrapper.py +0 -0
  143. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/telemetry/connector_spans.py +0 -0
  144. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/telemetry/constants.py +0 -0
  145. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/telemetry/metrics.py +0 -0
  146. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/telemetry/user_token_client_spans.py +0 -0
  147. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/user_token_base.py +0 -0
  148. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/connector/user_token_client_base.py +0 -0
  149. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/errors/__init__.py +0 -0
  150. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/errors/error_resources.py +0 -0
  151. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/header_propagation/__init__.py +0 -0
  152. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/header_propagation/agentic_header_provider.py +0 -0
  153. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/header_propagation/header_propagation_context.py +0 -0
  154. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/header_propagation/header_value_provider.py +0 -0
  155. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/http/__init__.py +0 -0
  156. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/http/_channel_service_routes.py +0 -0
  157. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/http/_http_request_protocol.py +0 -0
  158. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/http/_http_response.py +0 -0
  159. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/message_factory.py +0 -0
  160. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/middleware_set.py +0 -0
  161. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/py.typed +0 -0
  162. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/rest_channel_service_client_factory.py +0 -0
  163. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/security/__init__.py +0 -0
  164. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/security/_connector.py +0 -0
  165. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/security/_middleware.py +0 -0
  166. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/security/_utils.py +0 -0
  167. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/security/_validator.py +0 -0
  168. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/security/outbound_host_validator.py +0 -0
  169. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/state/__init__.py +0 -0
  170. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/state/agent_state.py +0 -0
  171. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/state/state_property_accessor.py +0 -0
  172. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/state/user_state.py +0 -0
  173. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/__init__.py +0 -0
  174. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/_type_aliases.py +0 -0
  175. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/error_handling.py +0 -0
  176. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/memory_storage.py +0 -0
  177. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/storage.py +0 -0
  178. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/store_item.py +0 -0
  179. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/telemetry/__init__.py +0 -0
  180. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/telemetry/constants.py +0 -0
  181. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/telemetry/metrics.py +0 -0
  182. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/telemetry/spans.py +0 -0
  183. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/transcript/__init__.py +0 -0
  184. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/transcript/transcript_file_store.py +0 -0
  185. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/transcript/transcript_info.py +0 -0
  186. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/transcript/transcript_logger.py +0 -0
  187. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/transcript/transcript_memory_store.py +0 -0
  188. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/storage/transcript/transcript_store.py +0 -0
  189. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/__init__.py +0 -0
  190. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/adapter/__init__.py +0 -0
  191. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/adapter/constants.py +0 -0
  192. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/adapter/metrics.py +0 -0
  193. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/adapter/spans.py +0 -0
  194. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/attributes.py +0 -0
  195. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/core/__init__.py +0 -0
  196. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/core/_agents_telemetry.py +0 -0
  197. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/core/base_span_wrapper.py +0 -0
  198. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/core/resource.py +0 -0
  199. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/core/simple_span_wrapper.py +0 -0
  200. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/core/type_defs.py +0 -0
  201. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/turn_context/__init__.py +0 -0
  202. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/turn_context/constants.py +0 -0
  203. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/turn_context/spans.py +0 -0
  204. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/telemetry/utils.py +0 -0
  205. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents/hosting/core/turn_context.py +0 -0
  206. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents_hosting_core.egg-info/dependency_links.txt +0 -0
  207. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/microsoft_agents_hosting_core.egg-info/top_level.txt +0 -0
  208. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/pyproject.toml +0 -0
  209. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/readme.md +0 -0
  210. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/setup.cfg +0 -0
  211. {microsoft_agents_hosting_core-1.10.0.dev6 → microsoft_agents_hosting_core-1.10.0.dev8}/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.dev6
3
+ Version: 1.10.0.dev8
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.dev6
18
+ Requires-Dist: microsoft-agents-activity==1.10.0.dev8
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.dev8
@@ -43,6 +43,7 @@ from .app.streaming import (
43
43
  from .app.oauth import (
44
44
  Authorization,
45
45
  AuthHandler,
46
+ AuthHandlerSettings,
46
47
  AgenticUserAuthorization,
47
48
  )
48
49
 
@@ -156,6 +157,7 @@ __all__ = [
156
157
  "TempState",
157
158
  "Authorization",
158
159
  "AuthHandler",
160
+ "AuthHandlerSettings",
159
161
  "AccessTokenProviderBase",
160
162
  "AuthenticationConstants",
161
163
  "AnonymousTokenProvider",
@@ -18,6 +18,7 @@ from ._type_defs import RouteHandler, RouteSelector, StateT
18
18
  from .oauth import (
19
19
  Authorization,
20
20
  AuthHandler,
21
+ AuthHandlerSettings,
21
22
  AgenticUserAuthorization,
22
23
  )
23
24
 
@@ -44,7 +45,6 @@ __all__ = [
44
45
  "InputFile",
45
46
  "InputFileDownloader",
46
47
  "Query",
47
- "Route",
48
48
  "RouteRank",
49
49
  "RouteHandler",
50
50
  "TypingChannelStrategy",
@@ -58,9 +58,10 @@ __all__ = [
58
58
  "TurnState",
59
59
  "TempState",
60
60
  "Authorization",
61
- "AuthHandler",
61
+ "AuthHandlerSettings",
62
62
  "AgenticUserAuthorization",
63
63
  # Proactive
64
+ "AuthHandler",
64
65
  "Conversation",
65
66
  "ConversationBuilder",
66
67
  "ConversationReferenceBuilder",
@@ -8,8 +8,7 @@ from __future__ import annotations
8
8
  from dataclasses import dataclass, field
9
9
  from typing import Callable, Optional
10
10
 
11
- from microsoft_agents.hosting.core.app.oauth import AuthHandler
12
- from microsoft_agents.hosting.core.authorization import Connections
11
+ from microsoft_agents.hosting.core.app.oauth import AuthHandlerSettings
13
12
  from microsoft_agents.hosting.core.storage import Storage
14
13
 
15
14
  # from .auth import AuthOptions
@@ -81,10 +80,13 @@ class ApplicationOptions:
81
80
  If not provided, the default `TurnState` will be used.
82
81
  """
83
82
 
84
- authorization_handlers: Optional[dict[str, AuthHandler]] = None
83
+ authorization_handlers: Optional[dict[str, AuthHandlerSettings]] = None
85
84
  """
86
- Optional. Authorization handler for OAuth flows.
87
- If not provided, no OAuth flows will be supported.
85
+ Optional mapping of OAuth handler IDs to AuthHandlerSettings.
86
+ A nonempty mapping overrides configured handlers when AgentApplication
87
+ creates its Authorization instance. Otherwise handlers may be bound from
88
+ application configuration. Prefer AuthHandlerSettings over the deprecated
89
+ AuthHandler constructor.
88
90
  """
89
91
 
90
92
  proactive: Optional[ProactiveOptions] = None
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
  from .authorization import Authorization
6
- from .auth_handler import AuthHandler
6
+ from .auth_handler import AuthHandler, AuthHandlerSettings
7
7
  from ._sign_in_state import _SignInState
8
8
  from ._sign_in_response import _SignInResponse
9
9
  from ._handlers import (
@@ -16,6 +16,7 @@ from ._handlers import (
16
16
  __all__ = [
17
17
  "Authorization",
18
18
  "AuthHandler",
19
+ "AuthHandlerSettings",
19
20
  "_AuthorizationHandler",
20
21
  "_SignInState",
21
22
  "_SignInResponse",
@@ -3,16 +3,18 @@ Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  Licensed under the MIT License.
4
4
  """
5
5
 
6
- from abc import ABC
7
- from typing import Optional
8
6
  import logging
7
+ import warnings
8
+
9
+ from abc import ABC
10
+ from typing import Mapping
9
11
 
10
12
  from microsoft_agents.activity import TokenResponse
11
13
 
12
14
  from ....turn_context import TurnContext
13
15
  from ....storage import Storage
14
16
  from ....authorization import Connections
15
- from ..auth_handler import AuthHandler
17
+ from ..auth_handler import AuthHandlerSettings
16
18
  from .._sign_in_response import _SignInResponse
17
19
 
18
20
  logger = logging.getLogger(__name__)
@@ -23,47 +25,72 @@ class _AuthorizationHandler(ABC):
23
25
 
24
26
  _storage: Storage
25
27
  _connection_manager: Connections
26
- _handler: AuthHandler
28
+ _handler: AuthHandlerSettings
27
29
 
28
30
  def __init__(
29
31
  self,
30
32
  storage: Storage,
31
33
  connection_manager: Connections,
32
- auth_handler: Optional[AuthHandler] = None,
34
+ settings: Mapping | AuthHandlerSettings | None = None,
33
35
  *,
34
- auth_handler_id: Optional[str] = None,
35
- auth_handler_settings: Optional[dict] = None,
36
+ auth_handler_id: str | None = None,
37
+ auth_handler: AuthHandlerSettings | None = None,
38
+ auth_handler_settings: dict | None = None,
36
39
  **kwargs,
37
40
  ) -> None:
38
- """
39
- Creates a new instance of Authorization.
41
+ """Initialize an authorization strategy from handler settings.
42
+
43
+ A nonempty settings mapping is bound through AuthHandlerSettings;
44
+ an AuthHandlerSettings instance is reused. Settings take precedence
45
+ over the deprecated auth_handler and auth_handler_settings arguments.
46
+ The handler ID comes from auth_handler_id, or from the settings name.
40
47
 
41
48
  :param storage: The storage system to use for state management.
42
49
  :type storage: Storage
43
50
  :param connection_manager: The connection manager for OAuth providers.
44
51
  :type connection_manager: Connections
45
- :param auth_handlers: Configuration for OAuth providers.
46
- :type auth_handlers: dict[str, AuthHandler], Optional
47
- :raises ValueError: When storage is None or no auth handlers provided.
52
+ :param settings: Preferred handler settings, accepted positionally or
53
+ by keyword.
54
+ :type settings: Mapping | AuthHandlerSettings | None
55
+ :param auth_handler_id: Optional override of the settings name.
56
+ :type auth_handler_id: str | None
57
+ :param auth_handler: Deprecated bound settings; use settings instead.
58
+ :type auth_handler: AuthHandlerSettings | None
59
+ :param auth_handler_settings: Deprecated mapping; use settings instead.
60
+ :type auth_handler_settings: dict | None
61
+ :param kwargs: Accepted for compatibility, not used to bind settings.
62
+ :raises ValueError: If storage, nonempty settings, or a handler ID is
63
+ missing.
48
64
  """
49
65
  if not storage:
50
66
  raise ValueError("Storage is required for Authorization")
51
- if not auth_handler and not auth_handler_settings:
67
+ if not settings and not auth_handler and not auth_handler_settings:
52
68
  raise ValueError(
53
- "At least one of auth_handler or auth_handler_settings is required."
69
+ "At least one of settings, auth_handler, or auth_handler_settings is required."
70
+ )
71
+ if auth_handler or auth_handler_settings:
72
+ warnings.warn(
73
+ "auth_handler and auth_handler_settings are deprecated. Please use settings instead.",
74
+ DeprecationWarning,
75
+ stacklevel=2,
54
76
  )
55
77
 
56
78
  self._storage = storage
57
79
  self._connection_manager = connection_manager
58
80
 
59
- if auth_handler:
81
+ if settings:
82
+ if isinstance(settings, AuthHandlerSettings):
83
+ self._handler = settings
84
+ else:
85
+ self._handler = AuthHandlerSettings.from_mapping(settings)
86
+ elif auth_handler: # deprecated
60
87
  self._handler = auth_handler
61
- else:
88
+ else: # deprecated
62
89
  if not auth_handler_settings:
63
90
  raise ValueError(
64
91
  "auth_handler_settings must be provided if auth_handler is None."
65
92
  )
66
- self._handler = AuthHandler._from_settings(auth_handler_settings)
93
+ self._handler = AuthHandlerSettings.from_mapping(auth_handler_settings)
67
94
 
68
95
  self._id = auth_handler_id or self._handler.name
69
96
  if not self._id:
@@ -72,7 +99,7 @@ class _AuthorizationHandler(ABC):
72
99
  )
73
100
 
74
101
  async def _sign_in(
75
- self, context: TurnContext, scopes: Optional[list[str]] = None
102
+ self, context: TurnContext, scopes: list[str] | None = None
76
103
  ) -> _SignInResponse:
77
104
  """Initiate or continue the sign-in process for the user with the given auth handler.
78
105
 
@@ -88,8 +115,8 @@ class _AuthorizationHandler(ABC):
88
115
  async def get_refreshed_token(
89
116
  self,
90
117
  context: TurnContext,
91
- exchange_connection: Optional[str] = None,
92
- exchange_scopes: Optional[list[str]] = None,
118
+ exchange_connection: str | None = None,
119
+ exchange_scopes: list[str] | None = None,
93
120
  ) -> TokenResponse:
94
121
  """Attempts to get a refreshed token for the user with the given scopes
95
122
 
@@ -4,8 +4,8 @@ Licensed under the MIT License.
4
4
  """
5
5
 
6
6
  from __future__ import annotations
7
+
7
8
  import logging
8
- from typing import cast
9
9
 
10
10
  from microsoft_agents.activity import (
11
11
  Activity,
@@ -5,7 +5,7 @@ Licensed under the MIT License.
5
5
 
6
6
  import logging
7
7
 
8
- from typing import Optional
8
+ from typing import Mapping
9
9
 
10
10
  from microsoft_agents.activity import TokenResponse
11
11
 
@@ -15,7 +15,7 @@ from .._sign_in_response import _SignInResponse
15
15
  from ._authorization_handler import _AuthorizationHandler
16
16
  from ....storage import Storage
17
17
  from ....authorization import Connections
18
- from ..auth_handler import AuthHandler
18
+ from ..auth_handler import AuthHandlerSettings
19
19
  from ..telemetry import spans
20
20
 
21
21
  logger = logging.getLogger(__name__)
@@ -28,34 +28,44 @@ class AgenticUserAuthorization(_AuthorizationHandler):
28
28
  self,
29
29
  storage: Storage,
30
30
  connection_manager: Connections,
31
- auth_handler: Optional[AuthHandler] = None,
31
+ settings: Mapping | AuthHandlerSettings | None = None,
32
32
  *,
33
- auth_handler_id: Optional[str] = None,
34
- auth_handler_settings: Optional[dict] = None,
33
+ auth_handler_id: str | None = None,
34
+ auth_handler: AuthHandlerSettings | None = None,
35
+ auth_handler_settings: dict | None = None,
35
36
  **kwargs,
36
37
  ) -> None:
37
- """
38
- Creates a new instance of Authorization.
38
+ """Create an agentic authorization strategy.
39
+
40
+ Prefer settings containing an AuthHandlerSettings instance or a mapping.
41
+ The bound settings also supply the optional alternate blueprint
42
+ connection name. Legacy settings arguments remain accepted but emit a
43
+ DeprecationWarning.
39
44
 
40
45
  :param storage: The storage system to use for state management.
41
46
  :type storage: Storage
42
47
  :param connection_manager: The connection manager for OAuth providers.
43
48
  :type connection_manager: Connections
44
- :param auth_handlers: Configuration for OAuth providers.
45
- :type auth_handlers: dict[str, AuthHandler], Optional
46
- :raises ValueError: When storage is None or no auth handlers provided.
49
+ :param settings: Handler settings, accepted positionally or by keyword.
50
+ :type settings: Mapping | AuthHandlerSettings | None
51
+ :param auth_handler_id: Optional override of the settings name.
52
+ :param auth_handler: Deprecated bound settings; use settings instead.
53
+ :type auth_handler: AuthHandlerSettings | None
54
+ :param auth_handler_settings: Deprecated mapping; use settings instead.
55
+ :param kwargs: Compatibility arguments forwarded to the base handler.
56
+ :raises ValueError: If storage, nonempty settings, or a handler ID is
57
+ missing.
47
58
  """
48
59
  super().__init__(
49
60
  storage,
50
61
  connection_manager,
51
- auth_handler,
62
+ settings,
63
+ auth_handler=auth_handler,
52
64
  auth_handler_id=auth_handler_id,
53
65
  auth_handler_settings=auth_handler_settings,
54
66
  **kwargs,
55
67
  )
56
- self._alt_blueprint_name = (
57
- auth_handler._alt_blueprint_name if auth_handler else None
58
- )
68
+ self._alt_blueprint_name = self._handler._alt_blueprint_name
59
69
 
60
70
  async def get_agentic_instance_token(self, context: TurnContext) -> TokenResponse:
61
71
  """Gets the agentic instance token for the current agent instance.
@@ -163,17 +173,17 @@ class AgenticUserAuthorization(_AuthorizationHandler):
163
173
  async def _sign_in(
164
174
  self,
165
175
  context: TurnContext,
166
- exchange_connection: Optional[str] = None,
167
- exchange_scopes: Optional[list[str]] = None,
176
+ exchange_connection: str | None = None,
177
+ exchange_scopes: list[str] | None = None,
168
178
  ) -> _SignInResponse:
169
179
  """Retrieves the agentic user token if available.
170
180
 
171
181
  :param context: The context object for the current turn.
172
182
  :type context: TurnContext
173
- :param connection_name: The name of the connection to use for sign-in.
174
- :type connection_name: str
175
- :param scopes: The scopes to request for the token.
176
- :type scopes: Optional[list[str]]
183
+ :param exchange_connection: The name of the connection to use for sign-in.
184
+ :type exchange_connection: str | None
185
+ :param exchange_scopes: The scopes to request for the token.
186
+ :type exchange_scopes: Optional[list[str]]
177
187
  :return: A _SignInResponse containing the token response and flow state tag.
178
188
  :rtype: _SignInResponse
179
189
  """
@@ -189,8 +199,8 @@ class AgenticUserAuthorization(_AuthorizationHandler):
189
199
  async def get_refreshed_token(
190
200
  self,
191
201
  context: TurnContext,
192
- exchange_connection: Optional[str] = None,
193
- exchange_scopes: Optional[list[str]] = None,
202
+ exchange_connection: str | None = None,
203
+ exchange_scopes: list[str] | None = None,
194
204
  ) -> TokenResponse:
195
205
  """Attempts to get a refreshed token for the user with the given scopes
196
206
 
@@ -211,6 +221,6 @@ class AgenticUserAuthorization(_AuthorizationHandler):
211
221
  return await self.get_agentic_user_token(context, exchange_scopes)
212
222
 
213
223
  async def sign_out(
214
- self, context: TurnContext, auth_handler_id: Optional[str] = None
224
+ self, context: TurnContext, auth_handler_id: str | None = None
215
225
  ) -> None:
216
226
  """Nothing to do for agentic sign out."""
@@ -6,7 +6,7 @@ Licensed under the MIT License.
6
6
  import logging
7
7
  import jwt
8
8
  from datetime import datetime, timezone
9
- from typing import Optional
9
+ from typing import Mapping
10
10
 
11
11
  from microsoft_agents.activity import TokenResponse
12
12
  from microsoft_agents.hosting.core.errors import ErrorResources
@@ -15,7 +15,7 @@ from ...._oauth._flow_state import _FlowStateTag
15
15
  from ....turn_context import TurnContext
16
16
  from ....storage import Storage
17
17
  from ....authorization import Connections
18
- from ..auth_handler import AuthHandler
18
+ from ..auth_handler import AuthHandlerSettings
19
19
  from ._authorization_handler import _AuthorizationHandler
20
20
  from .._sign_in_response import _SignInResponse
21
21
 
@@ -32,30 +32,39 @@ class ConnectorUserAuthorization(_AuthorizationHandler):
32
32
  self,
33
33
  storage: Storage,
34
34
  connection_manager: Connections,
35
- auth_handler: Optional[AuthHandler] = None,
35
+ settings: Mapping | AuthHandlerSettings | None = None,
36
36
  *,
37
- auth_handler_id: Optional[str] = None,
38
- auth_handler_settings: Optional[dict] = None,
37
+ auth_handler_id: str | None = None,
38
+ auth_handler: AuthHandlerSettings | None = None,
39
+ auth_handler_settings: dict | None = None,
39
40
  **kwargs,
40
41
  ) -> None:
41
- """
42
- Creates a new instance of ConnectorUserAuthorization.
42
+ """Create a connector authorization strategy.
43
+
44
+ Prefer settings containing an AuthHandlerSettings instance or a mapping.
45
+ Legacy settings arguments remain accepted but emit a DeprecationWarning.
43
46
 
44
47
  :param storage: The storage system to use for state management.
45
48
  :type storage: Storage
46
49
  :param connection_manager: The connection manager for OAuth providers.
47
50
  :type connection_manager: Connections
48
- :param auth_handler: Configuration for OAuth provider.
49
- :type auth_handler: AuthHandler, Optional
50
- :param auth_handler_id: Optional ID of the auth handler.
51
- :type auth_handler_id: str, Optional
52
- :param auth_handler_settings: Optional settings dict for the auth handler.
53
- :type auth_handler_settings: dict, Optional
51
+ :param settings: Handler settings, accepted positionally or by keyword.
52
+ :type settings: Mapping | AuthHandlerSettings | None
53
+ :param auth_handler_id: Optional override of the settings name.
54
+ :type auth_handler_id: str | None
55
+ :param auth_handler: Deprecated bound settings; use settings instead.
56
+ :type auth_handler: AuthHandlerSettings | None
57
+ :param auth_handler_settings: Deprecated mapping; use settings instead.
58
+ :type auth_handler_settings: dict | None
59
+ :param kwargs: Compatibility arguments forwarded to the base handler.
60
+ :raises ValueError: If storage, nonempty settings, or a handler ID is
61
+ missing.
54
62
  """
55
63
  super().__init__(
56
64
  storage,
57
65
  connection_manager,
58
- auth_handler,
66
+ settings,
67
+ auth_handler=auth_handler,
59
68
  auth_handler_id=auth_handler_id,
60
69
  auth_handler_settings=auth_handler_settings,
61
70
  **kwargs,
@@ -64,8 +73,8 @@ class ConnectorUserAuthorization(_AuthorizationHandler):
64
73
  async def _sign_in(
65
74
  self,
66
75
  context: TurnContext,
67
- exchange_connection: Optional[str] = None,
68
- exchange_scopes: Optional[list[str]] = None,
76
+ exchange_connection: str | None = None,
77
+ exchange_scopes: list[str] | None = None,
69
78
  ) -> _SignInResponse:
70
79
  """
71
80
  For connector requests, there is no separate sign-in flow.
@@ -74,9 +83,9 @@ class ConnectorUserAuthorization(_AuthorizationHandler):
74
83
  :param context: The turn context for the current turn of conversation.
75
84
  :type context: TurnContext
76
85
  :param exchange_connection: Optional connection name for token exchange.
77
- :type exchange_connection: Optional[str]
86
+ :type exchange_connection: str | None
78
87
  :param exchange_scopes: Optional list of scopes (unused for connector auth).
79
- :type exchange_scopes: Optional[list[str]]
88
+ :type exchange_scopes: list[str] | None
80
89
  :return: A SignInResponse with the extracted token.
81
90
  :rtype: _SignInResponse
82
91
  """
@@ -89,8 +98,8 @@ class ConnectorUserAuthorization(_AuthorizationHandler):
89
98
  async def get_refreshed_token(
90
99
  self,
91
100
  context: TurnContext,
92
- exchange_connection: Optional[str] = None,
93
- exchange_scopes: Optional[list[str]] = None,
101
+ exchange_connection: str | None = None,
102
+ exchange_scopes: list[str] | None = None,
94
103
  ) -> TokenResponse:
95
104
  """
96
105
  Gets the connector user token and optionally exchanges it via OBO.
@@ -148,8 +157,8 @@ class ConnectorUserAuthorization(_AuthorizationHandler):
148
157
  self,
149
158
  context: TurnContext,
150
159
  input_token_response: TokenResponse,
151
- exchange_connection: Optional[str] = None,
152
- exchange_scopes: Optional[list[str]] = None,
160
+ exchange_connection: str | None = None,
161
+ exchange_scopes: list[str] | None = None,
153
162
  ) -> TokenResponse:
154
163
  """
155
164
  Exchanges a token for another token with different scopes via OBO flow.
@@ -159,9 +168,9 @@ class ConnectorUserAuthorization(_AuthorizationHandler):
159
168
  :param input_token_response: The input token to exchange.
160
169
  :type input_token_response: TokenResponse
161
170
  :param exchange_connection: Optional connection name for exchange.
162
- :type exchange_connection: Optional[str]
171
+ :type exchange_connection: str | None
163
172
  :param exchange_scopes: Optional scopes for the exchanged token.
164
- :type exchange_scopes: Optional[list[str]]
173
+ :type exchange_scopes: list[str] | None
165
174
  :return: The token response after exchange, or the original if exchange not configured.
166
175
  :rtype: TokenResponse
167
176
  """
@@ -0,0 +1,118 @@
1
+ """
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the MIT License.
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ import logging
9
+ import warnings
10
+
11
+ from dataclasses import dataclass, field
12
+
13
+ from microsoft_agents.activity.config import (
14
+ _Configurable,
15
+ Configuration,
16
+ xpath,
17
+ )
18
+
19
+ logger = logging.getLogger(__name__)
20
+
21
+
22
+ def _or_default(s: str | None, default: str) -> str:
23
+ return (s.strip() if s else None) or default
24
+
25
+
26
+ def _create_kwargs(
27
+ name: str | None = None,
28
+ title: str | None = None,
29
+ text: str | None = None,
30
+ abs_oauth_connection_name: str | None = None,
31
+ obo_connection_name: str | None = None,
32
+ auth_type: str | None = None,
33
+ scopes: list[str] | None = None,
34
+ _alt_blueprint_name: str | None = None,
35
+ **kwargs,
36
+ ) -> dict:
37
+ c = Configuration(kwargs)
38
+ return dict(
39
+ name=_or_default(name, c.get_str(xpath("name"), default="")),
40
+ title=_or_default(title, c.get_str(xpath("title"), default="")),
41
+ text=_or_default(text, c.get_str(xpath("text"), default="")),
42
+ abs_oauth_connection_name=_or_default(
43
+ abs_oauth_connection_name,
44
+ c.get_str(xpath("azurebotoauthconnectionname"), default=""),
45
+ ),
46
+ obo_connection_name=_or_default(
47
+ obo_connection_name, c.get_str(xpath("oboconnectionname"), default="")
48
+ ),
49
+ auth_type=_or_default(
50
+ auth_type, c.get_str(xpath("type"), default="UserAuthorization")
51
+ ).lower(),
52
+ scopes=Configuration.format_scopes(scopes or c.get(xpath("scopes"))),
53
+ _alt_blueprint_name=_alt_blueprint_name
54
+ or c.get_strn(xpath("alt_blueprint_name")),
55
+ )
56
+
57
+
58
+ @dataclass
59
+ class AuthHandlerSettings(_Configurable):
60
+ """Settings for one OAuth handler, independent of its runtime strategy.
61
+
62
+ Construct with typed field values, or use ``from_mapping`` to bind
63
+ configuration aliases such as ``AZUREBOTOAUTHCONNECTIONNAME`` and ``TYPE``.
64
+ Mapping binding normalizes the authorization type and accepts scopes as a
65
+ list or a comma/whitespace-separated string. Direct construction expects a
66
+ scope list.
67
+
68
+ :param name: Handler identifier; use the corresponding handlers-mapping key.
69
+ :param title: Sign-in card title.
70
+ :param text: Sign-in card text.
71
+ :param abs_oauth_connection_name: Azure Bot OAuth connection name.
72
+ :param obo_connection_name: SDK connection used for on-behalf-of exchange.
73
+ :param auth_type: UserAuthorization, AgenticUserAuthorization, or
74
+ ConnectorUserAuthorization. Authorization selects these case-insensitively.
75
+ :param scopes: Default scopes for token acquisition or exchange.
76
+ :param _alt_blueprint_name: Optional alternate connection for agentic user
77
+ token acquisition.
78
+ """
79
+
80
+ name: str = ""
81
+ title: str = ""
82
+ text: str = ""
83
+ abs_oauth_connection_name: str = ""
84
+ obo_connection_name: str = ""
85
+ auth_type: str = "userauthorization"
86
+ scopes: list[str] = field(default_factory=list)
87
+ _alt_blueprint_name: str | None = None
88
+
89
+ @classmethod
90
+ def _from_configuration(cls, config: Configuration) -> AuthHandlerSettings:
91
+ return AuthHandlerSettings(**_create_kwargs(**config))
92
+
93
+ @staticmethod
94
+ def _format_scopes(scopes: str | list[str]) -> list[str]:
95
+ if isinstance(scopes, str):
96
+ lst = scopes.strip().split(" ")
97
+ else:
98
+ lst = scopes
99
+ return [s for s in lst if s]
100
+
101
+
102
+ class AuthHandler(AuthHandlerSettings):
103
+ """Deprecated compatibility constructor for AuthHandlerSettings.
104
+
105
+ Accepts legacy positional fields and configuration keyword aliases, and
106
+ emits a DeprecationWarning. Use AuthHandlerSettings for typed construction
107
+ or ``AuthHandlerSettings.from_mapping`` for configuration binding.
108
+ """
109
+
110
+ def __init__(self, *args, **kwargs):
111
+ """Bind legacy arguments and emit the constructor deprecation warning."""
112
+
113
+ warnings.warn(
114
+ "AuthHandler is deprecated. Please use AuthHandlerSettings instead.",
115
+ DeprecationWarning,
116
+ stacklevel=2,
117
+ )
118
+ super().__init__(**_create_kwargs(*args, **kwargs))