@azure/msal-browser 3.0.0-alpha.1 → 3.0.0-beta.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 (178) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +213 -213
  3. package/dist/app/IPublicClientApplication.d.ts +45 -45
  4. package/dist/app/IPublicClientApplication.js +96 -96
  5. package/dist/app/PublicClientApplication.d.ts +244 -244
  6. package/dist/app/PublicClientApplication.js +307 -307
  7. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +63 -63
  8. package/dist/broker/nativeBroker/NativeMessageHandler.js +255 -255
  9. package/dist/broker/nativeBroker/NativeRequest.d.ts +43 -43
  10. package/dist/broker/nativeBroker/NativeResponse.d.ts +48 -48
  11. package/dist/cache/AsyncMemoryStorage.d.ts +51 -51
  12. package/dist/cache/AsyncMemoryStorage.js +132 -132
  13. package/dist/cache/BrowserCacheManager.d.ts +376 -377
  14. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  15. package/dist/cache/BrowserCacheManager.js +1275 -1276
  16. package/dist/cache/BrowserCacheManager.js.map +1 -1
  17. package/dist/cache/BrowserStorage.d.ts +11 -11
  18. package/dist/cache/BrowserStorage.js +35 -35
  19. package/dist/cache/CryptoKeyStore.d.ts +18 -17
  20. package/dist/cache/CryptoKeyStore.d.ts.map +1 -1
  21. package/dist/cache/CryptoKeyStore.js +40 -41
  22. package/dist/cache/CryptoKeyStore.js.map +1 -1
  23. package/dist/cache/DatabaseStorage.d.ts +56 -56
  24. package/dist/cache/DatabaseStorage.js +190 -190
  25. package/dist/cache/IAsyncMemoryStorage.d.ts +27 -27
  26. package/dist/cache/ITokenCache.d.ts +10 -10
  27. package/dist/cache/IWindowStorage.d.ts +27 -27
  28. package/dist/cache/MemoryStorage.d.ts +11 -11
  29. package/dist/cache/MemoryStorage.js +31 -31
  30. package/dist/cache/TokenCache.d.ts +76 -76
  31. package/dist/cache/TokenCache.js +225 -225
  32. package/dist/config/Configuration.d.ts +187 -203
  33. package/dist/config/Configuration.d.ts.map +1 -1
  34. package/dist/config/Configuration.js +97 -101
  35. package/dist/config/Configuration.js.map +1 -1
  36. package/dist/controllers/ControllerFactory.d.ts +9 -9
  37. package/dist/controllers/ControllerFactory.js +37 -37
  38. package/dist/controllers/IController.d.ts +66 -66
  39. package/dist/controllers/IController.d.ts.map +1 -1
  40. package/dist/controllers/StandardController.d.ts +413 -413
  41. package/dist/controllers/StandardController.d.ts.map +1 -1
  42. package/dist/controllers/StandardController.js +1277 -1272
  43. package/dist/controllers/StandardController.js.map +1 -1
  44. package/dist/crypto/BrowserCrypto.d.ts +49 -61
  45. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  46. package/dist/crypto/BrowserCrypto.js +93 -134
  47. package/dist/crypto/BrowserCrypto.js.map +1 -1
  48. package/dist/crypto/CryptoOps.d.ts +72 -73
  49. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  50. package/dist/crypto/CryptoOps.js +150 -150
  51. package/dist/crypto/CryptoOps.js.map +1 -1
  52. package/dist/crypto/GuidGenerator.d.ts +12 -12
  53. package/dist/crypto/GuidGenerator.js +96 -96
  54. package/dist/crypto/ISubtleCrypto.d.ts +9 -9
  55. package/dist/crypto/ModernBrowserCrypto.d.ts +9 -9
  56. package/dist/crypto/ModernBrowserCrypto.js +24 -24
  57. package/dist/crypto/PkceGenerator.d.ts +24 -24
  58. package/dist/crypto/PkceGenerator.js +58 -58
  59. package/dist/crypto/SignedHttpRequest.d.ts +30 -30
  60. package/dist/crypto/SignedHttpRequest.js +39 -39
  61. package/dist/encode/Base64Decode.d.ts +22 -22
  62. package/dist/encode/Base64Decode.js +73 -73
  63. package/dist/encode/Base64Encode.d.ts +31 -31
  64. package/dist/encode/Base64Encode.js +79 -79
  65. package/dist/error/BrowserAuthError.d.ts +382 -382
  66. package/dist/error/BrowserAuthError.js +483 -483
  67. package/dist/error/BrowserConfigurationAuthError.d.ts +70 -70
  68. package/dist/error/BrowserConfigurationAuthError.js +96 -96
  69. package/dist/error/NativeAuthError.d.ts +57 -56
  70. package/dist/error/NativeAuthError.d.ts.map +1 -1
  71. package/dist/error/NativeAuthError.js +93 -88
  72. package/dist/error/NativeAuthError.js.map +1 -1
  73. package/dist/event/EventHandler.d.ts +41 -41
  74. package/dist/event/EventHandler.js +119 -119
  75. package/dist/event/EventMessage.d.ts +25 -25
  76. package/dist/event/EventMessage.d.ts.map +1 -1
  77. package/dist/event/EventMessage.js +68 -67
  78. package/dist/event/EventMessage.js.map +1 -1
  79. package/dist/event/EventType.d.ts +28 -26
  80. package/dist/event/EventType.d.ts.map +1 -1
  81. package/dist/event/EventType.js +32 -32
  82. package/dist/event/EventType.js.map +1 -1
  83. package/dist/index.d.ts +35 -35
  84. package/dist/index.js +1 -1
  85. package/dist/interaction_client/BaseInteractionClient.d.ts +53 -52
  86. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  87. package/dist/interaction_client/BaseInteractionClient.js +151 -138
  88. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  89. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +4 -4
  90. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +10 -10
  91. package/dist/interaction_client/NativeInteractionClient.d.ts +148 -148
  92. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  93. package/dist/interaction_client/NativeInteractionClient.js +521 -517
  94. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  95. package/dist/interaction_client/PopupClient.d.ts +111 -111
  96. package/dist/interaction_client/PopupClient.js +476 -476
  97. package/dist/interaction_client/RedirectClient.d.ts +48 -48
  98. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  99. package/dist/interaction_client/RedirectClient.js +291 -290
  100. package/dist/interaction_client/RedirectClient.js.map +1 -1
  101. package/dist/interaction_client/SilentAuthCodeClient.d.ts +22 -22
  102. package/dist/interaction_client/SilentAuthCodeClient.js +62 -62
  103. package/dist/interaction_client/SilentCacheClient.d.ts +21 -21
  104. package/dist/interaction_client/SilentCacheClient.js +67 -67
  105. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  106. package/dist/interaction_client/SilentIframeClient.d.ts +31 -31
  107. package/dist/interaction_client/SilentIframeClient.js +127 -127
  108. package/dist/interaction_client/SilentRefreshClient.d.ts +19 -19
  109. package/dist/interaction_client/SilentRefreshClient.js +62 -62
  110. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  111. package/dist/interaction_client/StandardInteractionClient.d.ts +59 -59
  112. package/dist/interaction_client/StandardInteractionClient.js +259 -259
  113. package/dist/interaction_handler/InteractionHandler.d.ts +39 -39
  114. package/dist/interaction_handler/InteractionHandler.js +127 -127
  115. package/dist/interaction_handler/RedirectHandler.d.ts +24 -24
  116. package/dist/interaction_handler/RedirectHandler.js +118 -118
  117. package/dist/interaction_handler/SilentHandler.d.ts +47 -47
  118. package/dist/interaction_handler/SilentHandler.js +162 -162
  119. package/dist/internals.d.ts +23 -23
  120. package/dist/internals.js +4 -4
  121. package/dist/navigation/INavigationClient.d.ts +16 -16
  122. package/dist/navigation/NavigationClient.d.ts +22 -22
  123. package/dist/navigation/NavigationClient.js +40 -40
  124. package/dist/navigation/NavigationOptions.d.ts +12 -12
  125. package/dist/network/FetchClient.d.ts +26 -26
  126. package/dist/network/FetchClient.js +99 -99
  127. package/dist/network/XhrClient.d.ts +40 -40
  128. package/dist/network/XhrClient.js +117 -117
  129. package/dist/operatingcontext/BaseOperatingContext.d.ts +40 -40
  130. package/dist/operatingcontext/BaseOperatingContext.js +44 -44
  131. package/dist/operatingcontext/StandardOperatingContext.d.ts +25 -25
  132. package/dist/operatingcontext/StandardOperatingContext.js +43 -43
  133. package/dist/operatingcontext/TeamsAppOperatingContext.d.ts +25 -25
  134. package/dist/operatingcontext/TeamsAppOperatingContext.js +42 -42
  135. package/dist/packageMetadata.d.ts +2 -2
  136. package/dist/packageMetadata.d.ts.map +1 -1
  137. package/dist/packageMetadata.js +4 -4
  138. package/dist/request/AuthorizationCodeRequest.d.ts +8 -8
  139. package/dist/request/AuthorizationUrlRequest.d.ts +8 -8
  140. package/dist/request/EndSessionPopupRequest.d.ts +18 -18
  141. package/dist/request/EndSessionRequest.d.ts +15 -15
  142. package/dist/request/PopupRequest.d.ts +32 -32
  143. package/dist/request/PopupWindowAttributes.d.ts +15 -15
  144. package/dist/request/RedirectRequest.d.ts +33 -33
  145. package/dist/request/SilentRequest.d.ts +30 -30
  146. package/dist/request/SsoSilentRequest.d.ts +26 -26
  147. package/dist/telemetry/BrowserPerformanceClient.d.ts +37 -38
  148. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  149. package/dist/telemetry/BrowserPerformanceClient.js +124 -124
  150. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  151. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +21 -21
  152. package/dist/telemetry/BrowserPerformanceMeasurement.js +92 -92
  153. package/dist/utils/BrowserConstants.d.ts +176 -166
  154. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  155. package/dist/utils/BrowserConstants.js +205 -215
  156. package/dist/utils/BrowserConstants.js.map +1 -1
  157. package/dist/utils/BrowserProtocolUtils.d.ts +18 -18
  158. package/dist/utils/BrowserProtocolUtils.js +34 -34
  159. package/dist/utils/BrowserStringUtils.d.ts +26 -26
  160. package/dist/utils/BrowserStringUtils.js +149 -149
  161. package/dist/utils/BrowserUtils.d.ts +65 -65
  162. package/dist/utils/BrowserUtils.js +138 -138
  163. package/dist/utils/MathUtils.d.ts +11 -11
  164. package/dist/utils/MathUtils.js +21 -21
  165. package/lib/msal-browser.cjs.js +18227 -0
  166. package/lib/msal-browser.cjs.js.map +1 -0
  167. package/lib/msal-browser.js +18233 -0
  168. package/lib/msal-browser.js.map +1 -0
  169. package/lib/msal-browser.min.js +63 -0
  170. package/package.json +101 -95
  171. package/dist/crypto/MsBrowserCrypto.d.ts +0 -10
  172. package/dist/crypto/MsBrowserCrypto.d.ts.map +0 -1
  173. package/dist/crypto/MsBrowserCrypto.js +0 -88
  174. package/dist/crypto/MsBrowserCrypto.js.map +0 -1
  175. package/dist/crypto/MsrBrowserCrypto.d.ts +0 -18
  176. package/dist/crypto/MsrBrowserCrypto.d.ts.map +0 -1
  177. package/dist/crypto/MsrBrowserCrypto.js +0 -35
  178. package/dist/crypto/MsrBrowserCrypto.js.map +0 -1
