Skip to content

Users/axsuarez/sso#20

Merged
axelsrz merged 5 commits intomainfrom
users/axsuarez/sso
Mar 31, 2025
Merged

Users/axsuarez/sso#20
axelsrz merged 5 commits intomainfrom
users/axsuarez/sso

Conversation

@axelsrz
Copy link
Member

@axelsrz axelsrz commented Mar 31, 2025

This pull request introduces several significant changes to the microsoft-agents-builder library, focusing on OAuth flow management, card creation, and state management. The key changes include the addition of new modules for handling OAuth flows and card creation, updates to the ChannelAdapter class, and modifications to the UserTokenClient instantiation.

New Modules:

  • Added BasicOAuthFlow class to manage OAuth flow for Web Chat, including methods for getting OAuth tokens, signing out, and retrieving user state. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/basic_oauth_flow.py)
  • Introduced CardFactory class to create various types of cards (e.g., adaptive, animation, audio, hero, OAuth, receipt, signin, thumbnail, video) with appropriate content types. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/card_factory.py)

Updates to __init__.py:

  • Updated __init__.py to include BasicOAuthFlow and CardFactory in the module exports. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/__init__.py) [1] [2]

Channel Adapter Enhancements:

  • Added new keys (CONNECTOR_FACTORY_KEY, USER_TOKEN_CLIENT_KEY, AGENT_CALLBACK_HANDLER_KEY, CHANNEL_SERVICE_FACTORY_KEY) to the ChannelAdapter class for better handling of connectors and token clients. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/channel_adapter.py)
  • Removed redundant key definitions from the ChannelServiceAdapter class. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/channel_service_adapter.py)

User Token Client Modification:

  • Updated the create_user_token_client method to include additional parameters (credential_resource_url, credential_scopes) for better token management. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/rest_channel_service_client_factory.py)

State Management:

  • Added imports for AgentState, StatePropertyAccessor, and UserState to the state management module's __init__.py file. (libraries/Builder/microsoft-agents-builder/microsoft/agents/builder/state/__init__.py)

@axelsrz axelsrz merged commit 74825e8 into main Mar 31, 2025
5 checks passed
@axelsrz axelsrz deleted the users/axsuarez/sso branch March 31, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments