@azure/msal-browser 3.0.2 → 3.1.0

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 (256) hide show
  1. package/dist/app/IPublicClientApplication.d.ts +2 -0
  2. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  3. package/dist/app/IPublicClientApplication.mjs +4 -1
  4. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  5. package/dist/app/PublicClientApplication.d.ts +6 -0
  6. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  7. package/dist/app/PublicClientApplication.mjs +8 -1
  8. package/dist/app/PublicClientApplication.mjs.map +1 -1
  9. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
  10. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +5 -4
  11. package/dist/broker/nativeBroker/NativeMessageHandler.mjs.map +1 -1
  12. package/dist/cache/AsyncMemoryStorage.mjs +4 -3
  13. package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
  14. package/dist/cache/BrowserCacheManager.d.ts +9 -2
  15. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  16. package/dist/cache/BrowserCacheManager.mjs +54 -26
  17. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  18. package/dist/cache/BrowserStorage.mjs +1 -1
  19. package/dist/cache/BrowserStorage.mjs.map +1 -1
  20. package/dist/cache/CryptoKeyStore.mjs +1 -1
  21. package/dist/cache/CryptoKeyStore.mjs.map +1 -1
  22. package/dist/cache/DatabaseStorage.d.ts.map +1 -1
  23. package/dist/cache/DatabaseStorage.mjs +9 -8
  24. package/dist/cache/DatabaseStorage.mjs.map +1 -1
  25. package/dist/cache/MemoryStorage.mjs +1 -1
  26. package/dist/cache/MemoryStorage.mjs.map +1 -1
  27. package/dist/cache/TokenCache.d.ts.map +1 -1
  28. package/dist/cache/TokenCache.mjs +30 -30
  29. package/dist/cache/TokenCache.mjs.map +1 -1
  30. package/dist/config/Configuration.d.ts +1 -0
  31. package/dist/config/Configuration.d.ts.map +1 -1
  32. package/dist/config/Configuration.mjs +7 -11
  33. package/dist/config/Configuration.mjs.map +1 -1
  34. package/dist/controllers/ControllerFactory.mjs +1 -1
  35. package/dist/controllers/ControllerFactory.mjs.map +1 -1
  36. package/dist/controllers/IController.d.ts +3 -27
  37. package/dist/controllers/IController.d.ts.map +1 -1
  38. package/dist/controllers/StandardController.d.ts +6 -25
  39. package/dist/controllers/StandardController.d.ts.map +1 -1
  40. package/dist/controllers/StandardController.mjs +28 -52
  41. package/dist/controllers/StandardController.mjs.map +1 -1
  42. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  43. package/dist/crypto/BrowserCrypto.mjs +4 -3
  44. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  45. package/dist/crypto/CryptoOps.d.ts +0 -3
  46. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  47. package/dist/crypto/CryptoOps.mjs +14 -17
  48. package/dist/crypto/CryptoOps.mjs.map +1 -1
  49. package/dist/crypto/ModernBrowserCrypto.mjs +1 -1
  50. package/dist/crypto/ModernBrowserCrypto.mjs.map +1 -1
  51. package/dist/crypto/PkceGenerator.d.ts +0 -1
  52. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  53. package/dist/crypto/PkceGenerator.mjs +8 -8
  54. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  55. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  56. package/dist/crypto/SignedHttpRequest.mjs.map +1 -1
  57. package/dist/encode/Base64Decode.d.ts +6 -19
  58. package/dist/encode/Base64Decode.d.ts.map +1 -1
  59. package/dist/encode/Base64Decode.mjs +17 -70
  60. package/dist/encode/Base64Decode.mjs.map +1 -1
  61. package/dist/encode/Base64Encode.d.ts +15 -27
  62. package/dist/encode/Base64Encode.d.ts.map +1 -1
  63. package/dist/encode/Base64Encode.mjs +36 -75
  64. package/dist/encode/Base64Encode.mjs.map +1 -1
  65. package/dist/error/BrowserAuthError.d.ts +54 -195
  66. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  67. package/dist/error/BrowserAuthError.mjs +150 -381
  68. package/dist/error/BrowserAuthError.mjs.map +1 -1
  69. package/dist/error/BrowserAuthErrorCodes.d.ts +45 -0
  70. package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -0
  71. package/dist/error/BrowserAuthErrorCodes.mjs +53 -0
  72. package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -0
  73. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  74. package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
  75. package/dist/error/NativeAuthError.d.ts.map +1 -1
  76. package/dist/error/NativeAuthError.mjs +5 -4
  77. package/dist/error/NativeAuthError.mjs.map +1 -1
  78. package/dist/event/EventHandler.mjs +1 -1
  79. package/dist/event/EventHandler.mjs.map +1 -1
  80. package/dist/event/EventMessage.mjs +1 -1
  81. package/dist/event/EventMessage.mjs.map +1 -1
  82. package/dist/event/EventType.mjs +1 -1
  83. package/dist/event/EventType.mjs.map +1 -1
  84. package/dist/index.d.ts +5 -5
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.mjs +5 -3
  87. package/dist/index.mjs.map +1 -1
  88. package/dist/interaction_client/BaseInteractionClient.d.ts +2 -1
  89. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  90. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  91. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  92. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  93. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs.map +1 -1
  94. package/dist/interaction_client/NativeInteractionClient.d.ts +4 -10
  95. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  96. package/dist/interaction_client/NativeInteractionClient.mjs +22 -30
  97. package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
  98. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  99. package/dist/interaction_client/PopupClient.mjs +16 -15
  100. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  101. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  102. package/dist/interaction_client/RedirectClient.mjs +7 -6
  103. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  104. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  105. package/dist/interaction_client/SilentAuthCodeClient.mjs +5 -4
  106. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  107. package/dist/interaction_client/SilentCacheClient.d.ts +4 -2
  108. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  109. package/dist/interaction_client/SilentCacheClient.mjs +10 -8
  110. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  111. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  112. package/dist/interaction_client/SilentIframeClient.mjs +20 -47
  113. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  114. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  115. package/dist/interaction_client/SilentRefreshClient.mjs +4 -3
  116. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  117. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  118. package/dist/interaction_client/StandardInteractionClient.mjs +8 -7
  119. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  120. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  121. package/dist/interaction_handler/InteractionHandler.mjs +9 -9
  122. package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
  123. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  124. package/dist/interaction_handler/RedirectHandler.mjs +11 -10
  125. package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
  126. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  127. package/dist/interaction_handler/SilentHandler.mjs +10 -9
  128. package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
  129. package/dist/navigation/NavigationClient.mjs +1 -1
  130. package/dist/navigation/NavigationClient.mjs.map +1 -1
  131. package/dist/network/FetchClient.d.ts.map +1 -1
  132. package/dist/network/FetchClient.mjs +9 -8
  133. package/dist/network/FetchClient.mjs.map +1 -1
  134. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  135. package/dist/operatingcontext/BaseOperatingContext.mjs.map +1 -1
  136. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  137. package/dist/operatingcontext/StandardOperatingContext.mjs.map +1 -1
  138. package/dist/operatingcontext/TeamsAppOperatingContext.mjs +1 -1
  139. package/dist/operatingcontext/TeamsAppOperatingContext.mjs.map +1 -1
  140. package/dist/packageMetadata.d.ts +1 -1
  141. package/dist/packageMetadata.mjs +2 -2
  142. package/dist/packageMetadata.mjs.map +1 -1
  143. package/dist/request/ClearCacheRequest.d.ts +11 -0
  144. package/dist/request/ClearCacheRequest.d.ts.map +1 -0
  145. package/dist/telemetry/BrowserPerformanceClient.d.ts +2 -4
  146. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  147. package/dist/telemetry/BrowserPerformanceClient.mjs +2 -6
  148. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  149. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  150. package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
  151. package/dist/utils/BrowserConstants.mjs +1 -1
  152. package/dist/utils/BrowserConstants.mjs.map +1 -1
  153. package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
  154. package/dist/utils/BrowserProtocolUtils.mjs +3 -3
  155. package/dist/utils/BrowserProtocolUtils.mjs.map +1 -1
  156. package/dist/utils/BrowserStringUtils.mjs +1 -1
  157. package/dist/utils/BrowserStringUtils.mjs.map +1 -1
  158. package/dist/utils/BrowserUtils.d.ts +0 -9
  159. package/dist/utils/BrowserUtils.d.ts.map +1 -1
  160. package/dist/utils/BrowserUtils.mjs +8 -33
  161. package/dist/utils/BrowserUtils.mjs.map +1 -1
  162. package/lib/msal-browser.cjs +6579 -7102
  163. package/lib/msal-browser.cjs.map +1 -1
  164. package/lib/msal-browser.js +6579 -7102
  165. package/lib/msal-browser.js.map +1 -1
  166. package/lib/msal-browser.min.js +65 -62
  167. package/package.json +7 -5
  168. package/src/app/IPublicClientApplication.ts +199 -0
  169. package/src/app/PublicClientApplication.ts +405 -0
  170. package/src/broker/nativeBroker/NativeMessageHandler.ts +419 -0
  171. package/src/broker/nativeBroker/NativeRequest.ts +52 -0
  172. package/src/broker/nativeBroker/NativeResponse.ts +56 -0
  173. package/src/cache/AsyncMemoryStorage.ts +158 -0
  174. package/src/cache/BrowserCacheManager.ts +1994 -0
  175. package/src/cache/BrowserStorage.ts +54 -0
  176. package/src/cache/CryptoKeyStore.ts +63 -0
  177. package/src/cache/DatabaseStorage.ts +287 -0
  178. package/src/cache/IAsyncMemoryStorage.ts +36 -0
  179. package/src/cache/ITokenCache.ts +21 -0
  180. package/src/cache/IWindowStorage.ts +36 -0
  181. package/src/cache/MemoryStorage.ts +42 -0
  182. package/src/cache/TokenCache.ts +484 -0
  183. package/src/config/Configuration.ts +375 -0
  184. package/src/controllers/ControllerFactory.ts +55 -0
  185. package/src/controllers/IController.ts +131 -0
  186. package/src/controllers/StandardController.ts +2107 -0
  187. package/src/crypto/BrowserCrypto.ts +135 -0
  188. package/src/crypto/CryptoOps.ts +247 -0
  189. package/src/crypto/ISubtleCrypto.ts +30 -0
  190. package/src/crypto/ModernBrowserCrypto.ts +69 -0
  191. package/src/crypto/PkceGenerator.ts +76 -0
  192. package/src/crypto/SignedHttpRequest.ts +76 -0
  193. package/src/encode/Base64Decode.ts +26 -0
  194. package/src/encode/Base64Encode.ts +52 -0
  195. package/src/error/BrowserAuthError.ts +340 -0
  196. package/src/error/BrowserAuthErrorCodes.ts +56 -0
  197. package/src/error/BrowserConfigurationAuthError.ts +133 -0
  198. package/src/error/NativeAuthError.ts +141 -0
  199. package/src/event/EventHandler.ts +176 -0
  200. package/src/event/EventMessage.ts +125 -0
  201. package/src/event/EventType.ts +33 -0
  202. package/src/index.ts +152 -0
  203. package/src/interaction_client/BaseInteractionClient.ts +301 -0
  204. package/src/interaction_client/HybridSpaAuthorizationCodeClient.ts +16 -0
  205. package/src/interaction_client/NativeInteractionClient.ts +907 -0
  206. package/src/interaction_client/PopupClient.ts +926 -0
  207. package/src/interaction_client/RedirectClient.ts +616 -0
  208. package/src/interaction_client/SilentAuthCodeClient.ts +163 -0
  209. package/src/interaction_client/SilentCacheClient.ts +133 -0
  210. package/src/interaction_client/SilentIframeClient.ts +301 -0
  211. package/src/interaction_client/SilentRefreshClient.ts +120 -0
  212. package/src/interaction_client/StandardInteractionClient.ts +481 -0
  213. package/src/interaction_handler/InteractionHandler.ts +246 -0
  214. package/src/interaction_handler/RedirectHandler.ts +225 -0
  215. package/src/interaction_handler/SilentHandler.ts +266 -0
  216. package/src/navigation/INavigationClient.ts +23 -0
  217. package/src/navigation/NavigationClient.ts +55 -0
  218. package/src/navigation/NavigationOptions.ts +18 -0
  219. package/src/network/FetchClient.ts +130 -0
  220. package/src/operatingcontext/BaseOperatingContext.ts +82 -0
  221. package/src/operatingcontext/StandardOperatingContext.ts +49 -0
  222. package/src/operatingcontext/TeamsAppOperatingContext.ts +48 -0
  223. package/src/packageMetadata.ts +3 -0
  224. package/src/request/AuthorizationCodeRequest.ts +19 -0
  225. package/src/request/AuthorizationUrlRequest.ts +17 -0
  226. package/src/request/ClearCacheRequest.ts +16 -0
  227. package/src/request/EndSessionPopupRequest.ts +26 -0
  228. package/src/request/EndSessionRequest.ts +23 -0
  229. package/src/request/PopupRequest.ts +51 -0
  230. package/src/request/PopupWindowAttributes.ts +22 -0
  231. package/src/request/RedirectRequest.ts +51 -0
  232. package/src/request/SilentRequest.ts +49 -0
  233. package/src/request/SsoSilentRequest.ts +44 -0
  234. package/src/response/AuthenticationResult.ts +13 -0
  235. package/src/telemetry/BrowserPerformanceClient.ts +226 -0
  236. package/src/telemetry/BrowserPerformanceMeasurement.ts +144 -0
  237. package/src/utils/BrowserConstants.ts +241 -0
  238. package/src/utils/BrowserProtocolUtils.ts +57 -0
  239. package/src/utils/BrowserStringUtils.ts +143 -0
  240. package/src/utils/BrowserUtils.ts +156 -0
  241. package/dist/crypto/GuidGenerator.d.ts +0 -13
  242. package/dist/crypto/GuidGenerator.d.ts.map +0 -1
  243. package/dist/crypto/GuidGenerator.mjs +0 -104
  244. package/dist/crypto/GuidGenerator.mjs.map +0 -1
  245. package/dist/internals.d.ts +0 -23
  246. package/dist/internals.d.ts.map +0 -1
  247. package/dist/internals.mjs +0 -28
  248. package/dist/internals.mjs.map +0 -1
  249. package/dist/network/XhrClient.d.ts +0 -41
  250. package/dist/network/XhrClient.d.ts.map +0 -1
  251. package/dist/network/XhrClient.mjs +0 -125
  252. package/dist/network/XhrClient.mjs.map +0 -1
  253. package/dist/utils/MathUtils.d.ts +0 -12
  254. package/dist/utils/MathUtils.d.ts.map +0 -1
  255. package/dist/utils/MathUtils.mjs +0 -26
  256. package/dist/utils/MathUtils.mjs.map +0 -1
