Split apps Core around authenticated transports#609
Draft
heyitsaamir wants to merge 2 commits into
Draft
Conversation
8432a6c to
93a3924
Compare
93a3924 to
2f46656
Compare
55eb7de to
c7f35c2
Compare
bf68e5a to
84cbefd
Compare
fadde96 to
66b1606
Compare
5d80aa7 to
60a64c9
Compare
66b1606 to
ffe8923
Compare
60a64c9 to
fd82379
Compare
c66232a to
69bc187
Compare
3825046 to
c13f455
Compare
c13f455 to
727f558
Compare
69bc187 to
92f1340
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One liner: add an internal Core runtime for apps and move auth-aware transport setup behind it.
Stacking note: this is stacked on the BotBuilder HTTP adapter PR. That lower PR removes the BotBuilder plugin/server-DI pressure so this Core split can stay focused on App/Core responsibilities.
Why: App was doing runtime setup, token wiring, server setup, and typed client construction all in one place. This splits the boring plumbing out so App can stay focused on Teams behavior like activities, OAuth, ApiClient, and GraphClient.
Core's job, in principle:
App's job stays:
flowchart LR Teams[Teams/Bot Framework] -->|incoming HTTP activity| Core subgraph Core[Core: runtime + auth] Inbound[Inbound HTTP transport] InboundAuth[Inbound auth validation] Dispatch[Dispatch to App handler] Outbound[Authenticated HttpClient factory] Token[TokenManager / authorize hook] Inbound --> InboundAuth --> Dispatch Token --> Outbound end subgraph App[App: Teams semantics] Handler[Activity processing/routing] Sender[Send/reply/stream] OAuth[OAuth + user token flow] TypedClients[ApiClient / GraphClient construction] end Dispatch --> Handler Handler --> Sender Handler --> OAuth Handler --> TypedClients Sender --> TypedClients TypedClients -->|bot/app Graph transport| Outbound Outbound -->|outbound HTTP calls| Teams Outbound -->|outbound Graph calls| Graph[Microsoft Graph]Interesting bits:
Reviewer tips:
Testing: