@azure/msal-browser 3.5.0 → 3.5.1-beta.1

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 (195) hide show
  1. package/dist/app/IPublicClientApplication.d.ts +51 -51
  2. package/dist/app/IPublicClientApplication.mjs +102 -102
  3. package/dist/app/PublicClientApplication.d.ts +268 -268
  4. package/dist/app/PublicClientApplication.mjs +333 -333
  5. package/dist/app/PublicClientNext.d.ts +273 -273
  6. package/dist/app/PublicClientNext.mjs +351 -351
  7. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +62 -62
  8. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +254 -254
  9. package/dist/broker/nativeBroker/NativeRequest.d.ts +44 -44
  10. package/dist/broker/nativeBroker/NativeResponse.d.ts +48 -48
  11. package/dist/broker/nativeBroker/NativeStatusCodes.d.ts +7 -7
  12. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +11 -11
  13. package/dist/cache/AsyncMemoryStorage.d.ts +51 -51
  14. package/dist/cache/AsyncMemoryStorage.mjs +132 -132
  15. package/dist/cache/BrowserCacheManager.d.ts +383 -383
  16. package/dist/cache/BrowserCacheManager.mjs +1262 -1262
  17. package/dist/cache/BrowserStorage.d.ts +11 -11
  18. package/dist/cache/BrowserStorage.mjs +32 -32
  19. package/dist/cache/CryptoKeyStore.d.ts +18 -18
  20. package/dist/cache/CryptoKeyStore.mjs +40 -40
  21. package/dist/cache/DatabaseStorage.d.ts +56 -56
  22. package/dist/cache/DatabaseStorage.mjs +190 -190
  23. package/dist/cache/IAsyncMemoryStorage.d.ts +27 -27
  24. package/dist/cache/ITokenCache.d.ts +11 -11
  25. package/dist/cache/IWindowStorage.d.ts +27 -27
  26. package/dist/cache/MemoryStorage.d.ts +11 -11
  27. package/dist/cache/MemoryStorage.mjs +31 -31
  28. package/dist/cache/TokenCache.d.ts +77 -77
  29. package/dist/cache/TokenCache.mjs +224 -224
  30. package/dist/config/Configuration.d.ts +206 -206
  31. package/dist/config/Configuration.mjs +128 -128
  32. package/dist/controllers/ControllerFactory.d.ts +4 -4
  33. package/dist/controllers/ControllerFactory.mjs +29 -29
  34. package/dist/controllers/IController.d.ts +61 -61
  35. package/dist/controllers/NestedAppAuthController.d.ts +95 -95
  36. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  37. package/dist/controllers/NestedAppAuthController.mjs +335 -333
  38. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  39. package/dist/controllers/StandardController.d.ts +407 -407
  40. package/dist/controllers/StandardController.d.ts.map +1 -1
  41. package/dist/controllers/StandardController.mjs +1293 -1291
  42. package/dist/controllers/StandardController.mjs.map +1 -1
  43. package/dist/controllers/UnknownOperatingContextController.d.ts +87 -87
  44. package/dist/controllers/UnknownOperatingContextController.mjs +264 -264
  45. package/dist/crypto/BrowserCrypto.d.ts +44 -44
  46. package/dist/crypto/BrowserCrypto.mjs +93 -93
  47. package/dist/crypto/CryptoOps.d.ts +63 -63
  48. package/dist/crypto/CryptoOps.mjs +145 -145
  49. package/dist/crypto/PkceGenerator.d.ts +8 -8
  50. package/dist/crypto/PkceGenerator.mjs +54 -54
  51. package/dist/crypto/SignedHttpRequest.d.ts +30 -30
  52. package/dist/crypto/SignedHttpRequest.mjs +39 -39
  53. package/dist/encode/Base64Decode.d.ts +9 -9
  54. package/dist/encode/Base64Decode.mjs +36 -36
  55. package/dist/encode/Base64Encode.d.ts +19 -19
  56. package/dist/encode/Base64Encode.mjs +43 -43
  57. package/dist/error/BrowserAuthError.d.ts +250 -250
  58. package/dist/error/BrowserAuthError.mjs +258 -258
  59. package/dist/error/BrowserAuthErrorCodes.d.ts +45 -45
  60. package/dist/error/BrowserAuthErrorCodes.mjs +49 -49
  61. package/dist/error/BrowserConfigurationAuthError.d.ts +33 -33
  62. package/dist/error/BrowserConfigurationAuthError.mjs +40 -40
  63. package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts +3 -3
  64. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +7 -7
  65. package/dist/error/NativeAuthError.d.ts +29 -29
  66. package/dist/error/NativeAuthError.mjs +60 -60
  67. package/dist/error/NativeAuthErrorCodes.d.ts +2 -2
  68. package/dist/error/NativeAuthErrorCodes.mjs +6 -6
  69. package/dist/error/NestedAppAuthError.d.ts +14 -14
  70. package/dist/error/NestedAppAuthError.mjs +23 -23
  71. package/dist/event/EventHandler.d.ts +41 -41
  72. package/dist/event/EventHandler.mjs +119 -119
  73. package/dist/event/EventMessage.d.ts +25 -25
  74. package/dist/event/EventMessage.mjs +68 -68
  75. package/dist/event/EventType.d.ts +28 -28
  76. package/dist/event/EventType.mjs +31 -31
  77. package/dist/index.d.ts +39 -39
  78. package/dist/index.mjs +1 -1
  79. package/dist/interaction_client/BaseInteractionClient.d.ts +54 -54
  80. package/dist/interaction_client/BaseInteractionClient.mjs +152 -152
  81. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +4 -4
  82. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +10 -10
  83. package/dist/interaction_client/NativeInteractionClient.d.ts +140 -140
  84. package/dist/interaction_client/NativeInteractionClient.mjs +548 -548
  85. package/dist/interaction_client/PopupClient.d.ts +105 -105
  86. package/dist/interaction_client/PopupClient.mjs +432 -432
  87. package/dist/interaction_client/RedirectClient.d.ts +49 -49
  88. package/dist/interaction_client/RedirectClient.mjs +311 -311
  89. package/dist/interaction_client/SilentAuthCodeClient.d.ts +23 -23
  90. package/dist/interaction_client/SilentAuthCodeClient.mjs +57 -57
  91. package/dist/interaction_client/SilentCacheClient.d.ts +24 -24
  92. package/dist/interaction_client/SilentCacheClient.mjs +61 -61
  93. package/dist/interaction_client/SilentIframeClient.d.ts +32 -32
  94. package/dist/interaction_client/SilentIframeClient.mjs +96 -96
  95. package/dist/interaction_client/SilentRefreshClient.d.ts +20 -20
  96. package/dist/interaction_client/SilentRefreshClient.mjs +43 -43
  97. package/dist/interaction_client/StandardInteractionClient.d.ts +54 -54
  98. package/dist/interaction_client/StandardInteractionClient.mjs +222 -222
  99. package/dist/interaction_handler/InteractionHandler.d.ts +33 -33
  100. package/dist/interaction_handler/InteractionHandler.mjs +93 -93
  101. package/dist/interaction_handler/RedirectHandler.d.ts +32 -32
  102. package/dist/interaction_handler/RedirectHandler.mjs +134 -134
  103. package/dist/interaction_handler/SilentHandler.d.ts +13 -13
  104. package/dist/interaction_handler/SilentHandler.mjs +133 -133
  105. package/dist/naa/AccountInfo.d.ts +11 -12
  106. package/dist/naa/AccountInfo.d.ts.map +1 -1
  107. package/dist/naa/AccountRequests.d.ts +9 -9
  108. package/dist/naa/AuthBridge.d.ts +5 -5
  109. package/dist/naa/BridgeCapabilities.d.ts +3 -3
  110. package/dist/naa/BridgeError.d.ts +9 -9
  111. package/dist/naa/BridgeError.d.ts.map +1 -1
  112. package/dist/naa/BridgeError.mjs +7 -7
  113. package/dist/naa/BridgeError.mjs.map +1 -1
  114. package/dist/naa/BridgeProxy.d.ts +72 -71
  115. package/dist/naa/BridgeProxy.d.ts.map +1 -1
  116. package/dist/naa/BridgeProxy.mjs +152 -149
  117. package/dist/naa/BridgeProxy.mjs.map +1 -1
  118. package/dist/naa/BridgeRequest.d.ts +6 -6
  119. package/dist/naa/BridgeRequestEnvelope.d.ts +13 -13
  120. package/dist/naa/BridgeResponseEnvelope.d.ts +10 -10
  121. package/dist/naa/BridgeStatusCode.d.ts +10 -10
  122. package/dist/naa/BridgeStatusCode.mjs +15 -15
  123. package/dist/naa/IBridgeProxy.d.ts +12 -10
  124. package/dist/naa/IBridgeProxy.d.ts.map +1 -1
  125. package/dist/naa/InitializeBridgeResponse.d.ts +6 -6
  126. package/dist/naa/InitializeBridgeResponse.d.ts.map +1 -1
  127. package/dist/naa/TokenRequest.d.ts +19 -21
  128. package/dist/naa/TokenRequest.d.ts.map +1 -1
  129. package/dist/naa/TokenResponse.d.ts +15 -16
  130. package/dist/naa/TokenResponse.d.ts.map +1 -1
  131. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +23 -25
  132. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
  133. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +142 -170
  134. package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
  135. package/dist/navigation/INavigationClient.d.ts +16 -16
  136. package/dist/navigation/NavigationClient.d.ts +22 -22
  137. package/dist/navigation/NavigationClient.mjs +40 -40
  138. package/dist/navigation/NavigationOptions.d.ts +12 -12
  139. package/dist/network/FetchClient.d.ts +26 -26
  140. package/dist/network/FetchClient.mjs +99 -99
  141. package/dist/operatingcontext/BaseOperatingContext.d.ts +40 -40
  142. package/dist/operatingcontext/BaseOperatingContext.mjs +44 -44
  143. package/dist/operatingcontext/StandardOperatingContext.d.ts +25 -25
  144. package/dist/operatingcontext/StandardOperatingContext.mjs +43 -43
  145. package/dist/operatingcontext/TeamsAppOperatingContext.d.ts +32 -32
  146. package/dist/operatingcontext/TeamsAppOperatingContext.d.ts.map +1 -1
  147. package/dist/operatingcontext/TeamsAppOperatingContext.mjs +85 -82
  148. package/dist/operatingcontext/TeamsAppOperatingContext.mjs.map +1 -1
  149. package/dist/operatingcontext/UnknownOperatingContext.d.ts +25 -25
  150. package/dist/operatingcontext/UnknownOperatingContext.mjs +42 -42
  151. package/dist/packageMetadata.d.ts +2 -2
  152. package/dist/packageMetadata.d.ts.map +1 -1
  153. package/dist/packageMetadata.mjs +4 -4
  154. package/dist/packageMetadata.mjs.map +1 -1
  155. package/dist/request/AuthorizationCodeRequest.d.ts +8 -8
  156. package/dist/request/AuthorizationUrlRequest.d.ts +8 -8
  157. package/dist/request/ClearCacheRequest.d.ts +10 -10
  158. package/dist/request/EndSessionPopupRequest.d.ts +18 -18
  159. package/dist/request/EndSessionRequest.d.ts +15 -15
  160. package/dist/request/PopupRequest.d.ts +34 -34
  161. package/dist/request/PopupWindowAttributes.d.ts +15 -15
  162. package/dist/request/RedirectRequest.d.ts +35 -35
  163. package/dist/request/SilentRequest.d.ts +32 -32
  164. package/dist/request/SsoSilentRequest.d.ts +29 -29
  165. package/dist/response/AuthenticationResult.d.ts +4 -4
  166. package/dist/response/ResponseHandler.d.ts +7 -7
  167. package/dist/response/ResponseHandler.mjs +36 -36
  168. package/dist/telemetry/BrowserPerformanceClient.d.ts +36 -36
  169. package/dist/telemetry/BrowserPerformanceClient.mjs +125 -125
  170. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +21 -21
  171. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +92 -92
  172. package/dist/utils/BrowserConstants.d.ts +176 -176
  173. package/dist/utils/BrowserConstants.mjs +204 -204
  174. package/dist/utils/BrowserProtocolUtils.d.ts +11 -11
  175. package/dist/utils/BrowserProtocolUtils.mjs +21 -21
  176. package/dist/utils/BrowserUtils.d.ts +56 -56
  177. package/dist/utils/BrowserUtils.mjs +125 -125
  178. package/lib/msal-browser.cjs +17922 -17928
  179. package/lib/msal-browser.cjs.map +1 -1
  180. package/lib/msal-browser.js +17922 -17928
  181. package/lib/msal-browser.js.map +1 -1
  182. package/lib/msal-browser.min.js +59 -59
  183. package/package.json +102 -102
  184. package/src/controllers/NestedAppAuthController.ts +8 -3
  185. package/src/controllers/StandardController.ts +3 -1
  186. package/src/naa/AccountInfo.ts +3 -4
  187. package/src/naa/BridgeError.ts +4 -4
  188. package/src/naa/BridgeProxy.ts +6 -2
  189. package/src/naa/IBridgeProxy.ts +2 -0
  190. package/src/naa/InitializeBridgeResponse.ts +1 -1
  191. package/src/naa/TokenRequest.ts +0 -2
  192. package/src/naa/TokenResponse.ts +1 -2
  193. package/src/naa/mapping/NestedAppAuthAdapter.ts +72 -80
  194. package/src/operatingcontext/TeamsAppOperatingContext.ts +4 -1
  195. package/src/packageMetadata.ts +1 -1
@@ -1,153 +1,156 @@
1
- /*! @azure/msal-browser v3.5.0 2023-11-07 */
1
+ /*! @azure/msal-browser v3.5.1-beta.1 2023-11-14 */
2
2
  'use strict';
3
- /*
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Licensed under the MIT License.
6
- */
7
- /**
8
- * BridgeProxy
9
- * Provides a proxy for accessing a bridge to a host app and/or
10
- * platform broker
11
- */
12
- class BridgeProxy {
13
- /**
14
- * initializeNestedAppAuthBridge - Initializes the bridge to the host app
15
- * @returns a promise that resolves to an InitializeBridgeResponse or rejects with an Error
16
- * @remarks This method will be called by the create factory method
17
- * @remarks If the bridge is not available, this method will throw an error
18
- */
19
- static async initializeNestedAppAuthBridge() {
20
- if (window === undefined) {
21
- throw new Error("window is undefined");
22
- }
23
- if (window.nestedAppAuthBridge === undefined) {
24
- throw new Error("window.nestedAppAuthBridge is undefined");
25
- }
26
- if (window.crypto === undefined) {
27
- throw new Error("window.crypto is undefined");
28
- }
29
- try {
30
- BridgeProxy.crypto = window.crypto;
31
- window.nestedAppAuthBridge.addEventListener("message", (response) => {
32
- const responseEnvelope = JSON.parse(response);
33
- const request = BridgeProxy.bridgeRequests.find((element) => element.requestId === responseEnvelope.requestId);
34
- if (request !== undefined) {
35
- BridgeProxy.bridgeRequests.splice(BridgeProxy.bridgeRequests.indexOf(request), 1);
36
- if (responseEnvelope.success) {
37
- request.resolve(responseEnvelope.body);
38
- }
39
- else {
40
- request.reject(responseEnvelope.body);
41
- }
42
- }
43
- });
44
- const promise = new Promise((resolve, reject) => {
45
- const message = {
46
- messageType: "NestedAppAuthRequest",
47
- method: "GetInitContext",
48
- requestId: BridgeProxy.getRandomId(),
49
- };
50
- const request = {
51
- requestId: message.requestId,
52
- method: message.method,
53
- resolve: resolve,
54
- reject: reject,
55
- };
56
- BridgeProxy.bridgeRequests.push(request);
57
- window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
58
- });
59
- return promise;
60
- }
61
- catch (error) {
62
- window.console.log(error);
63
- throw error;
64
- }
65
- }
66
- static getRandomId() {
67
- return BridgeProxy.crypto.randomUUID();
68
- }
69
- /**
70
- * getTokenInteractive - Attempts to get a token interactively from the bridge
71
- * @param request A token request
72
- * @returns a promise that resolves to a token response or rejects with a BridgeError
73
- */
74
- getTokenInteractive(request) {
75
- return this.sendRequest("GetTokenPopup", request);
76
- }
77
- /**
78
- * getTokenSilent Attempts to get a token silently from the bridge
79
- * @param request A token request
80
- * @returns a promise that resolves to a token response or rejects with a BridgeError
81
- */
82
- getTokenSilent(request) {
83
- return this.sendRequest("GetToken", request);
84
- }
85
- /**
86
- * getAccountInfo - Gets account information from the bridge
87
- *
88
- * @param request A request for account information
89
- */
90
- getAccountInfo(request) {
91
- let method = "GetAccountByHomeId";
92
- if (request.homeAccountId !== undefined) {
93
- method = "GetAccountByHomeId";
94
- }
95
- if (request.localAccountId !== undefined) {
96
- method = "GetAccountByLocalId";
97
- }
98
- if (request.username !== undefined) {
99
- method = "GetAccountByUsername";
100
- }
101
- return this.sendRequest(method, request);
102
- }
103
- getActiveAccount() {
104
- return this.sendRequest("GetActiveAccount", undefined);
105
- }
106
- /**
107
- * A method used to send a request to the bridge
108
- * @param request A token request
109
- * @returns a promise that resolves to a response of provided type or rejects with a BridgeError
110
- */
111
- sendRequest(method, request) {
112
- const message = {
113
- messageType: "NestedAppAuthRequest",
114
- method: method,
115
- requestId: BridgeProxy.getRandomId(),
116
- body: request,
117
- };
118
- const promise = new Promise((resolve, reject) => {
119
- const request = {
120
- requestId: message.requestId,
121
- method: message.method,
122
- resolve: resolve,
123
- reject: reject,
124
- };
125
- BridgeProxy.bridgeRequests.push(request);
126
- window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
127
- });
128
- return promise;
129
- }
130
- /**
131
- * Private constructor for BridgeProxy
132
- * @param sdkName The name of the SDK being used to make requests on behalf of the app
133
- * @param sdkVersion The version of the SDK being used to make requests on behalf of the app
134
- * @param capabilities The capabilities of the bridge / SDK / platform broker
135
- */
136
- constructor(sdkName, sdkVersion, capabilities) {
137
- this.sdkName = sdkName;
138
- this.sdkVersion = sdkVersion;
139
- this.capabilities = capabilities;
140
- }
141
- /**
142
- * Factory method for creating an implementation of IBridgeProxy
143
- * @returns A promise that resolves to a BridgeProxy implementation
144
- */
145
- static async create() {
146
- const response = await BridgeProxy.initializeNestedAppAuthBridge();
147
- return new BridgeProxy(response.sdkName, response.sdkVersion, response.capabilities);
148
- }
149
- }
150
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ /**
8
+ * BridgeProxy
9
+ * Provides a proxy for accessing a bridge to a host app and/or
10
+ * platform broker
11
+ */
12
+ class BridgeProxy {
13
+ /**
14
+ * initializeNestedAppAuthBridge - Initializes the bridge to the host app
15
+ * @returns a promise that resolves to an InitializeBridgeResponse or rejects with an Error
16
+ * @remarks This method will be called by the create factory method
17
+ * @remarks If the bridge is not available, this method will throw an error
18
+ */
19
+ static async initializeNestedAppAuthBridge() {
20
+ if (window === undefined) {
21
+ throw new Error("window is undefined");
22
+ }
23
+ if (window.nestedAppAuthBridge === undefined) {
24
+ throw new Error("window.nestedAppAuthBridge is undefined");
25
+ }
26
+ if (window.crypto === undefined) {
27
+ throw new Error("window.crypto is undefined");
28
+ }
29
+ try {
30
+ BridgeProxy.crypto = window.crypto;
31
+ window.nestedAppAuthBridge.addEventListener("message", (response) => {
32
+ const responseEnvelope = JSON.parse(response);
33
+ const request = BridgeProxy.bridgeRequests.find((element) => element.requestId === responseEnvelope.requestId);
34
+ if (request !== undefined) {
35
+ BridgeProxy.bridgeRequests.splice(BridgeProxy.bridgeRequests.indexOf(request), 1);
36
+ if (responseEnvelope.success) {
37
+ request.resolve(responseEnvelope.body);
38
+ }
39
+ else {
40
+ request.reject(responseEnvelope.body);
41
+ }
42
+ }
43
+ });
44
+ const promise = new Promise((resolve, reject) => {
45
+ const message = {
46
+ messageType: "NestedAppAuthRequest",
47
+ method: "GetInitContext",
48
+ requestId: BridgeProxy.getRandomId(),
49
+ };
50
+ const request = {
51
+ requestId: message.requestId,
52
+ method: message.method,
53
+ resolve: resolve,
54
+ reject: reject,
55
+ };
56
+ BridgeProxy.bridgeRequests.push(request);
57
+ window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
58
+ });
59
+ return promise;
60
+ }
61
+ catch (error) {
62
+ window.console.log(error);
63
+ throw error;
64
+ }
65
+ }
66
+ static getRandomId() {
67
+ return BridgeProxy.crypto.randomUUID();
68
+ }
69
+ /**
70
+ * getTokenInteractive - Attempts to get a token interactively from the bridge
71
+ * @param request A token request
72
+ * @returns a promise that resolves to a token response or rejects with a BridgeError
73
+ */
74
+ getTokenInteractive(request) {
75
+ return this.sendRequest("GetTokenPopup", request);
76
+ }
77
+ /**
78
+ * getTokenSilent Attempts to get a token silently from the bridge
79
+ * @param request A token request
80
+ * @returns a promise that resolves to a token response or rejects with a BridgeError
81
+ */
82
+ getTokenSilent(request) {
83
+ return this.sendRequest("GetToken", request);
84
+ }
85
+ /**
86
+ * getAccountInfo - Gets account information from the bridge
87
+ *
88
+ * @param request A request for account information
89
+ */
90
+ getAccountInfo(request) {
91
+ let method = "GetAccountByHomeId";
92
+ if (request.homeAccountId !== undefined) {
93
+ method = "GetAccountByHomeId";
94
+ }
95
+ if (request.localAccountId !== undefined) {
96
+ method = "GetAccountByLocalId";
97
+ }
98
+ if (request.username !== undefined) {
99
+ method = "GetAccountByUsername";
100
+ }
101
+ return this.sendRequest(method, request);
102
+ }
103
+ getActiveAccount() {
104
+ return this.sendRequest("GetActiveAccount", undefined);
105
+ }
106
+ getHostCapabilities() {
107
+ return this.capabilities ?? null;
108
+ }
109
+ /**
110
+ * A method used to send a request to the bridge
111
+ * @param request A token request
112
+ * @returns a promise that resolves to a response of provided type or rejects with a BridgeError
113
+ */
114
+ sendRequest(method, request) {
115
+ const message = {
116
+ messageType: "NestedAppAuthRequest",
117
+ method: method,
118
+ requestId: BridgeProxy.getRandomId(),
119
+ body: request,
120
+ };
121
+ const promise = new Promise((resolve, reject) => {
122
+ const request = {
123
+ requestId: message.requestId,
124
+ method: message.method,
125
+ resolve: resolve,
126
+ reject: reject,
127
+ };
128
+ BridgeProxy.bridgeRequests.push(request);
129
+ window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
130
+ });
131
+ return promise;
132
+ }
133
+ /**
134
+ * Private constructor for BridgeProxy
135
+ * @param sdkName The name of the SDK being used to make requests on behalf of the app
136
+ * @param sdkVersion The version of the SDK being used to make requests on behalf of the app
137
+ * @param capabilities The capabilities of the bridge / SDK / platform broker
138
+ */
139
+ constructor(sdkName, sdkVersion, capabilities) {
140
+ this.sdkName = sdkName;
141
+ this.sdkVersion = sdkVersion;
142
+ this.capabilities = capabilities;
143
+ }
144
+ /**
145
+ * Factory method for creating an implementation of IBridgeProxy
146
+ * @returns A promise that resolves to a BridgeProxy implementation
147
+ */
148
+ static async create() {
149
+ const response = await BridgeProxy.initializeNestedAppAuthBridge();
150
+ return new BridgeProxy(response.sdkName, response.sdkVersion, response.capabilities);
151
+ }
152
+ }
153
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
151
154
  BridgeProxy.bridgeRequests = [];
152
155
 
153
156
  export { BridgeProxy, BridgeProxy as default };
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeProxy.mjs","sources":["../../src/naa/BridgeProxy.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKA;AACA;AAKA;AACA;AAIA;AACA;AACA;AACA;AAEA;AACI,MAAA,WAAgB,CAAA;;AAEf;AACJ;AAED;;;;AAIG,QAAA,IAAA,MAAA,KAAA,SAAA,EAAA;AACH,YAAa,MAAA,IAAA,KAAA,CAAA,qBAAmC,CAAA,CAAA;AAE5C,SAAA;AACA,QAAA,IAAO,MAAQ,CAAA,mBAAO,KAAA,SAAA,EAAA;YACf,UAAS,KAAA,CAAA,yCAAA,CAAA,CAAA;SACN;QACE,IAAA,MAAE,qBAAmB,EAAA;AAEjC,YAAA,MAAA,IAAA,KAAA,CAAA,4BAAA,CAAA,CAAA;;;;;AAKG,gBAAA,MAAA,gBAAA,GAAA,IAAA,CAAA,KAAA,CAAA,QAAA,CAAA,C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;;;;;"}
@@ -1,7 +1,7 @@
1
- export type BridgeRequest<TResponse> = {
2
- requestId: string;
3
- method: string;
4
- resolve: (value: TResponse | PromiseLike<TResponse>) => void;
5
- reject: (reason?: any) => void;
6
- };
1
+ export type BridgeRequest<TResponse> = {
2
+ requestId: string;
3
+ method: string;
4
+ resolve: (value: TResponse | PromiseLike<TResponse>) => void;
5
+ reject: (reason?: any) => void;
6
+ };
7
7
  //# sourceMappingURL=BridgeRequest.d.ts.map
