@microsoft/agents-hosting 1.1.0-alpha.5 → 1.1.0-alpha.58

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 (139) hide show
  1. package/dist/package.json +10 -6
  2. package/dist/src/activityWireCompat.js +8 -3
  3. package/dist/src/activityWireCompat.js.map +1 -1
  4. package/dist/src/agent-client/agentClient.js +7 -3
  5. package/dist/src/agent-client/agentClient.js.map +1 -1
  6. package/dist/src/agent-client/agentResponseHandler.js +6 -2
  7. package/dist/src/agent-client/agentResponseHandler.js.map +1 -1
  8. package/dist/src/app/agentApplication.d.ts +26 -11
  9. package/dist/src/app/agentApplication.js +93 -82
  10. package/dist/src/app/agentApplication.js.map +1 -1
  11. package/dist/src/app/agentApplicationBuilder.d.ts +2 -2
  12. package/dist/src/app/agentApplicationBuilder.js.map +1 -1
  13. package/dist/src/app/agentApplicationOptions.d.ts +9 -2
  14. package/dist/src/app/appRoute.d.ts +7 -0
  15. package/dist/src/app/{authorization.d.ts → auth/authorization.d.ts} +33 -139
  16. package/dist/src/app/auth/authorization.js +188 -0
  17. package/dist/src/app/auth/authorization.js.map +1 -0
  18. package/dist/src/app/auth/authorizationManager.d.ts +71 -0
  19. package/dist/src/app/auth/authorizationManager.js +170 -0
  20. package/dist/src/app/auth/authorizationManager.js.map +1 -0
  21. package/dist/src/app/auth/handlerStorage.d.ts +36 -0
  22. package/dist/src/app/auth/handlerStorage.js +62 -0
  23. package/dist/src/app/auth/handlerStorage.js.map +1 -0
  24. package/dist/src/app/auth/handlers/agenticAuthorization.d.ts +97 -0
  25. package/dist/src/app/auth/handlers/agenticAuthorization.js +145 -0
  26. package/dist/src/app/auth/handlers/agenticAuthorization.js.map +1 -0
  27. package/dist/src/app/auth/handlers/azureBotAuthorization.d.ts +222 -0
  28. package/dist/src/app/auth/handlers/azureBotAuthorization.js +428 -0
  29. package/dist/src/app/auth/handlers/azureBotAuthorization.js.map +1 -0
  30. package/dist/src/app/auth/handlers/index.d.ts +2 -0
  31. package/dist/src/app/auth/handlers/index.js +19 -0
  32. package/dist/src/app/auth/handlers/index.js.map +1 -0
  33. package/dist/src/app/auth/index.d.ts +2 -0
  34. package/dist/src/app/auth/index.js +19 -0
  35. package/dist/src/app/auth/index.js.map +1 -0
  36. package/dist/src/app/auth/types.d.ts +104 -0
  37. package/dist/src/app/auth/types.js +24 -0
  38. package/dist/src/app/auth/types.js.map +1 -0
  39. package/dist/src/app/index.d.ts +2 -3
  40. package/dist/src/app/index.js +2 -3
  41. package/dist/src/app/index.js.map +1 -1
  42. package/dist/src/app/routeList.d.ts +1 -1
  43. package/dist/src/app/routeList.js +22 -5
  44. package/dist/src/app/routeList.js.map +1 -1
  45. package/dist/src/app/streaming/streamingResponse.js +2 -1
  46. package/dist/src/app/streaming/streamingResponse.js.map +1 -1
  47. package/dist/src/auth/MemoryCache.d.ts +16 -0
  48. package/dist/src/auth/MemoryCache.js +58 -0
  49. package/dist/src/auth/MemoryCache.js.map +1 -0
  50. package/dist/src/auth/authConfiguration.d.ts +44 -2
  51. package/dist/src/auth/authConfiguration.js +218 -53
  52. package/dist/src/auth/authConfiguration.js.map +1 -1
  53. package/dist/src/auth/authConstants.d.ts +11 -0
  54. package/dist/src/auth/authConstants.js +15 -0
  55. package/dist/src/auth/authConstants.js.map +1 -0
  56. package/dist/src/auth/authProvider.d.ts +23 -0
  57. package/dist/src/auth/connections.d.ts +40 -0
  58. package/dist/src/auth/connections.js +7 -0
  59. package/dist/src/auth/connections.js.map +1 -0
  60. package/dist/src/auth/index.d.ts +2 -0
  61. package/dist/src/auth/index.js +2 -0
  62. package/dist/src/auth/index.js.map +1 -1
  63. package/dist/src/auth/jwt-middleware.js +31 -18
  64. package/dist/src/auth/jwt-middleware.js.map +1 -1
  65. package/dist/src/auth/msalConnectionManager.d.ts +63 -0
  66. package/dist/src/auth/msalConnectionManager.js +124 -0
  67. package/dist/src/auth/msalConnectionManager.js.map +1 -0
  68. package/dist/src/auth/msalTokenProvider.d.ts +31 -0
  69. package/dist/src/auth/msalTokenProvider.js +167 -16
  70. package/dist/src/auth/msalTokenProvider.js.map +1 -1
  71. package/dist/src/baseAdapter.d.ts +10 -25
  72. package/dist/src/baseAdapter.js +2 -15
  73. package/dist/src/baseAdapter.js.map +1 -1
  74. package/dist/src/cloudAdapter.d.ts +40 -23
  75. package/dist/src/cloudAdapter.js +132 -56
  76. package/dist/src/cloudAdapter.js.map +1 -1
  77. package/dist/src/connector-client/connectorClient.d.ts +9 -0
  78. package/dist/src/connector-client/connectorClient.js +39 -9
  79. package/dist/src/connector-client/connectorClient.js.map +1 -1
  80. package/dist/src/index.d.ts +0 -1
  81. package/dist/src/index.js +0 -1
  82. package/dist/src/index.js.map +1 -1
  83. package/dist/src/oauth/index.d.ts +0 -1
  84. package/dist/src/oauth/index.js +0 -1
  85. package/dist/src/oauth/index.js.map +1 -1
  86. package/dist/src/oauth/userTokenClient.d.ts +30 -13
  87. package/dist/src/oauth/userTokenClient.js +64 -26
  88. package/dist/src/oauth/userTokenClient.js.map +1 -1
  89. package/dist/src/oauth/userTokenClient.types.d.ts +19 -6
  90. package/dist/src/turnContext.d.ts +7 -1
  91. package/dist/src/turnContext.js +11 -4
  92. package/dist/src/turnContext.js.map +1 -1
  93. package/package.json +10 -6
  94. package/src/activityWireCompat.ts +8 -3
  95. package/src/agent-client/agentClient.ts +9 -3
  96. package/src/agent-client/agentResponseHandler.ts +5 -2
  97. package/src/app/agentApplication.ts +97 -75
  98. package/src/app/agentApplicationBuilder.ts +2 -2
  99. package/src/app/agentApplicationOptions.ts +10 -2
  100. package/src/app/appRoute.ts +8 -0
  101. package/src/app/auth/authorization.ts +252 -0
  102. package/src/app/auth/authorizationManager.ts +213 -0
  103. package/src/app/auth/handlerStorage.ts +61 -0
  104. package/src/app/auth/handlers/agenticAuthorization.ts +194 -0
  105. package/src/app/auth/handlers/azureBotAuthorization.ts +599 -0
  106. package/src/app/auth/handlers/index.ts +2 -0
  107. package/src/app/auth/index.ts +2 -0
  108. package/src/app/auth/types.ts +111 -0
  109. package/src/app/index.ts +2 -3
  110. package/src/app/routeList.ts +24 -5
  111. package/src/app/streaming/streamingResponse.ts +2 -1
  112. package/src/auth/MemoryCache.ts +59 -0
  113. package/src/auth/authConfiguration.ts +258 -52
  114. package/src/auth/authConstants.ts +11 -0
  115. package/src/auth/authProvider.ts +31 -0
  116. package/src/auth/connections.ts +46 -0
  117. package/src/auth/index.ts +2 -0
  118. package/src/auth/jwt-middleware.ts +38 -21
  119. package/src/auth/msalConnectionManager.ts +150 -0
  120. package/src/auth/msalTokenProvider.ts +209 -9
  121. package/src/baseAdapter.ts +10 -29
  122. package/src/cloudAdapter.ts +192 -67
  123. package/src/connector-client/connectorClient.ts +49 -10
  124. package/src/index.ts +0 -1
  125. package/src/oauth/index.ts +0 -1
  126. package/src/oauth/userTokenClient.ts +79 -23
  127. package/src/oauth/userTokenClient.types.ts +20 -8
  128. package/src/turnContext.ts +16 -5
  129. package/dist/src/app/authorization.js +0 -387
  130. package/dist/src/app/authorization.js.map +0 -1
  131. package/dist/src/claimsIdentity.d.ts +0 -35
  132. package/dist/src/claimsIdentity.js +0 -43
  133. package/dist/src/claimsIdentity.js.map +0 -1
  134. package/dist/src/oauth/oAuthFlow.d.ts +0 -119
  135. package/dist/src/oauth/oAuthFlow.js +0 -316
  136. package/dist/src/oauth/oAuthFlow.js.map +0 -1
  137. package/src/app/authorization.ts +0 -432
  138. package/src/claimsIdentity.ts +0 -47
  139. package/src/oauth/oAuthFlow.ts +0 -378