@@ -1,383 +1,383 @@
1
- import { AuthError } from "@azure/msal-common";
2
- /**
3
- * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
4
- */
5
- export declare const BrowserAuthErrorMessage: {
6
- pkceNotGenerated: {
7
- code: string;
8
- desc: string;
9
- };
10
- cryptoDoesNotExist: {
11
- code: string;
12
- desc: string;
13
- };
14
- httpMethodNotImplementedError: {
15
- code: string;
16
- desc: string;
17
- };
18
- emptyNavigateUriError: {
19
- code: string;
20
- desc: string;
21
- };
22
- hashEmptyError: {
23
- code: string;
24
- desc: string;
25
- };
26
- hashDoesNotContainStateError: {
27
- code: string;
28
- desc: string;
29
- };
30
- hashDoesNotContainKnownPropertiesError: {
31
- code: string;
32
- desc: string;
33
- };
34
- unableToParseStateError: {
35
- code: string;
36
- desc: string;
37
- };
38
- stateInteractionTypeMismatchError: {
39
- code: string;
40
- desc: string;
41
- };
42
- interactionInProgress: {
43
- code: string;
44
- desc: string;
45
- };
46
- popupWindowError: {
47
- code: string;
48
- desc: string;
49
- };
50
- emptyWindowError: {
51
- code: string;
52
- desc: string;
53
- };
54
- userCancelledError: {
55
- code: string;
56
- desc: string;
57
- };
58
- monitorPopupTimeoutError: {
59
- code: string;
60
- desc: string;
61
- };
62
- monitorIframeTimeoutError: {
63
- code: string;
64
- desc: string;
65
- };
66
- redirectInIframeError: {
67
- code: string;
68
- desc: string;
69
- };
70
- blockTokenRequestsInHiddenIframeError: {
71
- code: string;
72
- desc: string;
73
- };
74
- blockAcquireTokenInPopupsError: {
75
- code: string;
76
- desc: string;
77
- };
78
- iframeClosedPrematurelyError: {
79
- code: string;
80
- desc: string;
81
- };
82
- silentLogoutUnsupportedError: {
83
- code: string;
84
- desc: string;
85
- };
86
- noAccountError: {
87
- code: string;
88
- desc: string;
89
- };
90
- silentPromptValueError: {
91
- code: string;
92
- desc: string;
93
- };
94
- noTokenRequestCacheError: {
95
- code: string;
96
- desc: string;
97
- };
98
- unableToParseTokenRequestCacheError: {
99
- code: string;
100
- desc: string;
101
- };
102
- noCachedAuthorityError: {
103
- code: string;
104
- desc: string;
105
- };
106
- authRequestNotSet: {
107
- code: string;
108
- desc: string;
109
- };
110
- invalidCacheType: {
111
- code: string;
112
- desc: string;
113
- };
114
- notInBrowserEnvironment: {
115
- code: string;
116
- desc: string;
117
- };
118
- databaseNotOpen: {
119
- code: string;
120
- desc: string;
121
- };
122
- noNetworkConnectivity: {
123
- code: string;
124
- desc: string;
125
- };
126
- postRequestFailed: {
127
- code: string;
128
- desc: string;
129
- };
130
- getRequestFailed: {
131
- code: string;
132
- desc: string;
133
- };
134
- failedToParseNetworkResponse: {
135
- code: string;
136
- desc: string;
137
- };
138
- unableToLoadTokenError: {
139
- code: string;
140
- desc: string;
141
- };
142
- signingKeyNotFoundInStorage: {
143
- code: string;
144
- desc: string;
145
- };
146
- authCodeRequired: {
147
- code: string;
148
- desc: string;
149
- };
150
- authCodeOrNativeAccountRequired: {
151
- code: string;
152
- desc: string;
153
- };
154
- spaCodeAndNativeAccountPresent: {
155
- code: string;
156
- desc: string;
157
- };
158
- databaseUnavailable: {
159
- code: string;
160
- desc: string;
161
- };
162
- unableToAcquireTokenFromNativePlatform: {
163
- code: string;
164
- desc: string;
165
- };
166
- nativeHandshakeTimeout: {
167
- code: string;
168
- desc: string;
169
- };
170
- nativeExtensionNotInstalled: {
171
- code: string;
172
- desc: string;
173
- };
174
- nativeConnectionNotEstablished: {
175
- code: string;
176
- desc: string;
177
- };
178
- nativeBrokerCalledBeforeInitialize: {
179
- code: string;
180
- desc: string;
181
- };
182
- nativePromptNotSupported: {
183
- code: string;
184
- desc: string;
185
- };
186
- };
187
- /**
188
- * Browser library error class thrown by the MSAL.js library for SPAs
189
- */
190
- 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 createNativeBrokerCalledBeforeInitialize(): 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;
382
- }
1
+ import { AuthError } from "@azure/msal-common";
2
+ /**
3
+ * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
4
+ */
5
+ export declare const BrowserAuthErrorMessage: {
6
+ pkceNotGenerated: {
7
+ code: string;
8
+ desc: string;
9
+ };
10
+ cryptoDoesNotExist: {
11
+ code: string;
12
+ desc: string;
13
+ };
14
+ httpMethodNotImplementedError: {
15
+ code: string;
16
+ desc: string;
17
+ };
18
+ emptyNavigateUriError: {
19
+ code: string;
20
+ desc: string;
21
+ };
22
+ hashEmptyError: {
23
+ code: string;
24
+ desc: string;
25
+ };
26
+ hashDoesNotContainStateError: {
27
+ code: string;
28
+ desc: string;
29
+ };
30
+ hashDoesNotContainKnownPropertiesError: {
31
+ code: string;
32
+ desc: string;
33
+ };
34
+ unableToParseStateError: {
35
+ code: string;
36
+ desc: string;
37
+ };
38
+ stateInteractionTypeMismatchError: {
39
+ code: string;
40
+ desc: string;
41
+ };
42
+ interactionInProgress: {
43
+ code: string;
44
+ desc: string;
45
+ };
46
+ popupWindowError: {
47
+ code: string;
48
+ desc: string;
49
+ };
50
+ emptyWindowError: {
51
+ code: string;
52
+ desc: string;
53
+ };
54
+ userCancelledError: {
55
+ code: string;
56
+ desc: string;
57
+ };
58
+ monitorPopupTimeoutError: {
59
+ code: string;
60
+ desc: string;
61
+ };
62
+ monitorIframeTimeoutError: {
63
+ code: string;
64
+ desc: string;
65
+ };
66
+ redirectInIframeError: {
67
+ code: string;
68
+ desc: string;
69
+ };
70
+ blockTokenRequestsInHiddenIframeError: {
71
+ code: string;
72
+ desc: string;
73
+ };
74
+ blockAcquireTokenInPopupsError: {
75
+ code: string;
76
+ desc: string;
77
+ };
78
+ iframeClosedPrematurelyError: {
79
+ code: string;
80
+ desc: string;
81
+ };
82
+ silentLogoutUnsupportedError: {
83
+ code: string;
84
+ desc: string;
85
+ };
86
+ noAccountError: {
87
+ code: string;
88
+ desc: string;
89
+ };
90
+ silentPromptValueError: {
91
+ code: string;
92
+ desc: string;
93
+ };
94
+ noTokenRequestCacheError: {
95
+ code: string;
96
+ desc: string;
97
+ };
98
+ unableToParseTokenRequestCacheError: {
99
+ code: string;
100
+ desc: string;
101
+ };
102
+ noCachedAuthorityError: {
103
+ code: string;
104
+ desc: string;
105
+ };
106
+ authRequestNotSet: {
107
+ code: string;
108
+ desc: string;
109
+ };
110
+ invalidCacheType: {
111
+ code: string;
112
+ desc: string;
113
+ };
114
+ notInBrowserEnvironment: {
115
+ code: string;
116
+ desc: string;
117
+ };
118
+ databaseNotOpen: {
119
+ code: string;
120
+ desc: string;
121
+ };
122
+ noNetworkConnectivity: {
123
+ code: string;
124
+ desc: string;
125
+ };
126
+ postRequestFailed: {
127
+ code: string;
128
+ desc: string;
129
+ };
130
+ getRequestFailed: {
131
+ code: string;
132
+ desc: string;
133
+ };
134
+ failedToParseNetworkResponse: {
135
+ code: string;
136
+ desc: string;
137
+ };
138
+ unableToLoadTokenError: {
139
+ code: string;
140
+ desc: string;
141
+ };
142
+ signingKeyNotFoundInStorage: {
143
+ code: string;
144
+ desc: string;
145
+ };
146
+ authCodeRequired: {
147
+ code: string;
148
+ desc: string;
149
+ };
150
+ authCodeOrNativeAccountRequired: {
151
+ code: string;
152
+ desc: string;
153
+ };
154
+ spaCodeAndNativeAccountPresent: {
155
+ code: string;
156
+ desc: string;
157
+ };
158
+ databaseUnavailable: {
159
+ code: string;
160
+ desc: string;
161
+ };
162
+ unableToAcquireTokenFromNativePlatform: {
163
+ code: string;
164
+ desc: string;
165
+ };
166
+ nativeHandshakeTimeout: {
167
+ code: string;
168
+ desc: string;
169
+ };
170
+ nativeExtensionNotInstalled: {
171
+ code: string;
172
+ desc: string;
173
+ };
174
+ nativeConnectionNotEstablished: {
175
+ code: string;
176
+ desc: string;
177
+ };
178
+ nativeBrokerCalledBeforeInitialize: {
179
+ code: string;
180
+ desc: string;
181
+ };
182
+ nativePromptNotSupported: {
183
+ code: string;
184
+ desc: string;
185
+ };
186
+ };
187
+ /**
188
+ * Browser library error class thrown by the MSAL.js library for SPAs
189
+ */
190
+ 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 createNativeBrokerCalledBeforeInitialize(): 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;
382
+ }
383
383
  //# sourceMappingURL=BrowserAuthError.d.ts.map