@@ -1,14 +1,14 @@
1
- import { TokenRequest } from "./TokenRequest";
2
- import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
3
- export type BridgeMethods = "GetToken" | "GetActiveAccount" | "GetAllAccounts" | "GetAccountByHomeId" | "GetAccountByLocalId" | "GetAccountByUsername" | "GetInitContext" | "GetTokenPopup";
4
- export type BridgeRequestEnvelope = {
5
- messageType: "NestedAppAuthRequest";
6
- method: BridgeMethods;
7
- sendTime?: number;
8
- clientLibrary?: string;
9
- clientLibraryVersion?: string;
10
- requestId: string;
11
- body?: TokenRequest | AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest;
12
- };
13
- export declare function isBridgeRequestEnvelope(obj: unknown): obj is BridgeRequestEnvelope;
1
+ import { TokenRequest } from "./TokenRequest";
2
+ import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
3
+ export type BridgeMethods = "GetToken" | "GetActiveAccount" | "GetAllAccounts" | "GetAccountByHomeId" | "GetAccountByLocalId" | "GetAccountByUsername" | "GetInitContext" | "GetTokenPopup";
4
+ export type BridgeRequestEnvelope = {
5
+ messageType: "NestedAppAuthRequest";
6
+ method: BridgeMethods;
7
+ sendTime?: number;
8
+ clientLibrary?: string;
9
+ clientLibraryVersion?: string;
10
+ requestId: string;
11
+ body?: TokenRequest | AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest;
12
+ };
13
+ export declare function isBridgeRequestEnvelope(obj: unknown): obj is BridgeRequestEnvelope;
14
14
  //# sourceMappingURL=BridgeRequestEnvelope.d.ts.map