@@ -1,387 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.Authorization = void 0;
11
- const logger_1 = require("@microsoft/agents-activity/logger");
12
- const oauth_1 = require("../oauth");
13
- const auth_1 = require("../auth");
14
- const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
15
- const logger = (0, logger_1.debug)('agents:authorization');
16
- /**
17
- * Class responsible for managing authorization and OAuth flows.
18
- * Handles multiple OAuth providers and manages the complete authentication lifecycle.
19
- *
20
- * @remarks
21
- * The Authorization class provides a centralized way to handle OAuth authentication
22
- * flows within the agent application. It supports multiple authentication handlers,
23
- * token exchange, on-behalf-of flows, and provides event handlers for success/failure scenarios.
24
- *
25
- * Key features:
26
- * - Multiple OAuth provider support
27
- * - Token caching and exchange
28
- * - On-behalf-of (OBO) token flows
29
- * - Sign-in success/failure event handling
30
- * - Automatic configuration from environment variables
31
- *
32
- * @example
33
- * ```typescript
34
- * const auth = new Authorization(storage, {
35
- * 'microsoft': {
36
- * name: 'Microsoft',
37
- * title: 'Sign in with Microsoft',
38
- * text: 'Please sign in'
39
- * }
40
- * });
41
- *
42
- * auth.onSignInSuccess(async (context, state) => {
43
- * await context.sendActivity('Welcome! You are now signed in.');
44
- * });
45
- * ```
46
- *
47
- */
48
- class Authorization {
49
- /**
50
- * Creates a new instance of Authorization.
51
- *
52
- * @remarks
53
- * The constructor initializes all configured auth handlers and sets up OAuth flows.
54
- * It automatically configures handler properties from environment variables if not provided:
55
- * - Connection name: {handlerId}_connectionName
56
- * - Connection title: {handlerId}_connectionTitle
57
- * - Connection text: {handlerId}_connectionText
58
- *
59
- * @example
60
- * ```typescript
61
- * const auth = new Authorization(storage, {
62
- * 'microsoft': {
63
- * name: 'Microsoft',
64
- * title: 'Sign in with Microsoft'
65
- * },
66
- * 'google': {
67
- * // Will use GOOGLE_connectionName from env vars
68
- * }
69
- * });
70
- * ```
71
- *
72
- * @param storage - The storage system to use for state management.
73
- * @param authHandlers - Configuration for OAuth providers.
74
- * @throws {Error} If storage is null/undefined or no auth handlers are provided.
75
- *
76
- */
77
- constructor(storage, authHandlers, userTokenClient) {
78
- var _a, _b, _c, _d;
79
- this.storage = storage;
80
- /**
81
- * Private handler for successful sign-in events.
82
- * @private
83
- */
84
- this._signInSuccessHandler = null;
85
- /**
86
- * Private handler for failed sign-in events.
87
- * @private
88
- */
89
- this._signInFailureHandler = null;
90
- if (storage === undefined || storage === null) {
91
- throw new Error('Storage is required for UserAuthorization');
92
- }
93
- if (authHandlers === undefined || Object.keys(authHandlers).length === 0) {
94
- throw new Error('The authorization does not have any auth handlers');
95
- }
96
- this.authHandlers = authHandlers;
97
- for (const ah in this.authHandlers) {
98
- if (this.authHandlers[ah].name === undefined && process.env[ah + '_connectionName'] === undefined) {
99
- throw new Error(`AuthHandler name ${ah}_connectionName not set in autorization and not found in env vars.`);
100
- }
101
- const currentAuthHandler = this.authHandlers[ah];
102
- currentAuthHandler.name = (_a = currentAuthHandler.name) !== null && _a !== void 0 ? _a : process.env[ah + '_connectionName'];
103
- currentAuthHandler.title = (_b = currentAuthHandler.title) !== null && _b !== void 0 ? _b : process.env[ah + '_connectionTitle'];
104
- currentAuthHandler.text = (_c = currentAuthHandler.text) !== null && _c !== void 0 ? _c : process.env[ah + '_connectionText'];
105
- currentAuthHandler.cnxPrefix = (_d = currentAuthHandler.cnxPrefix) !== null && _d !== void 0 ? _d : process.env[ah + '_cnxPrefix'];
106
- currentAuthHandler.flow = new oauth_1.OAuthFlow(this.storage, currentAuthHandler.name, userTokenClient, currentAuthHandler.title, currentAuthHandler.text);
107
- }
108
- logger.info('Authorization handlers configured with', Object.keys(this.authHandlers).length, 'handlers');
109
- }
110
- /**
111
- * Gets the token for a specific auth handler.
112
- *
113
- * @param context - The context object for the current turn.
114
- * @param authHandlerId - ID of the auth handler to use.
115
- * @returns A promise that resolves to the token response from the OAuth provider.
116
- * @throws {Error} If the auth handler is not configured.
117
- *
118
- * @remarks
119
- * This method retrieves an existing token for the specified auth handler.
120
- * The token may be cached and will be retrieved from the OAuth provider if needed.
121
- *
122
- * @example
123
- * ```typescript
124
- * const tokenResponse = await auth.getToken(context, 'microsoft');
125
- * if (tokenResponse.token) {
126
- * console.log('User is authenticated');
127
- * }
128
- * ```
129
- *
130
- * @public
131
- */
132
- async getToken(context, authHandlerId) {
133
- var _a;
134
- logger.info('getToken from user token service for authHandlerId:', authHandlerId);
135
- const authHandler = this.getAuthHandlerOrThrow(authHandlerId);
136
- return await ((_a = authHandler.flow) === null || _a === void 0 ? void 0 : _a.getUserToken(context));
137
- }
138
- /**
139
- * Gets the auth handler by ID or throws an error if not found.
140
- *
141
- * @param authHandlerId - ID of the auth handler to retrieve.
142
- * @returns The auth handler instance.
143
- * @throws {Error} If the auth handler with the specified ID is not configured.
144
- * @private
145
- */
146
- getAuthHandlerOrThrow(authHandlerId) {
147
- if (!Object.prototype.hasOwnProperty.call(this.authHandlers, authHandlerId)) {
148
- throw new Error(`AuthHandler with ID ${authHandlerId} not configured`);
149
- }
150
- return this.authHandlers[authHandlerId];
151
- }
152
- /**
153
- * Exchanges a token for a new token with different scopes.
154
- *
155
- * @param context - The context object for the current turn.
156
- * @param scopes - Array of scopes to request for the new token.
157
- * @param authHandlerId - ID of the auth handler to use.
158
- * @returns A promise that resolves to the exchanged token response.
159
- * @throws {Error} If the auth handler is not configured.
160
- *
161
- * @remarks
162
- * This method handles token exchange scenarios, particularly for on-behalf-of (OBO) flows.
163
- * It checks if the current token is exchangeable (e.g., has audience starting with 'api://')
164
- * and performs the appropriate token exchange using MSAL.
165
- *
166
- * @example
167
- * ```typescript
168
- * const exchangedToken = await auth.exchangeToken(
169
- * context,
170
- * ['https://graph.microsoft.com/.default'],
171
- * 'microsoft'
172
- * );
173
- * ```
174
- *
175
- * @public
176
- */
177
- async exchangeToken(context, scopes, authHandlerId) {
178
- var _a;
179
- logger.info('exchangeToken from user token service for authHandlerId:', authHandlerId);
180
- const authHandler = this.getAuthHandlerOrThrow(authHandlerId);
181
- const tokenResponse = await ((_a = authHandler.flow) === null || _a === void 0 ? void 0 : _a.getUserToken(context));
182
- if (this.isExchangeable(tokenResponse.token)) {
183
- return await this.handleObo(context, tokenResponse.token, scopes, authHandler.cnxPrefix);
184
- }
185
- return tokenResponse;
186
- }
187
- /**
188
- * Checks if a token is exchangeable for an on-behalf-of flow.
189
- *
190
- * @param token - The token to check.
191
- * @returns True if the token is exchangeable, false otherwise.
192
- * @private
193
- */
194
- isExchangeable(token) {
195
- var _a;
196
- if (!token || typeof token !== 'string') {
197
- return false;
198
- }
199
- const payload = jsonwebtoken_1.default.decode(token);
200
- return ((_a = payload === null || payload === void 0 ? void 0 : payload.aud) === null || _a === void 0 ? void 0 : _a.indexOf('api://')) === 0;
201
- }
202
- /**
203
- * Handles on-behalf-of token exchange using MSAL.
204
- *
205
- * @param context - The context object for the current turn.
206
- * @param token - The token to exchange.
207
- * @param scopes - Array of scopes to request for the new token.
208
- * @returns A promise that resolves to the exchanged token response.
209
- * @private
210
- */
211
- async handleObo(context, token, scopes, cnxPrefix) {
212
- const msalTokenProvider = new auth_1.MsalTokenProvider();
213
- let authConfig = context.adapter.authConfig;
214
- if (cnxPrefix) {
215
- authConfig = (0, auth_1.loadAuthConfigFromEnv)(cnxPrefix);
216
- }
217
- const newToken = await msalTokenProvider.acquireTokenOnBehalfOf(authConfig, scopes, token);
218
- return { token: newToken };
219
- }
220
- /**
221
- * Begins or continues an OAuth flow.
222
- *
223
- * @param context - The context object for the current turn.
224
- * @param state - The state object for the current turn.
225
- * @param authHandlerId - ID of the auth handler to use.
226
- * @returns A promise that resolves to the token response from the OAuth provider.
227
- * @throws {Error} If the auth handler is not configured.
228
- *
229
- * @remarks
230
- * This method manages the complete OAuth authentication flow:
231
- * - If no flow is active, it begins a new OAuth flow and shows the sign-in card
232
- * - If a flow is active, it continues the flow and processes the authentication response
233
- * - Handles success/failure callbacks and updates the sign-in state accordingly
234
- *
235
- * The method automatically manages the sign-in state and continuation activities,
236
- * allowing the conversation to resume after successful authentication.
237
- *
238
- * @example
239
- * ```typescript
240
- * const tokenResponse = await auth.beginOrContinueFlow(context, state, 'microsoft');
241
- * if (tokenResponse && tokenResponse.token) {
242
- * // User is now authenticated
243
- * await context.sendActivity('Authentication successful!');
244
- * }
245
- * ```
246
- *
247
- * @public
248
- */
249
- async beginOrContinueFlow(context, state, authHandlerId, secRoute = true) {
250
- var _a, _b, _c, _d, _e;
251
- const authHandler = this.getAuthHandlerOrThrow(authHandlerId);
252
- logger.info('beginOrContinueFlow for authHandlerId:', authHandlerId);
253
- const signInState = state.getValue('user.__SIGNIN_STATE_') || { continuationActivity: undefined, handlerId: undefined, completed: false };
254
- const flow = authHandler.flow;
255
- let tokenResponse;
256
- tokenResponse = await ((_a = authHandler.flow) === null || _a === void 0 ? void 0 : _a.getUserToken(context));
257
- if ((tokenResponse === null || tokenResponse === void 0 ? void 0 : tokenResponse.token) && tokenResponse.token.length > 0) {
258
- (_b = authHandler.flow) === null || _b === void 0 ? true : delete _b.state.eTag;
259
- authHandler.flow.state.flowStarted = false;
260
- await ((_c = authHandler.flow) === null || _c === void 0 ? void 0 : _c.setFlowState(context, authHandler.flow.state));
261
- if (secRoute) {
262
- return tokenResponse;
263
- }
264
- }
265
- if (flow.state === null || ((_d = flow.state) === null || _d === void 0 ? void 0 : _d.flowStarted) === false || ((_e = flow.state) === null || _e === void 0 ? void 0 : _e.flowStarted) === undefined) {
266
- tokenResponse = await flow.beginFlow(context);
267
- if (secRoute && (tokenResponse === null || tokenResponse === void 0 ? void 0 : tokenResponse.token) === undefined) {
268
- signInState.continuationActivity = context.activity;
269
- signInState.handlerId = authHandlerId;
270
- state.setValue('user.__SIGNIN_STATE_', signInState);
271
- }
272
- }
273
- else {
274
- tokenResponse = await flow.continueFlow(context);
275
- if (tokenResponse && tokenResponse.token) {
276
- if (this._signInSuccessHandler) {
277
- await this._signInSuccessHandler(context, state, authHandlerId);
278
- }
279
- if (secRoute) {
280
- state.deleteValue('user.__SIGNIN_STATE_');
281
- }
282
- }
283
- else {
284
- logger.warn('Failed to complete OAuth flow, no token received');
285
- if (this._signInFailureHandler) {
286
- await this._signInFailureHandler(context, state, authHandlerId, 'Failed to complete the OAuth flow');
287
- }
288
- // signInState!.completed = false
289
- // state.setValue('user.__SIGNIN_STATE_', signInState)
290
- }
291
- }
292
- return tokenResponse;
293
- }
294
- /**
295
- * Signs out the current user.
296
- *
297
- * @param context - The context object for the current turn.
298
- * @param state - The state object for the current turn.
299
- * @param authHandlerId - Optional ID of the auth handler to use for sign out. If not provided, signs out from all handlers.
300
- * @returns A promise that resolves when sign out is complete.
301
- * @throws {Error} If the specified auth handler is not configured.
302
- *
303
- * @remarks
304
- * This method clears the user's token and resets the authentication state.
305
- * If no specific authHandlerId is provided, it signs out from all configured handlers.
306
- * This ensures complete cleanup of authentication state across all providers.
307
- *
308
- * @example
309
- * ```typescript
310
- * // Sign out from specific handler
311
- * await auth.signOut(context, state, 'microsoft');
312
- *
313
- * // Sign out from all handlers
314
- * await auth.signOut(context, state);
315
- * ```
316
- *
317
- * @public
318
- */
319
- async signOut(context, state, authHandlerId) {
320
- var _a;
321
- logger.info('signOut for authHandlerId:', authHandlerId);
322
- if (authHandlerId === undefined) { // aw
323
- for (const ah in this.authHandlers) {
324
- const flow = this.authHandlers[ah].flow;
325
- await (flow === null || flow === void 0 ? void 0 : flow.signOut(context));
326
- }
327
- }
328
- else {
329
- const authHandler = this.getAuthHandlerOrThrow(authHandlerId);
330
- await ((_a = authHandler.flow) === null || _a === void 0 ? void 0 : _a.signOut(context));
331
- }
332
- }
333
- /**
334
- * Sets a handler to be called when sign-in is successfully completed.
335
- *
336
- * @param handler - The handler function to call on successful sign-in.
337
- *
338
- * @remarks
339
- * This method allows you to register a callback that will be invoked whenever
340
- * a user successfully completes the authentication process. The handler receives
341
- * the turn context, state, and the ID of the auth handler that was used.
342
- *
343
- * @example
344
- * ```typescript
345
- * auth.onSignInSuccess(async (context, state, authHandlerId) => {
346
- * await context.sendActivity(`Welcome! You signed in using ${authHandlerId}.`);
347
- * // Perform any post-authentication setup
348
- * });
349
- * ```
350
- *
351
- * @public
352
- */
353
- onSignInSuccess(handler) {
354
- this._signInSuccessHandler = handler;
355
- }
356
- /**
357
- * Sets a handler to be called when sign-in fails.
358
- *
359
- * @param handler - The handler function to call on sign-in failure.
360
- *
361
- * @remarks
362
- * This method allows you to register a callback that will be invoked whenever
363
- * a user's authentication attempt fails. The handler receives the turn context,
364
- * state, auth handler ID, and an optional error message describing the failure.
365
- *
366
- * Common failure scenarios include:
367
- * - User cancels the authentication process
368
- * - Invalid credentials or expired tokens
369
- * - Network connectivity issues
370
- * - OAuth provider errors
371
- *
372
- * @example
373
- * ```typescript
374
- * auth.onSignInFailure(async (context, state, authHandlerId, errorMessage) => {
375
- * await context.sendActivity(`Sign-in failed: ${errorMessage || 'Unknown error'}`);
376
- * await context.sendActivity('Please try signing in again.');
377
- * });
378
- * ```
379
- *
380
- * @public
381
- */
382
- onSignInFailure(handler) {
383
- this._signInFailureHandler = handler;
384
- }
385
- }
386
- exports.Authorization = Authorization;
387
- //# sourceMappingURL=authorization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorization.js","sourceRoot":"","sources":["../../../src/app/authorization.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAGH,8DAAyD;AAGzD,oCAAoE;AACpE,kCAAqF;AACrF,gEAA8C;AAG9C,MAAM,MAAM,GAAG,IAAA,cAAK,EAAC,sBAAsB,CAAC,CAAA;AAuC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,aAAa;IAOxB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAqB,OAAgB,EAAE,YAAmC,EAAE,eAAgC;;QAAvF,YAAO,GAAP,OAAO,CAAS;QAsPrC;;;WAGG;QACH,0BAAqB,GAA+F,IAAI,CAAA;QA0BxH;;;WAGG;QACH,0BAAqB,GAAsH,IAAI,CAAA;QAvR7I,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YAC9C,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;QAC9D,CAAC;QACD,IAAI,YAAY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M,WAAW,GAAG,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAA;YAC7D,MAAM,CAAA,MAAA,WAAW,CAAC,IAAI,0CAAE,OAAO,CAAC,OAAO,CAAC,CAAA,CAAA;QAC1C,CAAC;IACH,CAAC;IAQD;;;;;;;;;;;;;;;;;;;OAmBG;IACI,eAAe,CAAE,OAA0F;QAChH,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAA;IACtC,CAAC;IAQD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,eAAe,CAAE,OAAiH;QACvI,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAA;IACtC,CAAC;CACF;AA1VD,sCA0VC"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- /**
6
- * Represents a claim with a type and value.
7
- */
8
- export interface Claim {
9
- readonly type: string;
10
- readonly value: string;
11
- }
12
- /**
13
- * Represents an identity with a collection of claims.
14
- */
15
- export declare class ClaimsIdentity {
16
- readonly claims: Claim[];
17
- private readonly authenticationType?;
18
- /**
19
- * Creates a new instance of the ClaimsIdentity class.
20
- * @param claims The collection of claims associated with the identity.
21
- * @param authenticationType The type of authentication used, or a boolean indicating if the identity is authenticated.
22
- */
23
- constructor(claims: Claim[], authenticationType?: string | boolean | undefined);
24
- /**
25
- * Indicates whether the identity is authenticated.
26
- * @returns True if the identity is authenticated; otherwise, false.
27
- */
28
- get isAuthenticated(): boolean;
29
- /**
30
- * Gets the value of a claim by its type.
31
- * @param claimType The type of the claim to retrieve.
32
- * @returns The value of the claim, or null if the claim is not found.
33
- */
34
- getClaimValue(claimType: string): string | null;
35
- }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ClaimsIdentity = void 0;
8
- /**
9
- * Represents an identity with a collection of claims.
10
- */
11
- class ClaimsIdentity {
12
- /**
13
- * Creates a new instance of the ClaimsIdentity class.
14
- * @param claims The collection of claims associated with the identity.
15
- * @param authenticationType The type of authentication used, or a boolean indicating if the identity is authenticated.
16
- */
17
- constructor(claims, authenticationType) {
18
- this.claims = claims;
19
- this.authenticationType = authenticationType;
20
- }
21
- /**
22
- * Indicates whether the identity is authenticated.
23
- * @returns True if the identity is authenticated; otherwise, false.
24
- */
25
- get isAuthenticated() {
26
- if (typeof this.authenticationType === 'boolean') {
27
- return this.authenticationType;
28
- }
29
- return this.authenticationType != null;
30
- }
31
- /**
32
- * Gets the value of a claim by its type.
33
- * @param claimType The type of the claim to retrieve.
34
- * @returns The value of the claim, or null if the claim is not found.
35
- */
36
- getClaimValue(claimType) {
37
- var _a;
38
- const claim = this.claims.find((c) => c.type === claimType);
39
- return (_a = claim === null || claim === void 0 ? void 0 : claim.value) !== null && _a !== void 0 ? _a : null;
40
- }
41
- }
42
- exports.ClaimsIdentity = ClaimsIdentity;
43
- //# sourceMappingURL=claimsIdentity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claimsIdentity.js","sourceRoot":"","sources":["../../src/claimsIdentity.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH;;GAEG;AACH,MAAa,cAAc;IACzB;;;;OAIG;IACH,YAA6B,MAAe,EAAmB,kBAAqC;QAAvE,WAAM,GAAN,MAAM,CAAS;QAAmB,uBAAkB,GAAlB,kBAAkB,CAAmB;IAAG,CAAC;IAExG;;;OAGG;IACH,IAAI,eAAe;QACjB,IAAI,OAAO,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YACjD,OAAO,IAAI,CAAC,kBAAkB,CAAA;QAChC,CAAC;QAED,OAAO,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAA;IACxC,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAE,SAAiB;;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAA;QAE3D,OAAO,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,mCAAI,IAAI,CAAA;IAC7B,CAAC;CACF;AA9BD,wCA8BC"}
@@ -1,119 +0,0 @@
1
- import { Activity } from '@microsoft/agents-activity';
2
- import { TurnContext, Storage } from '../';
3
- import { UserTokenClient } from './userTokenClient';
4
- import { TokenResponse } from './userTokenClient.types';
5
- /**
6
- * Represents the state of the OAuth flow.
7
- * @interface FlowState
8
- */
9
- export interface FlowState {
10
- /** Indicates whether the OAuth flow has been started */
11
- flowStarted: boolean | undefined;
12
- /** Timestamp when the OAuth flow expires (in milliseconds since epoch) */
13
- flowExpires: number | undefined;
14
- /** The absolute OAuth connection name used for the flow, null if not set */
15
- absOauthConnectionName: string;
16
- /** Optional activity to continue the flow with, used for multi-turn scenarios */
17
- continuationActivity?: Activity | null;
18
- eTag?: string;
19
- }
20
- /**
21
- * Manages the OAuth flow
22
- */
23
- export declare class OAuthFlow {
24
- private storage;
25
- /**
26
- * The user token client used for managing user tokens.
27
- */
28
- userTokenClient: UserTokenClient;
29
- /**
30
- * The current state of the OAuth flow.
31
- */
32
- state: FlowState;
33
- /**
34
- * The ID of the token exchange request, used to deduplicate requests.
35
- */
36
- tokenExchangeId: string | null;
37
- /**
38
- * In-memory cache for tokens with expiration.
39
- */
40
- private tokenCache;
41
- /**
42
- * The name of the OAuth connection.
43
- */
44
- absOauthConnectionName: string;
45
- /**
46
- * The title of the OAuth card.
47
- */
48
- cardTitle: string;
49
- /**
50
- * The text of the OAuth card.
51
- */
52
- cardText: string;
53
- /**
54
- * Creates a new instance of OAuthFlow.
55
- * @param storage The storage provider for persisting flow state.
56
- * @param absOauthConnectionName The absolute OAuth connection name.
57
- * @param tokenClient Optional user token client. If not provided, will be initialized automatically.
58
- * @param cardTitle Optional title for the OAuth card. Defaults to 'Sign in'.
59
- * @param cardText Optional text for the OAuth card. Defaults to 'login'.
60
- */
61
- constructor(storage: Storage, absOauthConnectionName: string, tokenClient: UserTokenClient, cardTitle?: string, cardText?: string);
62
- /**
63
- * Retrieves the user token from the user token service with in-memory caching for 10 minutes.
64
- * @param context The turn context containing the activity information.
65
- * @returns A promise that resolves to the user token response.
66
- * @throws Will throw an error if the channelId or from properties are not set in the activity.
67
- */
68
- getUserToken(context: TurnContext): Promise<TokenResponse>;
69
- /**
70
- * Begins the OAuth flow.
71
- * @param context The turn context.
72
- * @returns A promise that resolves to the user token if available, or undefined if OAuth flow needs to be started.
73
- */
74
- beginFlow(context: TurnContext): Promise<TokenResponse | undefined>;
75
- /**
76
- * Continues the OAuth flow.
77
- * @param context The turn context.
78
- * @returns A promise that resolves to the user token response.
79
- */
80
- continueFlow(context: TurnContext): Promise<TokenResponse>;
81
- /**
82
- * Signs the user out.
83
- * @param context The turn context.
84
- * @returns A promise that resolves when the sign-out operation is complete.
85
- */
86
- signOut(context: TurnContext): Promise<void>;
87
- /**
88
- * Gets the user state for the OAuth flow.
89
- * @param context The turn context.
90
- * @returns A promise that resolves to the flow state.
91
- */
92
- getFlowState(context: TurnContext): Promise<FlowState>;
93
- /**
94
- * Sets the flow state for the OAuth flow.
95
- * @param context The turn context.
96
- * @param flowState The flow state to set.
97
- * @returns A promise that resolves when the flow state is set.
98
- */
99
- setFlowState(context: TurnContext, flowState: FlowState): Promise<void>;
100
- /**
101
- * Initializes the user token client if not already initialized.
102
- * @param context The turn context used to get authentication credentials.
103
- */
104
- private refreshToken;
105
- /**
106
- * Generates a cache key for storing user tokens.
107
- * @param context The turn context containing activity information.
108
- * @returns The cache key string in format: channelId_userId_connectionName.
109
- * @throws Will throw an error if required activity properties are missing.
110
- */
111
- private getCacheKey;
112
- /**
113
- * Generates a storage key for persisting OAuth flow state.
114
- * @param context The turn context containing activity information.
115
- * @returns The storage key string in format: oauth/channelId/conversationId/userId/flowState.
116
- * @throws Will throw an error if required activity properties are missing.
117
- */
118
- private getFlowStateKey;
119
- }