SharePointSSOTokenExchangeMiddleware Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
If the activity name is cardExtension/token, this middleware will attempt to exchange the token, and deduplicate the incoming call, ensuring only one exchange request is processed.
public class SharePointSSOTokenExchangeMiddleware
type SharePointSSOTokenExchangeMiddleware = class
Public Class SharePointSSOTokenExchangeMiddleware
- Inheritance
-
SharePointSSOTokenExchangeMiddleware
Remarks
If a user is signed into multiple devices, the Bot could receive a "signin/tokenExchange" from each client. Each token exchange request for a specific user login will have an identical Activity.Value.Id.
Only one of these token exchange requests should be processed by the bot. The others return PreconditionFailed. For a distributed bot in production, this requires a distributed storage ensuring only one token exchange is processed. This middleware supports CosmosDb storage found in Microsoft.Bot.Builder.Azure, or MemoryStorage for local development. IStorage's ETag implementation for token exchange activity deduplication.
Constructors
SharePointSSOTokenExchangeMiddleware(IStorage, String) |
Initializes a new instance of the SharePointSSOTokenExchangeMiddleware class. |
Methods
OnTurnAsync(ITurnContext, CancellationToken) |
Handles a turn. |