@@ -1,11 +1,11 @@
1
- import { BridgeError } from "./BridgeError";
2
- import { TokenResponse } from "./TokenResponse";
3
- import { AccountInfo } from "./AccountInfo";
4
- import { InitializeBridgeResponse } from "./InitializeBridgeResponse";
5
- export type BridgeResponseEnvelope = {
6
- messageType: "NestedAppAuthResponse";
7
- requestId: string;
8
- success: boolean;
9
- body: TokenResponse | BridgeError | AccountInfo | AccountInfo[] | InitializeBridgeResponse;
10
- };
1
+ import { BridgeError } from "./BridgeError";
2
+ import { TokenResponse } from "./TokenResponse";
3
+ import { AccountInfo } from "./AccountInfo";
4
+ import { InitializeBridgeResponse } from "./InitializeBridgeResponse";
5
+ export type BridgeResponseEnvelope = {
6
+ messageType: "NestedAppAuthResponse";
7
+ requestId: string;
8
+ success: boolean;
9
+ body: TokenResponse | BridgeError | AccountInfo | AccountInfo[] | InitializeBridgeResponse;
10
+ };
11
11
  //# sourceMappingURL=BridgeResponseEnvelope.d.ts.map
@@ -1,11 +1,11 @@
1
- export declare enum BridgeStatusCode {
2
- USER_INTERACTION_REQUIRED = "USER_INTERACTION_REQUIRED",
3
- USER_CANCEL = "USER_CANCEL",
4
- NO_NETWORK = "NO_NETWORK",
5
- TRANSIENT_ERROR = "TRANSIENT_ERROR",
6
- PERSISTENT_ERROR = "PERSISTENT_ERROR",
7
- DISABLED = "DISABLED",
8
- ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE",
9
- NESTED_APP_AUTH_UNAVAILABLE = "NESTED_APP_AUTH_UNAVAILABLE"
10
- }
1
+ export declare enum BridgeStatusCode {
2
+ USER_INTERACTION_REQUIRED = "USER_INTERACTION_REQUIRED",
3
+ USER_CANCEL = "USER_CANCEL",
4
+ NO_NETWORK = "NO_NETWORK",
5
+ TRANSIENT_ERROR = "TRANSIENT_ERROR",
6
+ PERSISTENT_ERROR = "PERSISTENT_ERROR",
7
+ DISABLED = "DISABLED",
8
+ ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE",
9
+ NESTED_APP_AUTH_UNAVAILABLE = "NESTED_APP_AUTH_UNAVAILABLE"
10
+ }
11
11
  //# sourceMappingURL=BridgeStatusCode.d.ts.map