@@ -1,7 +1,59 @@
1
1
  import { AuthError } from "@azure/msal-common";
2
+ import * as BrowserAuthErrorCodes from "./BrowserAuthErrorCodes";
3
+ export { BrowserAuthErrorCodes };
2
4
  /**
3
5
  * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
4
6
  */
7
+ export declare const BrowserAuthErrorMessages: {
8
+ pkce_not_created: string;
9
+ crypto_nonexistent: string;
10
+ empty_navigate_uri: string;
11
+ hash_empty_error: string;
12
+ no_state_in_hash: string;
13
+ hash_does_not_contain_known_properties: string;
14
+ unable_to_parse_state: string;
15
+ state_interaction_type_mismatch: string;
16
+ interaction_in_progress: string;
17
+ popup_window_error: string;
18
+ empty_window_error: string;
19
+ user_cancelled: string;
20
+ monitor_popup_timeout: string;
21
+ monitor_window_timeout: string;
22
+ redirect_in_iframe: string;
23
+ block_iframe_reload: string;
24
+ block_nested_popups: string;
25
+ iframe_closed_prematurely: string;
26
+ silent_logout_unsupported: string;
27
+ no_account_error: string;
28
+ silent_prompt_value_error: string;
29
+ no_token_request_cache_error: string;
30
+ unable_to_parse_token_request_cache_error: string;
31
+ no_cached_authority_error: string;
32
+ auth_request_not_set_error: string;
33
+ invalid_cache_type: string;
34
+ non_browser_environment: string;
35
+ database_not_open: string;
36
+ no_network_connectivity: string;
37
+ post_request_failed: string;
38
+ get_request_failed: string;
39
+ failed_to_parse_response: string;
40
+ unable_to_load_token: string;
41
+ crypto_key_not_found: string;
42
+ auth_code_required: string;
43
+ auth_code_or_nativeAccountId_required: string;
44
+ spa_code_and_nativeAccountId_present: string;
45
+ database_unavailable: string;
46
+ unable_to_acquire_token_from_native_platform: string;
47
+ native_handshake_timeout: string;
48
+ native_extension_not_installed: string;
49
+ native_connection_not_established: string;
50
+ uninitialized_public_client_application: string;
51
+ native_prompt_not_supported: string;
52
+ };
53
+ /**
54
+ * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
55
+ * @deprecated Use BrowserAuthBrowserAuthErrorCodes instead
56
+ */
5
57
  export declare const BrowserAuthErrorMessage: {
6
58
  pkceNotGenerated: {
7
59
  code: string;
@@ -11,10 +63,6 @@ export declare const BrowserAuthErrorMessage: {
11
63
  code: string;
12
64
  desc: string;
13
65
  };
14
- httpMethodNotImplementedError: {
15
- code: string;
16
- desc: string;
17
- };
18
66
  emptyNavigateUriError: {
19
67
  code: string;
20
68
  desc: string;
@@ -188,196 +236,7 @@ export declare const BrowserAuthErrorMessage: {
188
236
  * Browser library error class thrown by the MSAL.js library for SPAs
189
237
  */
190
238
  export declare class BrowserAuthError extends AuthError {
191
- constructor(errorCode: string, errorMessage?: string);
192
- /**
193
- * Creates an error thrown when PKCE is not implemented.
194
- * @param errDetail
195
- */
196
- static createPkceNotGeneratedError(errDetail: string): BrowserAuthError;
197
- /**
198
- * Creates an error thrown when the crypto object is unavailable.
199
- * @param errDetail
200
- */
201
- static createCryptoNotAvailableError(errDetail: string): BrowserAuthError;
202
- /**
203
- * Creates an error thrown when an HTTP method hasn't been implemented by the browser class.
204
- * @param method
205
- */
206
- static createHttpMethodNotImplementedError(method: string): BrowserAuthError;
207
- /**
208
- * Creates an error thrown when the navigation URI is empty.
209
- */
210
- static createEmptyNavigationUriError(): BrowserAuthError;
211
- /**
212
- * Creates an error thrown when the hash string value is unexpectedly empty.
213
- * @param hashValue
214
- */
215
- static createEmptyHashError(): BrowserAuthError;
216
- /**
217
- * Creates an error thrown when the hash string value is unexpectedly empty.
218
- */
219
- static createHashDoesNotContainStateError(): BrowserAuthError;
220
- /**
221
- * Creates an error thrown when the hash string value does not contain known properties
222
- */
223
- static createHashDoesNotContainKnownPropertiesError(): BrowserAuthError;
224
- /**
225
- * Creates an error thrown when the hash string value is unexpectedly empty.
226
- */
227
- static createUnableToParseStateError(): BrowserAuthError;
228
- /**
229
- * Creates an error thrown when the state value in the hash does not match the interaction type of the API attempting to consume it.
230
- */
231
- static createStateInteractionTypeMismatchError(): BrowserAuthError;
232
- /**
233
- * Creates an error thrown when a browser interaction (redirect or popup) is in progress.
234
- */
235
- static createInteractionInProgressError(): BrowserAuthError;
236
- /**
237
- * Creates an error thrown when the popup window could not be opened.
238
- * @param errDetail
239
- */
240
- static createPopupWindowError(errDetail?: string): BrowserAuthError;
241
- /**
242
- * Creates an error thrown when window.open returns an empty window object.
243
- * @param errDetail
244
- */
245
- static createEmptyWindowCreatedError(): BrowserAuthError;
246
- /**
247
- * Creates an error thrown when the user closes a popup.
248
- */
249
- static createUserCancelledError(): BrowserAuthError;
250
- /**
251
- * Creates an error thrown when monitorPopupFromHash times out for a given popup.
252
- */
253
- static createMonitorPopupTimeoutError(): BrowserAuthError;
254
- /**
255
- * Creates an error thrown when monitorIframeFromHash times out for a given iframe.
256
- */
257
- static createMonitorIframeTimeoutError(): BrowserAuthError;
258
- /**
259
- * Creates an error thrown when navigateWindow is called inside an iframe or brokered applications.
260
- * @param windowParentCheck
261
- */
262
- static createRedirectInIframeError(windowParentCheck: boolean): BrowserAuthError;
263
- /**
264
- * Creates an error thrown when an auth reload is done inside an iframe.
265
- */
266
- static createBlockReloadInHiddenIframeError(): BrowserAuthError;
267
- /**
268
- * Creates an error thrown when a popup attempts to call an acquireToken API
269
- * @returns
270
- */
271
- static createBlockAcquireTokenInPopupsError(): BrowserAuthError;
272
- /**
273
- * Creates an error thrown when an iframe is found to be closed before the timeout is reached.
274
- */
275
- static createIframeClosedPrematurelyError(): BrowserAuthError;
276
- /**
277
- * Creates an error thrown when the logout API is called on any of the silent interaction clients
278
- */
279
- static createSilentLogoutUnsupportedError(): BrowserAuthError;
280
- /**
281
- * Creates an error thrown when the account object is not provided in the acquireTokenSilent API.
282
- */
283
- static createNoAccountError(): BrowserAuthError;
284
- /**
285
- * Creates an error thrown when a given prompt value is invalid for silent requests.
286
- */
287
- static createSilentPromptValueError(givenPrompt: string): BrowserAuthError;
288
- /**
289
- * Creates an error thrown when the cached token request could not be retrieved from the cache
290
- */
291
- static createUnableToParseTokenRequestCacheError(): BrowserAuthError;
292
- /**
293
- * Creates an error thrown when the token request could not be retrieved from the cache
294
- */
295
- static createNoTokenRequestCacheError(): BrowserAuthError;
296
- /**
297
- * Creates an error thrown when handleCodeResponse is called before initiateAuthRequest (InteractionHandler)
298
- */
299
- static createAuthRequestNotSetError(): BrowserAuthError;
300
- /**
301
- * Creates an error thrown when the authority could not be retrieved from the cache
302
- */
303
- static createNoCachedAuthorityError(): BrowserAuthError;
304
- /**
305
- * Creates an error thrown if cache type is invalid.
306
- */
307
- static createInvalidCacheTypeError(): BrowserAuthError;
308
- /**
309
- * Create an error thrown when login and token requests are made from a non-browser environment
310
- */
311
- static createNonBrowserEnvironmentError(): BrowserAuthError;
312
- /**
313
- * Create an error thrown when indexDB database is not open
314
- */
315
- static createDatabaseNotOpenError(): BrowserAuthError;
316
- /**
317
- * Create an error thrown when token fetch fails due to no internet
318
- */
319
- static createNoNetworkConnectivityError(): BrowserAuthError;
320
- /**
321
- * Create an error thrown when token fetch fails due to reasons other than internet connectivity
322
- */
323
- static createPostRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError;
324
- /**
325
- * Create an error thrown when get request fails due to reasons other than internet connectivity
326
- */
327
- static createGetRequestFailedError(errorDesc: string, endpoint: string): BrowserAuthError;
328
- /**
329
- * Create an error thrown when network client fails to parse network response
330
- */
331
- static createFailedToParseNetworkResponseError(endpoint: string): BrowserAuthError;
332
- /**
333
- * Create an error thrown when the necessary information is not available to sideload tokens
334
- */
335
- static createUnableToLoadTokenError(errorDetail: string): BrowserAuthError;
336
- /**
337
- * Create an error thrown when the queried cryptographic key is not found in IndexedDB
338
- */
339
- static createSigningKeyNotFoundInStorageError(keyId: string): BrowserAuthError;
340
- /**
341
- * Create an error when an authorization code is required but not provided
342
- */
343
- static createAuthCodeRequiredError(): BrowserAuthError;
344
- /**
345
- * Create an error when an authorization code or native account ID is required but not provided
346
- */
347
- static createAuthCodeOrNativeAccountIdRequiredError(): BrowserAuthError;
348
- /**
349
- * Create an error when both authorization code and native account ID are provided
350
- */
351
- static createSpaCodeAndNativeAccountIdPresentError(): BrowserAuthError;
352
- /**
353
- * Create an error when IndexedDB is unavailable
354
- */
355
- static createDatabaseUnavailableError(): BrowserAuthError;
356
- /**
357
- * Create an error when native token acquisition is not possible
358
- */
359
- static createUnableToAcquireTokenFromNativePlatformError(): BrowserAuthError;
360
- /**
361
- * Create an error thrown when Handshake with browser extension times out
362
- */
363
- static createNativeHandshakeTimeoutError(): BrowserAuthError;
364
- /**
365
- * Create an error thrown when browser extension is not installed
366
- */
367
- static createNativeExtensionNotInstalledError(): BrowserAuthError;
368
- /**
369
- * Create an error when native connection has not been established
370
- * @returns
371
- */
372
- static createNativeConnectionNotEstablishedError(): BrowserAuthError;
373
- /**
374
- * Create an error thrown when the initialize function hasn't been called
375
- */
376
- static createUninitializedPublicClientApplication(): BrowserAuthError;
377
- /**
378
- * Create an error thrown when requesting a token directly from the native platform with an unsupported prompt parameter e.g. select_account, login or create
379
- * These requests must go through eSTS to ensure eSTS is aware of the new account
380
- */
381
- static createNativePromptParameterNotSupportedError(): BrowserAuthError;
239
+ constructor(errorCode: string);
382
240
  }
241
+ export declare function createBrowserAuthError(errorCode: string): BrowserAuthError;
383
242
  //# sourceMappingURL=BrowserAuthError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserAuthError.d.ts","sourceRoot":"","sources":["../../src/error/BrowserAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqLnC,CAAC;AAEF;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;gBAC/B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAOpD;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAOvE;;;OAGG;IACH,MAAM,CAAC,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAOzE;;;OAGG;IACH,MAAM,CAAC,mCAAmC,CACtC,MAAM,EAAE,MAAM,GACf,gBAAgB;IAOnB;;OAEG;IACH,MAAM,CAAC,6BAA6B,IAAI,gBAAgB;IAOxD;;;OAGG;IACH,MAAM,CAAC,oBAAoB,IAAI,gBAAgB;IAO/C;;OAEG;IACH,MAAM,CAAC,kCAAkC,IAAI,gBAAgB;IAO7D;;OAEG;IACH,MAAM,CAAC,4CAA4C,IAAI,gBAAgB;IAOvE;;OAEG;IACH,MAAM,CAAC,6BAA6B,IAAI,gBAAgB;IAOxD;;OAEG;IACH,MAAM,CAAC,uCAAuC,IAAI,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