@@ -1,19 +1,19 @@
1
- /*! @azure/msal-browser v3.5.0 2023-11-07 */
1
+ /*! @azure/msal-browser v3.5.1-beta.1 2023-11-14 */
2
2
  'use strict';
3
- /*
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Licensed under the MIT License.
6
- */
7
- var BridgeStatusCode;
8
- (function (BridgeStatusCode) {
9
- BridgeStatusCode["USER_INTERACTION_REQUIRED"] = "USER_INTERACTION_REQUIRED";
10
- BridgeStatusCode["USER_CANCEL"] = "USER_CANCEL";
11
- BridgeStatusCode["NO_NETWORK"] = "NO_NETWORK";
12
- BridgeStatusCode["TRANSIENT_ERROR"] = "TRANSIENT_ERROR";
13
- BridgeStatusCode["PERSISTENT_ERROR"] = "PERSISTENT_ERROR";
14
- BridgeStatusCode["DISABLED"] = "DISABLED";
15
- BridgeStatusCode["ACCOUNT_UNAVAILABLE"] = "ACCOUNT_UNAVAILABLE";
16
- BridgeStatusCode["NESTED_APP_AUTH_UNAVAILABLE"] = "NESTED_APP_AUTH_UNAVAILABLE";
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ var BridgeStatusCode;
8
+ (function (BridgeStatusCode) {
9
+ BridgeStatusCode["USER_INTERACTION_REQUIRED"] = "USER_INTERACTION_REQUIRED";
10
+ BridgeStatusCode["USER_CANCEL"] = "USER_CANCEL";
11
+ BridgeStatusCode["NO_NETWORK"] = "NO_NETWORK";
12
+ BridgeStatusCode["TRANSIENT_ERROR"] = "TRANSIENT_ERROR";
13
+ BridgeStatusCode["PERSISTENT_ERROR"] = "PERSISTENT_ERROR";
14
+ BridgeStatusCode["DISABLED"] = "DISABLED";
15
+ BridgeStatusCode["ACCOUNT_UNAVAILABLE"] = "ACCOUNT_UNAVAILABLE";
16
+ BridgeStatusCode["NESTED_APP_AUTH_UNAVAILABLE"] = "NESTED_APP_AUTH_UNAVAILABLE";
17
17
  })(BridgeStatusCode || (BridgeStatusCode = {}));
18
18
 
19
19
  export { BridgeStatusCode };
@@ -1,11 +1,13 @@
1
- import { AccountInfo } from "./AccountInfo";
2
- import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
3
- import { TokenRequest } from "./TokenRequest";
4
- import { TokenResponse } from "./TokenResponse";
5
- export interface IBridgeProxy {
6
- getTokenInteractive(request: TokenRequest): Promise<TokenResponse>;
7
- getTokenSilent(request: TokenRequest): Promise<TokenResponse>;
8
- getAccountInfo(request: AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest): Promise<AccountInfo>;
9
- getActiveAccount(): Promise<AccountInfo>;
10
- }
1
+ import { AccountInfo } from "./AccountInfo";
2
+ import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
3
+ import { BridgeCapabilities } from "./BridgeCapabilities";
4
+ import { TokenRequest } from "./TokenRequest";
5
+ import { TokenResponse } from "./TokenResponse";
6
+ export interface IBridgeProxy {
7
+ getTokenInteractive(request: TokenRequest): Promise<TokenResponse>;
8
+ getTokenSilent(request: TokenRequest): Promise<TokenResponse>;
9
+ getAccountInfo(request: AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest): Promise<AccountInfo>;
10
+ getActiveAccount(): Promise<AccountInfo>;
11
+ getHostCapabilities(): BridgeCapabilities | null;
12
+ }
11
13
  //# sourceMappingURL=IBridgeProxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IBridgeProxy.d.ts","sourceRoot":"","sources":["../../src/naa/IBridgeProxy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACH,sBA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AAG,IAAI,CAAC;CACpD"}
@@ -1,7 +1,7 @@
1
- import { BridgeCapabilities } from "./BridgeCapabilities";
2
- export interface InitializeBridgeResponse {
3
- capabilities: BridgeCapabilities;
4
- sdkName: string;
5
- sdkVersion: string;
6
- }
1
+ import { BridgeCapabilities } from "./BridgeCapabilities";
2
+ export interface InitializeBridgeResponse {
3
+ capabilities?: BridgeCapabilities;
4
+ sdkName: string;
5
+ sdkVersion: string;
6
+ }
7
7
  //# sourceMappingURL=InitializeBridgeResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InitializeBridgeResponse.d.ts","sourceRoot":"","sources":["../../src/naa/InitializeBridgeResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACrC,YAAY,EAAE,kBAAkB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"InitializeBridgeResponse.d.ts","sourceRoot":"","sources":["../../src/naa/InitializeBridgeResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACrC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -1,22 +1,20 @@
1
- export type TokenRequest = {
2
- userObjectId?: string;
3
- clientId: string;
4
- authority?: string;
5
- scope: string;
6
- correlationId: string;
7
- prompt?: string;
8
- nonce?: string;
9
- claims?: string;
10
- state?: string;
11
- reqCnf?: string;
12
- keyId?: string;
13
- authenticationScheme?: string;
14
- shrClaims?: string;
15
- shrNonce?: string;
16
- clientCapabilities?: string[];
17
- resourceRequestMethod?: string;
18
- resourceRequestUri?: string;
19
- extendedExpiryToken?: boolean;
20
- extraParameters?: Map<string, string>;
21
- };
1
+ export type TokenRequest = {
2
+ userObjectId?: string;
3
+ clientId: string;
4
+ authority?: string;
5
+ scope: string;
6
+ correlationId: string;
7
+ nonce?: string;
8
+ claims?: string;
9
+ state?: string;
10
+ reqCnf?: string;
11
+ keyId?: string;
12
+ authenticationScheme?: string;
13
+ shrClaims?: string;
14
+ shrNonce?: string;
15
+ resourceRequestMethod?: string;
16
+ resourceRequestUri?: string;
17
+ extendedExpiryToken?: boolean;
18
+ extraParameters?: Map<string, string>;
19
+ };
22
20
  //# sourceMappingURL=TokenRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenRequest.d.ts","sourceRoot":"","sources":["../../src/naa/TokenRequest.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,YAAY,GAAG;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC"}
1
+ {"version":3,"file":"TokenRequest.d.ts","sourceRoot":"","sources":["../../src/naa/TokenRequest.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,YAAY,GAAG;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC"}
@@ -1,17 +1,16 @@
1
- import { AccountInfo } from "./AccountInfo";
2
- export type TokenResponse = {
3
- access_token: string;
4
- account: AccountInfo;
5
- client_info: string;
6
- expires_in: number;
7
- id_token: string;
8
- properties: TokenResponseProperties | null;
9
- scope: string;
10
- state: string;
11
- shr?: string;
12
- extendedLifetimeToken?: boolean;
13
- };
14
- export type TokenResponseProperties = {
15
- MATS?: string;
16
- };
1
+ import { AccountInfo } from "./AccountInfo";
2
+ export type TokenResponse = {
3
+ access_token: string;
4
+ account: AccountInfo;
5
+ expires_in: number;
6
+ id_token: string;
7
+ properties: TokenResponseProperties | null;
8
+ scope: string;
9
+ shr?: string;
10
+ extendedLifetimeToken?: boolean;
11
+ authority?: string;
12
+ };
13
+ export type TokenResponseProperties = {
14
+ MATS?: string;
15
+ };
17
16
  //# sourceMappingURL=TokenResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenResponse.d.ts","sourceRoot":"","sources":["../../src/naa/TokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
1
+ {"version":3,"file":"TokenResponse.d.ts","sourceRoot":"","sources":["../../src/naa/TokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,26 +1,24 @@
1
- import { TokenRequest } from "../TokenRequest";
2
- import { AccountInfo as NaaAccountInfo } from "../AccountInfo";
3
- import { RedirectRequest } from "../../request/RedirectRequest";
4
- import { PopupRequest } from "../../request/PopupRequest";
5
- import { TokenResponse } from "../TokenResponse";
6
- import { AccountInfo as MsalAccountInfo, AuthError, ClientAuthError, ClientConfigurationError, InteractionRequiredAuthError, ServerError, ICrypto, Logger } from "@azure/msal-common";
7
- import { SilentRequest } from "../../request/SilentRequest";
8
- import { AuthenticationResult } from "../../response/AuthenticationResult";
9
- export declare class NestedAppAuthAdapter {
10
- protected crypto: ICrypto;
11
- protected logger: Logger;
12
- protected clientId: string;
13
- protected clientCapabilities: string[];
14
- constructor(clientId: string, clientCapabilities: string[], crypto: ICrypto, logger: Logger);
15
- toNaaSilentTokenRequest(request: SilentRequest): TokenRequest;
16
- toNaaTokenRequest(request: PopupRequest | RedirectRequest): TokenRequest;
17
- fromNaaTokenResponse(request: TokenRequest, response: TokenResponse): AuthenticationResult;
18
- fromNaaAccountInfo(fromAccount: NaaAccountInfo): MsalAccountInfo;
19
- /**
20
- *
21
- * @param error BridgeError
22
- * @returns AuthError, ClientAuthError, ClientConfigurationError, ServerError, InteractionRequiredError
23
- */
24
- fromBridgeError(error: unknown): AuthError | ClientAuthError | ClientConfigurationError | ServerError | InteractionRequiredAuthError;
25
- }
1
+ import { TokenRequest } from "../TokenRequest";
2
+ import { AccountInfo as NaaAccountInfo } from "../AccountInfo";
3
+ import { RedirectRequest } from "../../request/RedirectRequest";
4
+ import { PopupRequest } from "../../request/PopupRequest";
5
+ import { TokenResponse } from "../TokenResponse";
6
+ import { AccountInfo as MsalAccountInfo, AuthError, ClientAuthError, ClientConfigurationError, InteractionRequiredAuthError, ServerError, ICrypto, Logger, TokenClaims } from "@azure/msal-common";
7
+ import { AuthenticationResult } from "../../response/AuthenticationResult";
8
+ export declare class NestedAppAuthAdapter {
9
+ protected crypto: ICrypto;
10
+ protected logger: Logger;
11
+ protected clientId: string;
12
+ protected clientCapabilities: string[];
13
+ constructor(clientId: string, clientCapabilities: string[], crypto: ICrypto, logger: Logger);
14
+ toNaaTokenRequest(request: PopupRequest | RedirectRequest): TokenRequest;
15
+ fromNaaTokenResponse(request: TokenRequest, response: TokenResponse, reqTimestamp: number): AuthenticationResult;
16
+ fromNaaAccountInfo(fromAccount: NaaAccountInfo, idTokenClaims?: TokenClaims): MsalAccountInfo;
17
+ /**
18
+ *
19
+ * @param error BridgeError
20
+ * @returns AuthError, ClientAuthError, ClientConfigurationError, ServerError, InteractionRequiredError
21
+ */
22
+ fromBridgeError(error: unknown): AuthError | ClientAuthError | ClientConfigurationError | ServerError | InteractionRequiredAuthError;
23
+ }
26
24
  //# sourceMappingURL=NestedAppAuthAdapter.d.ts.map