@azure/msal-browser 3.20.0 → 3.22.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.
- package/dist/app/IPublicClientApplication.d.ts +53 -53
- package/dist/app/IPublicClientApplication.mjs +105 -105
- package/dist/app/PublicClientApplication.d.ts +293 -293
- package/dist/app/PublicClientApplication.mjs +364 -364
- package/dist/app/PublicClientNext.d.ts +276 -276
- package/dist/app/PublicClientNext.mjs +354 -354
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +62 -62
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +254 -254
- package/dist/broker/nativeBroker/NativeRequest.d.ts +45 -45
- package/dist/broker/nativeBroker/NativeResponse.d.ts +48 -48
- package/dist/broker/nativeBroker/NativeStatusCodes.d.ts +7 -7
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +11 -11
- package/dist/cache/AccountManager.d.ts +48 -48
- package/dist/cache/AccountManager.mjs +126 -126
- package/dist/cache/AsyncMemoryStorage.d.ts +50 -50
- package/dist/cache/AsyncMemoryStorage.mjs +131 -131
- package/dist/cache/BrowserCacheManager.d.ts +385 -385
- package/dist/cache/BrowserCacheManager.mjs +1294 -1294
- package/dist/cache/BrowserStorage.d.ts +11 -11
- package/dist/cache/BrowserStorage.mjs +32 -32
- package/dist/cache/DatabaseStorage.d.ts +56 -56
- package/dist/cache/DatabaseStorage.mjs +200 -200
- package/dist/cache/IAsyncStorage.d.ts +27 -27
- package/dist/cache/ITokenCache.d.ts +11 -11
- package/dist/cache/IWindowStorage.d.ts +27 -27
- package/dist/cache/MemoryStorage.d.ts +11 -11
- package/dist/cache/MemoryStorage.mjs +31 -31
- package/dist/cache/TokenCache.d.ts +77 -77
- package/dist/cache/TokenCache.mjs +195 -195
- package/dist/config/Configuration.d.ts +213 -208
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +128 -128
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/ControllerFactory.d.ts +5 -5
- package/dist/controllers/ControllerFactory.mjs +25 -25
- package/dist/controllers/IController.d.ts +60 -60
- package/dist/controllers/NestedAppAuthController.d.ts +202 -202
- package/dist/controllers/NestedAppAuthController.mjs +473 -473
- package/dist/controllers/StandardController.d.ts +405 -405
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +1334 -1316
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.d.ts +86 -86
- package/dist/controllers/UnknownOperatingContextController.mjs +256 -256
- package/dist/crypto/BrowserCrypto.d.ts +52 -52
- package/dist/crypto/BrowserCrypto.mjs +151 -151
- package/dist/crypto/CryptoOps.d.ts +74 -74
- package/dist/crypto/CryptoOps.mjs +176 -176
- package/dist/crypto/PkceGenerator.d.ts +8 -8
- package/dist/crypto/PkceGenerator.mjs +54 -54
- package/dist/crypto/SignedHttpRequest.d.ts +30 -30
- package/dist/crypto/SignedHttpRequest.mjs +39 -39
- package/dist/encode/Base64Decode.d.ts +9 -9
- package/dist/encode/Base64Decode.mjs +36 -36
- package/dist/encode/Base64Encode.d.ts +19 -19
- package/dist/encode/Base64Encode.mjs +43 -43
- package/dist/error/BrowserAuthError.d.ts +255 -255
- package/dist/error/BrowserAuthError.mjs +263 -263
- package/dist/error/BrowserAuthErrorCodes.d.ts +46 -46
- package/dist/error/BrowserAuthErrorCodes.mjs +50 -50
- package/dist/error/BrowserConfigurationAuthError.d.ts +33 -33
- package/dist/error/BrowserConfigurationAuthError.mjs +40 -40
- package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts +3 -3
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +7 -7
- package/dist/error/NativeAuthError.d.ts +29 -29
- package/dist/error/NativeAuthError.mjs +60 -60
- package/dist/error/NativeAuthErrorCodes.d.ts +2 -2
- package/dist/error/NativeAuthErrorCodes.mjs +6 -6
- package/dist/error/NestedAppAuthError.d.ts +14 -14
- package/dist/error/NestedAppAuthError.mjs +23 -23
- package/dist/event/EventHandler.d.ts +41 -41
- package/dist/event/EventHandler.mjs +125 -125
- package/dist/event/EventMessage.d.ts +25 -25
- package/dist/event/EventMessage.mjs +68 -68
- package/dist/event/EventType.d.ts +29 -29
- package/dist/event/EventType.mjs +32 -32
- package/dist/index.d.ts +40 -40
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +50 -50
- package/dist/interaction_client/BaseInteractionClient.mjs +106 -106
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +4 -4
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +10 -10
- package/dist/interaction_client/NativeInteractionClient.d.ts +151 -151
- package/dist/interaction_client/NativeInteractionClient.mjs +621 -621
- package/dist/interaction_client/PopupClient.d.ts +105 -105
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +433 -433
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +50 -50
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +315 -314
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts +23 -23
- package/dist/interaction_client/SilentAuthCodeClient.mjs +57 -57
- package/dist/interaction_client/SilentCacheClient.d.ts +16 -16
- package/dist/interaction_client/SilentCacheClient.mjs +42 -42
- package/dist/interaction_client/SilentIframeClient.d.ts +32 -32
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +110 -100
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts +20 -20
- package/dist/interaction_client/SilentRefreshClient.mjs +47 -47
- package/dist/interaction_client/StandardInteractionClient.d.ts +48 -48
- package/dist/interaction_client/StandardInteractionClient.mjs +199 -199
- package/dist/interaction_handler/InteractionHandler.d.ts +33 -33
- package/dist/interaction_handler/InteractionHandler.mjs +93 -93
- package/dist/interaction_handler/RedirectHandler.d.ts +32 -32
- package/dist/interaction_handler/RedirectHandler.mjs +134 -134
- package/dist/interaction_handler/SilentHandler.d.ts +13 -13
- package/dist/interaction_handler/SilentHandler.mjs +134 -134
- package/dist/naa/AccountInfo.d.ts +11 -11
- package/dist/naa/AuthBridge.d.ts +8 -8
- package/dist/naa/AuthResult.d.ts +6 -6
- package/dist/naa/BridgeAccountContext.d.ts +12 -12
- package/dist/naa/BridgeCapabilities.d.ts +3 -3
- package/dist/naa/BridgeError.d.ts +9 -9
- package/dist/naa/BridgeError.mjs +7 -7
- package/dist/naa/BridgeProxy.d.ts +67 -67
- package/dist/naa/BridgeProxy.mjs +148 -148
- package/dist/naa/BridgeRequest.d.ts +7 -7
- package/dist/naa/BridgeRequestEnvelope.d.ts +12 -12
- package/dist/naa/BridgeResponseEnvelope.d.ts +13 -13
- package/dist/naa/BridgeStatusCode.d.ts +11 -11
- package/dist/naa/BridgeStatusCode.mjs +14 -14
- package/dist/naa/IBridgeProxy.d.ts +10 -10
- package/dist/naa/InitContext.d.ts +8 -8
- package/dist/naa/TokenRequest.d.ts +18 -18
- package/dist/naa/TokenResponse.d.ts +13 -13
- package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +35 -35
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +179 -179
- package/dist/navigation/INavigationClient.d.ts +16 -16
- package/dist/navigation/NavigationClient.d.ts +22 -22
- package/dist/navigation/NavigationClient.mjs +40 -40
- package/dist/navigation/NavigationOptions.d.ts +12 -12
- package/dist/network/FetchClient.d.ts +26 -26
- package/dist/network/FetchClient.mjs +99 -99
- package/dist/operatingcontext/BaseOperatingContext.d.ts +41 -41
- package/dist/operatingcontext/BaseOperatingContext.mjs +94 -94
- package/dist/operatingcontext/NestedAppOperatingContext.d.ts +34 -34
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +71 -71
- package/dist/operatingcontext/StandardOperatingContext.d.ts +25 -25
- package/dist/operatingcontext/StandardOperatingContext.mjs +43 -43
- package/dist/operatingcontext/UnknownOperatingContext.d.ts +25 -25
- package/dist/operatingcontext/UnknownOperatingContext.mjs +42 -42
- package/dist/packageMetadata.d.ts +2 -2
- package/dist/packageMetadata.mjs +4 -4
- package/dist/request/AuthorizationCodeRequest.d.ts +8 -8
- package/dist/request/AuthorizationUrlRequest.d.ts +8 -8
- package/dist/request/ClearCacheRequest.d.ts +10 -10
- package/dist/request/EndSessionPopupRequest.d.ts +18 -18
- package/dist/request/EndSessionRequest.d.ts +15 -15
- package/dist/request/InitializeApplicationRequest.d.ts +8 -8
- package/dist/request/PopupRequest.d.ts +34 -34
- package/dist/request/PopupWindowAttributes.d.ts +15 -15
- package/dist/request/RedirectRequest.d.ts +40 -35
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/request/RequestHelpers.d.ts +13 -13
- package/dist/request/RequestHelpers.mjs +53 -53
- package/dist/request/SilentRequest.d.ts +33 -33
- package/dist/request/SsoSilentRequest.d.ts +29 -29
- package/dist/response/AuthenticationResult.d.ts +4 -4
- package/dist/response/ResponseHandler.d.ts +7 -7
- package/dist/response/ResponseHandler.mjs +36 -36
- package/dist/telemetry/BrowserPerformanceClient.d.ts +34 -34
- package/dist/telemetry/BrowserPerformanceClient.mjs +162 -162
- package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +21 -21
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +92 -92
- package/dist/utils/BrowserConstants.d.ts +180 -180
- package/dist/utils/BrowserConstants.mjs +212 -212
- package/dist/utils/BrowserProtocolUtils.d.ts +11 -11
- package/dist/utils/BrowserProtocolUtils.mjs +21 -21
- package/dist/utils/BrowserUtils.d.ts +75 -75
- package/dist/utils/BrowserUtils.mjs +157 -157
- package/lib/msal-browser.cjs +18884 -18855
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +18884 -18855
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +59 -59
- package/package.json +2 -2
- package/src/config/Configuration.ts +9 -1
- package/src/controllers/StandardController.ts +30 -12
- package/src/interaction_client/PopupClient.ts +1 -0
- package/src/interaction_client/RedirectClient.ts +4 -1
- package/src/interaction_client/SilentIframeClient.ts +40 -3
- package/src/packageMetadata.ts +1 -1
- package/src/request/RedirectRequest.ts +5 -0
|
@@ -1,272 +1,272 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.22.0 2024-08-28 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AuthError } from '@azure/msal-common';
|
|
4
4
|
import { pkceNotCreated, cryptoNonExistent, emptyNavigateUri, hashEmptyError, noStateInHash, hashDoesNotContainKnownProperties, unableToParseState, stateInteractionTypeMismatch, interactionInProgress, popupWindowError, emptyWindowError, userCancelled, monitorPopupTimeout, monitorWindowTimeout, redirectInIframe, blockIframeReload, blockNestedPopups, iframeClosedPrematurely, silentLogoutUnsupported, noAccountError, silentPromptValueError, noTokenRequestCacheError, unableToParseTokenRequestCacheError, noCachedAuthorityError, authRequestNotSetError, invalidCacheType, nonBrowserEnvironment, databaseNotOpen, noNetworkConnectivity, postRequestFailed, getRequestFailed, failedToParseResponse, unableToLoadToken, cryptoKeyNotFound, authCodeRequired, authCodeOrNativeAccountIdRequired, spaCodeAndNativeAccountIdPresent, databaseUnavailable, unableToAcquireTokenFromNativePlatform, nativeHandshakeTimeout, nativeExtensionNotInstalled, nativeConnectionNotEstablished, uninitializedPublicClientApplication, nativePromptNotSupported, invalidBase64String, invalidPopTokenRequest } from './BrowserAuthErrorCodes.mjs';
|
|
5
5
|
import * as BrowserAuthErrorCodes from './BrowserAuthErrorCodes.mjs';
|
|
6
6
|
export { BrowserAuthErrorCodes };
|
|
7
7
|
|
|
8
|
-
/*
|
|
9
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
-
* Licensed under the MIT License.
|
|
11
|
-
*/
|
|
12
|
-
const ErrorLink = "For more visit: aka.ms/msaljs/browser-errors";
|
|
13
|
-
/**
|
|
14
|
-
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
|
|
15
|
-
*/
|
|
16
|
-
const BrowserAuthErrorMessages = {
|
|
17
|
-
[pkceNotCreated]: "The PKCE code challenge and verifier could not be generated.",
|
|
18
|
-
[cryptoNonExistent]: "The crypto object or function is not available.",
|
|
19
|
-
[emptyNavigateUri]: "Navigation URI is empty. Please check stack trace for more info.",
|
|
20
|
-
[hashEmptyError]: `Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${ErrorLink}`,
|
|
21
|
-
[noStateInHash]: "Hash does not contain state. Please verify that the request originated from msal.",
|
|
22
|
-
[hashDoesNotContainKnownProperties]: `Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${ErrorLink}`,
|
|
23
|
-
[unableToParseState]: "Unable to parse state. Please verify that the request originated from msal.",
|
|
24
|
-
[stateInteractionTypeMismatch]: "Hash contains state but the interaction type does not match the caller.",
|
|
25
|
-
[interactionInProgress]: `Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${ErrorLink}`,
|
|
26
|
-
[popupWindowError]: "Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",
|
|
27
|
-
[emptyWindowError]: "window.open returned null or undefined window object.",
|
|
28
|
-
[userCancelled]: "User cancelled the flow.",
|
|
29
|
-
[monitorPopupTimeout]: `Token acquisition in popup failed due to timeout. ${ErrorLink}`,
|
|
30
|
-
[monitorWindowTimeout]: `Token acquisition in iframe failed due to timeout. ${ErrorLink}`,
|
|
31
|
-
[redirectInIframe]: "Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",
|
|
32
|
-
[blockIframeReload]: `Request was blocked inside an iframe because MSAL detected an authentication response. ${ErrorLink}`,
|
|
33
|
-
[blockNestedPopups]: "Request was blocked inside a popup because MSAL detected it was running in a popup.",
|
|
34
|
-
[iframeClosedPrematurely]: "The iframe being monitored was closed prematurely.",
|
|
35
|
-
[silentLogoutUnsupported]: "Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",
|
|
36
|
-
[noAccountError]: "No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",
|
|
37
|
-
[silentPromptValueError]: "The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",
|
|
38
|
-
[noTokenRequestCacheError]: "No token request found in cache.",
|
|
39
|
-
[unableToParseTokenRequestCacheError]: "The cached token request could not be parsed.",
|
|
40
|
-
[noCachedAuthorityError]: "No cached authority found.",
|
|
41
|
-
[authRequestNotSetError]: "Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",
|
|
42
|
-
[invalidCacheType]: "Invalid cache type",
|
|
43
|
-
[nonBrowserEnvironment]: "Login and token requests are not supported in non-browser environments.",
|
|
44
|
-
[databaseNotOpen]: "Database is not open!",
|
|
45
|
-
[noNetworkConnectivity]: "No network connectivity. Check your internet connection.",
|
|
46
|
-
[postRequestFailed]: "Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",
|
|
47
|
-
[getRequestFailed]: "Network request failed. Please check the network trace to determine root cause.",
|
|
48
|
-
[failedToParseResponse]: "Failed to parse network response. Check network trace.",
|
|
49
|
-
[unableToLoadToken]: "Error loading token to cache.",
|
|
50
|
-
[cryptoKeyNotFound]: "Cryptographic Key or Keypair not found in browser storage.",
|
|
51
|
-
[authCodeRequired]: "An authorization code must be provided (as the `code` property on the request) to this flow.",
|
|
52
|
-
[authCodeOrNativeAccountIdRequired]: "An authorization code or nativeAccountId must be provided to this flow.",
|
|
53
|
-
[spaCodeAndNativeAccountIdPresent]: "Request cannot contain both spa code and native account id.",
|
|
54
|
-
[databaseUnavailable]: "IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",
|
|
55
|
-
[unableToAcquireTokenFromNativePlatform]: `Unable to acquire token from native platform. ${ErrorLink}`,
|
|
56
|
-
[nativeHandshakeTimeout]: "Timed out while attempting to establish connection to browser extension",
|
|
57
|
-
[nativeExtensionNotInstalled]: "Native extension is not installed. If you think this is a mistake call the initialize function.",
|
|
58
|
-
[nativeConnectionNotEstablished]: `Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${ErrorLink}`,
|
|
59
|
-
[uninitializedPublicClientApplication]: `You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,
|
|
60
|
-
[nativePromptNotSupported]: "The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
|
|
61
|
-
[invalidBase64String]: "Invalid base64 encoded string.",
|
|
62
|
-
[invalidPopTokenRequest]: "Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
|
|
66
|
-
* @deprecated Use exported BrowserAuthErrorCodes instead.
|
|
67
|
-
* In your app you can do :
|
|
68
|
-
* ```
|
|
69
|
-
* import { BrowserAuthErrorCodes } from "@azure/msal-browser";
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
const BrowserAuthErrorMessage = {
|
|
73
|
-
pkceNotGenerated: {
|
|
74
|
-
code: pkceNotCreated,
|
|
75
|
-
desc: BrowserAuthErrorMessages[pkceNotCreated],
|
|
76
|
-
},
|
|
77
|
-
cryptoDoesNotExist: {
|
|
78
|
-
code: cryptoNonExistent,
|
|
79
|
-
desc: BrowserAuthErrorMessages[cryptoNonExistent],
|
|
80
|
-
},
|
|
81
|
-
emptyNavigateUriError: {
|
|
82
|
-
code: emptyNavigateUri,
|
|
83
|
-
desc: BrowserAuthErrorMessages[emptyNavigateUri],
|
|
84
|
-
},
|
|
85
|
-
hashEmptyError: {
|
|
86
|
-
code: hashEmptyError,
|
|
87
|
-
desc: BrowserAuthErrorMessages[hashEmptyError],
|
|
88
|
-
},
|
|
89
|
-
hashDoesNotContainStateError: {
|
|
90
|
-
code: noStateInHash,
|
|
91
|
-
desc: BrowserAuthErrorMessages[noStateInHash],
|
|
92
|
-
},
|
|
93
|
-
hashDoesNotContainKnownPropertiesError: {
|
|
94
|
-
code: hashDoesNotContainKnownProperties,
|
|
95
|
-
desc: BrowserAuthErrorMessages[hashDoesNotContainKnownProperties],
|
|
96
|
-
},
|
|
97
|
-
unableToParseStateError: {
|
|
98
|
-
code: unableToParseState,
|
|
99
|
-
desc: BrowserAuthErrorMessages[unableToParseState],
|
|
100
|
-
},
|
|
101
|
-
stateInteractionTypeMismatchError: {
|
|
102
|
-
code: stateInteractionTypeMismatch,
|
|
103
|
-
desc: BrowserAuthErrorMessages[stateInteractionTypeMismatch],
|
|
104
|
-
},
|
|
105
|
-
interactionInProgress: {
|
|
106
|
-
code: interactionInProgress,
|
|
107
|
-
desc: BrowserAuthErrorMessages[interactionInProgress],
|
|
108
|
-
},
|
|
109
|
-
popupWindowError: {
|
|
110
|
-
code: popupWindowError,
|
|
111
|
-
desc: BrowserAuthErrorMessages[popupWindowError],
|
|
112
|
-
},
|
|
113
|
-
emptyWindowError: {
|
|
114
|
-
code: emptyWindowError,
|
|
115
|
-
desc: BrowserAuthErrorMessages[emptyWindowError],
|
|
116
|
-
},
|
|
117
|
-
userCancelledError: {
|
|
118
|
-
code: userCancelled,
|
|
119
|
-
desc: BrowserAuthErrorMessages[userCancelled],
|
|
120
|
-
},
|
|
121
|
-
monitorPopupTimeoutError: {
|
|
122
|
-
code: monitorPopupTimeout,
|
|
123
|
-
desc: BrowserAuthErrorMessages[monitorPopupTimeout],
|
|
124
|
-
},
|
|
125
|
-
monitorIframeTimeoutError: {
|
|
126
|
-
code: monitorWindowTimeout,
|
|
127
|
-
desc: BrowserAuthErrorMessages[monitorWindowTimeout],
|
|
128
|
-
},
|
|
129
|
-
redirectInIframeError: {
|
|
130
|
-
code: redirectInIframe,
|
|
131
|
-
desc: BrowserAuthErrorMessages[redirectInIframe],
|
|
132
|
-
},
|
|
133
|
-
blockTokenRequestsInHiddenIframeError: {
|
|
134
|
-
code: blockIframeReload,
|
|
135
|
-
desc: BrowserAuthErrorMessages[blockIframeReload],
|
|
136
|
-
},
|
|
137
|
-
blockAcquireTokenInPopupsError: {
|
|
138
|
-
code: blockNestedPopups,
|
|
139
|
-
desc: BrowserAuthErrorMessages[blockNestedPopups],
|
|
140
|
-
},
|
|
141
|
-
iframeClosedPrematurelyError: {
|
|
142
|
-
code: iframeClosedPrematurely,
|
|
143
|
-
desc: BrowserAuthErrorMessages[iframeClosedPrematurely],
|
|
144
|
-
},
|
|
145
|
-
silentLogoutUnsupportedError: {
|
|
146
|
-
code: silentLogoutUnsupported,
|
|
147
|
-
desc: BrowserAuthErrorMessages[silentLogoutUnsupported],
|
|
148
|
-
},
|
|
149
|
-
noAccountError: {
|
|
150
|
-
code: noAccountError,
|
|
151
|
-
desc: BrowserAuthErrorMessages[noAccountError],
|
|
152
|
-
},
|
|
153
|
-
silentPromptValueError: {
|
|
154
|
-
code: silentPromptValueError,
|
|
155
|
-
desc: BrowserAuthErrorMessages[silentPromptValueError],
|
|
156
|
-
},
|
|
157
|
-
noTokenRequestCacheError: {
|
|
158
|
-
code: noTokenRequestCacheError,
|
|
159
|
-
desc: BrowserAuthErrorMessages[noTokenRequestCacheError],
|
|
160
|
-
},
|
|
161
|
-
unableToParseTokenRequestCacheError: {
|
|
162
|
-
code: unableToParseTokenRequestCacheError,
|
|
163
|
-
desc: BrowserAuthErrorMessages[unableToParseTokenRequestCacheError],
|
|
164
|
-
},
|
|
165
|
-
noCachedAuthorityError: {
|
|
166
|
-
code: noCachedAuthorityError,
|
|
167
|
-
desc: BrowserAuthErrorMessages[noCachedAuthorityError],
|
|
168
|
-
},
|
|
169
|
-
authRequestNotSet: {
|
|
170
|
-
code: authRequestNotSetError,
|
|
171
|
-
desc: BrowserAuthErrorMessages[authRequestNotSetError],
|
|
172
|
-
},
|
|
173
|
-
invalidCacheType: {
|
|
174
|
-
code: invalidCacheType,
|
|
175
|
-
desc: BrowserAuthErrorMessages[invalidCacheType],
|
|
176
|
-
},
|
|
177
|
-
notInBrowserEnvironment: {
|
|
178
|
-
code: nonBrowserEnvironment,
|
|
179
|
-
desc: BrowserAuthErrorMessages[nonBrowserEnvironment],
|
|
180
|
-
},
|
|
181
|
-
databaseNotOpen: {
|
|
182
|
-
code: databaseNotOpen,
|
|
183
|
-
desc: BrowserAuthErrorMessages[databaseNotOpen],
|
|
184
|
-
},
|
|
185
|
-
noNetworkConnectivity: {
|
|
186
|
-
code: noNetworkConnectivity,
|
|
187
|
-
desc: BrowserAuthErrorMessages[noNetworkConnectivity],
|
|
188
|
-
},
|
|
189
|
-
postRequestFailed: {
|
|
190
|
-
code: postRequestFailed,
|
|
191
|
-
desc: BrowserAuthErrorMessages[postRequestFailed],
|
|
192
|
-
},
|
|
193
|
-
getRequestFailed: {
|
|
194
|
-
code: getRequestFailed,
|
|
195
|
-
desc: BrowserAuthErrorMessages[getRequestFailed],
|
|
196
|
-
},
|
|
197
|
-
failedToParseNetworkResponse: {
|
|
198
|
-
code: failedToParseResponse,
|
|
199
|
-
desc: BrowserAuthErrorMessages[failedToParseResponse],
|
|
200
|
-
},
|
|
201
|
-
unableToLoadTokenError: {
|
|
202
|
-
code: unableToLoadToken,
|
|
203
|
-
desc: BrowserAuthErrorMessages[unableToLoadToken],
|
|
204
|
-
},
|
|
205
|
-
signingKeyNotFoundInStorage: {
|
|
206
|
-
code: cryptoKeyNotFound,
|
|
207
|
-
desc: BrowserAuthErrorMessages[cryptoKeyNotFound],
|
|
208
|
-
},
|
|
209
|
-
authCodeRequired: {
|
|
210
|
-
code: authCodeRequired,
|
|
211
|
-
desc: BrowserAuthErrorMessages[authCodeRequired],
|
|
212
|
-
},
|
|
213
|
-
authCodeOrNativeAccountRequired: {
|
|
214
|
-
code: authCodeOrNativeAccountIdRequired,
|
|
215
|
-
desc: BrowserAuthErrorMessages[authCodeOrNativeAccountIdRequired],
|
|
216
|
-
},
|
|
217
|
-
spaCodeAndNativeAccountPresent: {
|
|
218
|
-
code: spaCodeAndNativeAccountIdPresent,
|
|
219
|
-
desc: BrowserAuthErrorMessages[spaCodeAndNativeAccountIdPresent],
|
|
220
|
-
},
|
|
221
|
-
databaseUnavailable: {
|
|
222
|
-
code: databaseUnavailable,
|
|
223
|
-
desc: BrowserAuthErrorMessages[databaseUnavailable],
|
|
224
|
-
},
|
|
225
|
-
unableToAcquireTokenFromNativePlatform: {
|
|
226
|
-
code: unableToAcquireTokenFromNativePlatform,
|
|
227
|
-
desc: BrowserAuthErrorMessages[unableToAcquireTokenFromNativePlatform],
|
|
228
|
-
},
|
|
229
|
-
nativeHandshakeTimeout: {
|
|
230
|
-
code: nativeHandshakeTimeout,
|
|
231
|
-
desc: BrowserAuthErrorMessages[nativeHandshakeTimeout],
|
|
232
|
-
},
|
|
233
|
-
nativeExtensionNotInstalled: {
|
|
234
|
-
code: nativeExtensionNotInstalled,
|
|
235
|
-
desc: BrowserAuthErrorMessages[nativeExtensionNotInstalled],
|
|
236
|
-
},
|
|
237
|
-
nativeConnectionNotEstablished: {
|
|
238
|
-
code: nativeConnectionNotEstablished,
|
|
239
|
-
desc: BrowserAuthErrorMessages[nativeConnectionNotEstablished],
|
|
240
|
-
},
|
|
241
|
-
uninitializedPublicClientApplication: {
|
|
242
|
-
code: uninitializedPublicClientApplication,
|
|
243
|
-
desc: BrowserAuthErrorMessages[uninitializedPublicClientApplication],
|
|
244
|
-
},
|
|
245
|
-
nativePromptNotSupported: {
|
|
246
|
-
code: nativePromptNotSupported,
|
|
247
|
-
desc: BrowserAuthErrorMessages[nativePromptNotSupported],
|
|
248
|
-
},
|
|
249
|
-
invalidBase64StringError: {
|
|
250
|
-
code: invalidBase64String,
|
|
251
|
-
desc: BrowserAuthErrorMessages[invalidBase64String],
|
|
252
|
-
},
|
|
253
|
-
invalidPopTokenRequest: {
|
|
254
|
-
code: invalidPopTokenRequest,
|
|
255
|
-
desc: BrowserAuthErrorMessages[invalidPopTokenRequest],
|
|
256
|
-
},
|
|
257
|
-
};
|
|
258
|
-
/**
|
|
259
|
-
* Browser library error class thrown by the MSAL.js library for SPAs
|
|
260
|
-
*/
|
|
261
|
-
class BrowserAuthError extends AuthError {
|
|
262
|
-
constructor(errorCode) {
|
|
263
|
-
super(errorCode, BrowserAuthErrorMessages[errorCode]);
|
|
264
|
-
Object.setPrototypeOf(this, BrowserAuthError.prototype);
|
|
265
|
-
this.name = "BrowserAuthError";
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
function createBrowserAuthError(errorCode) {
|
|
269
|
-
return new BrowserAuthError(errorCode);
|
|
8
|
+
/*
|
|
9
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
+
* Licensed under the MIT License.
|
|
11
|
+
*/
|
|
12
|
+
const ErrorLink = "For more visit: aka.ms/msaljs/browser-errors";
|
|
13
|
+
/**
|
|
14
|
+
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
|
|
15
|
+
*/
|
|
16
|
+
const BrowserAuthErrorMessages = {
|
|
17
|
+
[pkceNotCreated]: "The PKCE code challenge and verifier could not be generated.",
|
|
18
|
+
[cryptoNonExistent]: "The crypto object or function is not available.",
|
|
19
|
+
[emptyNavigateUri]: "Navigation URI is empty. Please check stack trace for more info.",
|
|
20
|
+
[hashEmptyError]: `Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${ErrorLink}`,
|
|
21
|
+
[noStateInHash]: "Hash does not contain state. Please verify that the request originated from msal.",
|
|
22
|
+
[hashDoesNotContainKnownProperties]: `Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${ErrorLink}`,
|
|
23
|
+
[unableToParseState]: "Unable to parse state. Please verify that the request originated from msal.",
|
|
24
|
+
[stateInteractionTypeMismatch]: "Hash contains state but the interaction type does not match the caller.",
|
|
25
|
+
[interactionInProgress]: `Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${ErrorLink}`,
|
|
26
|
+
[popupWindowError]: "Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",
|
|
27
|
+
[emptyWindowError]: "window.open returned null or undefined window object.",
|
|
28
|
+
[userCancelled]: "User cancelled the flow.",
|
|
29
|
+
[monitorPopupTimeout]: `Token acquisition in popup failed due to timeout. ${ErrorLink}`,
|
|
30
|
+
[monitorWindowTimeout]: `Token acquisition in iframe failed due to timeout. ${ErrorLink}`,
|
|
31
|
+
[redirectInIframe]: "Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",
|
|
32
|
+
[blockIframeReload]: `Request was blocked inside an iframe because MSAL detected an authentication response. ${ErrorLink}`,
|
|
33
|
+
[blockNestedPopups]: "Request was blocked inside a popup because MSAL detected it was running in a popup.",
|
|
34
|
+
[iframeClosedPrematurely]: "The iframe being monitored was closed prematurely.",
|
|
35
|
+
[silentLogoutUnsupported]: "Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",
|
|
36
|
+
[noAccountError]: "No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",
|
|
37
|
+
[silentPromptValueError]: "The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",
|
|
38
|
+
[noTokenRequestCacheError]: "No token request found in cache.",
|
|
39
|
+
[unableToParseTokenRequestCacheError]: "The cached token request could not be parsed.",
|
|
40
|
+
[noCachedAuthorityError]: "No cached authority found.",
|
|
41
|
+
[authRequestNotSetError]: "Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",
|
|
42
|
+
[invalidCacheType]: "Invalid cache type",
|
|
43
|
+
[nonBrowserEnvironment]: "Login and token requests are not supported in non-browser environments.",
|
|
44
|
+
[databaseNotOpen]: "Database is not open!",
|
|
45
|
+
[noNetworkConnectivity]: "No network connectivity. Check your internet connection.",
|
|
46
|
+
[postRequestFailed]: "Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",
|
|
47
|
+
[getRequestFailed]: "Network request failed. Please check the network trace to determine root cause.",
|
|
48
|
+
[failedToParseResponse]: "Failed to parse network response. Check network trace.",
|
|
49
|
+
[unableToLoadToken]: "Error loading token to cache.",
|
|
50
|
+
[cryptoKeyNotFound]: "Cryptographic Key or Keypair not found in browser storage.",
|
|
51
|
+
[authCodeRequired]: "An authorization code must be provided (as the `code` property on the request) to this flow.",
|
|
52
|
+
[authCodeOrNativeAccountIdRequired]: "An authorization code or nativeAccountId must be provided to this flow.",
|
|
53
|
+
[spaCodeAndNativeAccountIdPresent]: "Request cannot contain both spa code and native account id.",
|
|
54
|
+
[databaseUnavailable]: "IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",
|
|
55
|
+
[unableToAcquireTokenFromNativePlatform]: `Unable to acquire token from native platform. ${ErrorLink}`,
|
|
56
|
+
[nativeHandshakeTimeout]: "Timed out while attempting to establish connection to browser extension",
|
|
57
|
+
[nativeExtensionNotInstalled]: "Native extension is not installed. If you think this is a mistake call the initialize function.",
|
|
58
|
+
[nativeConnectionNotEstablished]: `Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${ErrorLink}`,
|
|
59
|
+
[uninitializedPublicClientApplication]: `You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,
|
|
60
|
+
[nativePromptNotSupported]: "The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
|
|
61
|
+
[invalidBase64String]: "Invalid base64 encoded string.",
|
|
62
|
+
[invalidPopTokenRequest]: "Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
|
|
66
|
+
* @deprecated Use exported BrowserAuthErrorCodes instead.
|
|
67
|
+
* In your app you can do :
|
|
68
|
+
* ```
|
|
69
|
+
* import { BrowserAuthErrorCodes } from "@azure/msal-browser";
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
const BrowserAuthErrorMessage = {
|
|
73
|
+
pkceNotGenerated: {
|
|
74
|
+
code: pkceNotCreated,
|
|
75
|
+
desc: BrowserAuthErrorMessages[pkceNotCreated],
|
|
76
|
+
},
|
|
77
|
+
cryptoDoesNotExist: {
|
|
78
|
+
code: cryptoNonExistent,
|
|
79
|
+
desc: BrowserAuthErrorMessages[cryptoNonExistent],
|
|
80
|
+
},
|
|
81
|
+
emptyNavigateUriError: {
|
|
82
|
+
code: emptyNavigateUri,
|
|
83
|
+
desc: BrowserAuthErrorMessages[emptyNavigateUri],
|
|
84
|
+
},
|
|
85
|
+
hashEmptyError: {
|
|
86
|
+
code: hashEmptyError,
|
|
87
|
+
desc: BrowserAuthErrorMessages[hashEmptyError],
|
|
88
|
+
},
|
|
89
|
+
hashDoesNotContainStateError: {
|
|
90
|
+
code: noStateInHash,
|
|
91
|
+
desc: BrowserAuthErrorMessages[noStateInHash],
|
|
92
|
+
},
|
|
93
|
+
hashDoesNotContainKnownPropertiesError: {
|
|
94
|
+
code: hashDoesNotContainKnownProperties,
|
|
95
|
+
desc: BrowserAuthErrorMessages[hashDoesNotContainKnownProperties],
|
|
96
|
+
},
|
|
97
|
+
unableToParseStateError: {
|
|
98
|
+
code: unableToParseState,
|
|
99
|
+
desc: BrowserAuthErrorMessages[unableToParseState],
|
|
100
|
+
},
|
|
101
|
+
stateInteractionTypeMismatchError: {
|
|
102
|
+
code: stateInteractionTypeMismatch,
|
|
103
|
+
desc: BrowserAuthErrorMessages[stateInteractionTypeMismatch],
|
|
104
|
+
},
|
|
105
|
+
interactionInProgress: {
|
|
106
|
+
code: interactionInProgress,
|
|
107
|
+
desc: BrowserAuthErrorMessages[interactionInProgress],
|
|
108
|
+
},
|
|
109
|
+
popupWindowError: {
|
|
110
|
+
code: popupWindowError,
|
|
111
|
+
desc: BrowserAuthErrorMessages[popupWindowError],
|
|
112
|
+
},
|
|
113
|
+
emptyWindowError: {
|
|
114
|
+
code: emptyWindowError,
|
|
115
|
+
desc: BrowserAuthErrorMessages[emptyWindowError],
|
|
116
|
+
},
|
|
117
|
+
userCancelledError: {
|
|
118
|
+
code: userCancelled,
|
|
119
|
+
desc: BrowserAuthErrorMessages[userCancelled],
|
|
120
|
+
},
|
|
121
|
+
monitorPopupTimeoutError: {
|
|
122
|
+
code: monitorPopupTimeout,
|
|
123
|
+
desc: BrowserAuthErrorMessages[monitorPopupTimeout],
|
|
124
|
+
},
|
|
125
|
+
monitorIframeTimeoutError: {
|
|
126
|
+
code: monitorWindowTimeout,
|
|
127
|
+
desc: BrowserAuthErrorMessages[monitorWindowTimeout],
|
|
128
|
+
},
|
|
129
|
+
redirectInIframeError: {
|
|
130
|
+
code: redirectInIframe,
|
|
131
|
+
desc: BrowserAuthErrorMessages[redirectInIframe],
|
|
132
|
+
},
|
|
133
|
+
blockTokenRequestsInHiddenIframeError: {
|
|
134
|
+
code: blockIframeReload,
|
|
135
|
+
desc: BrowserAuthErrorMessages[blockIframeReload],
|
|
136
|
+
},
|
|
137
|
+
blockAcquireTokenInPopupsError: {
|
|
138
|
+
code: blockNestedPopups,
|
|
139
|
+
desc: BrowserAuthErrorMessages[blockNestedPopups],
|
|
140
|
+
},
|
|
141
|
+
iframeClosedPrematurelyError: {
|
|
142
|
+
code: iframeClosedPrematurely,
|
|
143
|
+
desc: BrowserAuthErrorMessages[iframeClosedPrematurely],
|
|
144
|
+
},
|
|
145
|
+
silentLogoutUnsupportedError: {
|
|
146
|
+
code: silentLogoutUnsupported,
|
|
147
|
+
desc: BrowserAuthErrorMessages[silentLogoutUnsupported],
|
|
148
|
+
},
|
|
149
|
+
noAccountError: {
|
|
150
|
+
code: noAccountError,
|
|
151
|
+
desc: BrowserAuthErrorMessages[noAccountError],
|
|
152
|
+
},
|
|
153
|
+
silentPromptValueError: {
|
|
154
|
+
code: silentPromptValueError,
|
|
155
|
+
desc: BrowserAuthErrorMessages[silentPromptValueError],
|
|
156
|
+
},
|
|
157
|
+
noTokenRequestCacheError: {
|
|
158
|
+
code: noTokenRequestCacheError,
|
|
159
|
+
desc: BrowserAuthErrorMessages[noTokenRequestCacheError],
|
|
160
|
+
},
|
|
161
|
+
unableToParseTokenRequestCacheError: {
|
|
162
|
+
code: unableToParseTokenRequestCacheError,
|
|
163
|
+
desc: BrowserAuthErrorMessages[unableToParseTokenRequestCacheError],
|
|
164
|
+
},
|
|
165
|
+
noCachedAuthorityError: {
|
|
166
|
+
code: noCachedAuthorityError,
|
|
167
|
+
desc: BrowserAuthErrorMessages[noCachedAuthorityError],
|
|
168
|
+
},
|
|
169
|
+
authRequestNotSet: {
|
|
170
|
+
code: authRequestNotSetError,
|
|
171
|
+
desc: BrowserAuthErrorMessages[authRequestNotSetError],
|
|
172
|
+
},
|
|
173
|
+
invalidCacheType: {
|
|
174
|
+
code: invalidCacheType,
|
|
175
|
+
desc: BrowserAuthErrorMessages[invalidCacheType],
|
|
176
|
+
},
|
|
177
|
+
notInBrowserEnvironment: {
|
|
178
|
+
code: nonBrowserEnvironment,
|
|
179
|
+
desc: BrowserAuthErrorMessages[nonBrowserEnvironment],
|
|
180
|
+
},
|
|
181
|
+
databaseNotOpen: {
|
|
182
|
+
code: databaseNotOpen,
|
|
183
|
+
desc: BrowserAuthErrorMessages[databaseNotOpen],
|
|
184
|
+
},
|
|
185
|
+
noNetworkConnectivity: {
|
|
186
|
+
code: noNetworkConnectivity,
|
|
187
|
+
desc: BrowserAuthErrorMessages[noNetworkConnectivity],
|
|
188
|
+
},
|
|
189
|
+
postRequestFailed: {
|
|
190
|
+
code: postRequestFailed,
|
|
191
|
+
desc: BrowserAuthErrorMessages[postRequestFailed],
|
|
192
|
+
},
|
|
193
|
+
getRequestFailed: {
|
|
194
|
+
code: getRequestFailed,
|
|
195
|
+
desc: BrowserAuthErrorMessages[getRequestFailed],
|
|
196
|
+
},
|
|
197
|
+
failedToParseNetworkResponse: {
|
|
198
|
+
code: failedToParseResponse,
|
|
199
|
+
desc: BrowserAuthErrorMessages[failedToParseResponse],
|
|
200
|
+
},
|
|
201
|
+
unableToLoadTokenError: {
|
|
202
|
+
code: unableToLoadToken,
|
|
203
|
+
desc: BrowserAuthErrorMessages[unableToLoadToken],
|
|
204
|
+
},
|
|
205
|
+
signingKeyNotFoundInStorage: {
|
|
206
|
+
code: cryptoKeyNotFound,
|
|
207
|
+
desc: BrowserAuthErrorMessages[cryptoKeyNotFound],
|
|
208
|
+
},
|
|
209
|
+
authCodeRequired: {
|
|
210
|
+
code: authCodeRequired,
|
|
211
|
+
desc: BrowserAuthErrorMessages[authCodeRequired],
|
|
212
|
+
},
|
|
213
|
+
authCodeOrNativeAccountRequired: {
|
|
214
|
+
code: authCodeOrNativeAccountIdRequired,
|
|
215
|
+
desc: BrowserAuthErrorMessages[authCodeOrNativeAccountIdRequired],
|
|
216
|
+
},
|
|
217
|
+
spaCodeAndNativeAccountPresent: {
|
|
218
|
+
code: spaCodeAndNativeAccountIdPresent,
|
|
219
|
+
desc: BrowserAuthErrorMessages[spaCodeAndNativeAccountIdPresent],
|
|
220
|
+
},
|
|
221
|
+
databaseUnavailable: {
|
|
222
|
+
code: databaseUnavailable,
|
|
223
|
+
desc: BrowserAuthErrorMessages[databaseUnavailable],
|
|
224
|
+
},
|
|
225
|
+
unableToAcquireTokenFromNativePlatform: {
|
|
226
|
+
code: unableToAcquireTokenFromNativePlatform,
|
|
227
|
+
desc: BrowserAuthErrorMessages[unableToAcquireTokenFromNativePlatform],
|
|
228
|
+
},
|
|
229
|
+
nativeHandshakeTimeout: {
|
|
230
|
+
code: nativeHandshakeTimeout,
|
|
231
|
+
desc: BrowserAuthErrorMessages[nativeHandshakeTimeout],
|
|
232
|
+
},
|
|
233
|
+
nativeExtensionNotInstalled: {
|
|
234
|
+
code: nativeExtensionNotInstalled,
|
|
235
|
+
desc: BrowserAuthErrorMessages[nativeExtensionNotInstalled],
|
|
236
|
+
},
|
|
237
|
+
nativeConnectionNotEstablished: {
|
|
238
|
+
code: nativeConnectionNotEstablished,
|
|
239
|
+
desc: BrowserAuthErrorMessages[nativeConnectionNotEstablished],
|
|
240
|
+
},
|
|
241
|
+
uninitializedPublicClientApplication: {
|
|
242
|
+
code: uninitializedPublicClientApplication,
|
|
243
|
+
desc: BrowserAuthErrorMessages[uninitializedPublicClientApplication],
|
|
244
|
+
},
|
|
245
|
+
nativePromptNotSupported: {
|
|
246
|
+
code: nativePromptNotSupported,
|
|
247
|
+
desc: BrowserAuthErrorMessages[nativePromptNotSupported],
|
|
248
|
+
},
|
|
249
|
+
invalidBase64StringError: {
|
|
250
|
+
code: invalidBase64String,
|
|
251
|
+
desc: BrowserAuthErrorMessages[invalidBase64String],
|
|
252
|
+
},
|
|
253
|
+
invalidPopTokenRequest: {
|
|
254
|
+
code: invalidPopTokenRequest,
|
|
255
|
+
desc: BrowserAuthErrorMessages[invalidPopTokenRequest],
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Browser library error class thrown by the MSAL.js library for SPAs
|
|
260
|
+
*/
|
|
261
|
+
class BrowserAuthError extends AuthError {
|
|
262
|
+
constructor(errorCode) {
|
|
263
|
+
super(errorCode, BrowserAuthErrorMessages[errorCode]);
|
|
264
|
+
Object.setPrototypeOf(this, BrowserAuthError.prototype);
|
|
265
|
+
this.name = "BrowserAuthError";
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function createBrowserAuthError(errorCode) {
|
|
269
|
+
return new BrowserAuthError(errorCode);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
export { BrowserAuthError, BrowserAuthErrorMessage, BrowserAuthErrorMessages, createBrowserAuthError };
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
export declare const pkceNotCreated = "pkce_not_created";
|
|
2
|
-
export declare const cryptoNonExistent = "crypto_nonexistent";
|
|
3
|
-
export declare const emptyNavigateUri = "empty_navigate_uri";
|
|
4
|
-
export declare const hashEmptyError = "hash_empty_error";
|
|
5
|
-
export declare const noStateInHash = "no_state_in_hash";
|
|
6
|
-
export declare const hashDoesNotContainKnownProperties = "hash_does_not_contain_known_properties";
|
|
7
|
-
export declare const unableToParseState = "unable_to_parse_state";
|
|
8
|
-
export declare const stateInteractionTypeMismatch = "state_interaction_type_mismatch";
|
|
9
|
-
export declare const interactionInProgress = "interaction_in_progress";
|
|
10
|
-
export declare const popupWindowError = "popup_window_error";
|
|
11
|
-
export declare const emptyWindowError = "empty_window_error";
|
|
12
|
-
export declare const userCancelled = "user_cancelled";
|
|
13
|
-
export declare const monitorPopupTimeout = "monitor_popup_timeout";
|
|
14
|
-
export declare const monitorWindowTimeout = "monitor_window_timeout";
|
|
15
|
-
export declare const redirectInIframe = "redirect_in_iframe";
|
|
16
|
-
export declare const blockIframeReload = "block_iframe_reload";
|
|
17
|
-
export declare const blockNestedPopups = "block_nested_popups";
|
|
18
|
-
export declare const iframeClosedPrematurely = "iframe_closed_prematurely";
|
|
19
|
-
export declare const silentLogoutUnsupported = "silent_logout_unsupported";
|
|
20
|
-
export declare const noAccountError = "no_account_error";
|
|
21
|
-
export declare const silentPromptValueError = "silent_prompt_value_error";
|
|
22
|
-
export declare const noTokenRequestCacheError = "no_token_request_cache_error";
|
|
23
|
-
export declare const unableToParseTokenRequestCacheError = "unable_to_parse_token_request_cache_error";
|
|
24
|
-
export declare const noCachedAuthorityError = "no_cached_authority_error";
|
|
25
|
-
export declare const authRequestNotSetError = "auth_request_not_set_error";
|
|
26
|
-
export declare const invalidCacheType = "invalid_cache_type";
|
|
27
|
-
export declare const nonBrowserEnvironment = "non_browser_environment";
|
|
28
|
-
export declare const databaseNotOpen = "database_not_open";
|
|
29
|
-
export declare const noNetworkConnectivity = "no_network_connectivity";
|
|
30
|
-
export declare const postRequestFailed = "post_request_failed";
|
|
31
|
-
export declare const getRequestFailed = "get_request_failed";
|
|
32
|
-
export declare const failedToParseResponse = "failed_to_parse_response";
|
|
33
|
-
export declare const unableToLoadToken = "unable_to_load_token";
|
|
34
|
-
export declare const cryptoKeyNotFound = "crypto_key_not_found";
|
|
35
|
-
export declare const authCodeRequired = "auth_code_required";
|
|
36
|
-
export declare const authCodeOrNativeAccountIdRequired = "auth_code_or_nativeAccountId_required";
|
|
37
|
-
export declare const spaCodeAndNativeAccountIdPresent = "spa_code_and_nativeAccountId_present";
|
|
38
|
-
export declare const databaseUnavailable = "database_unavailable";
|
|
39
|
-
export declare const unableToAcquireTokenFromNativePlatform = "unable_to_acquire_token_from_native_platform";
|
|
40
|
-
export declare const nativeHandshakeTimeout = "native_handshake_timeout";
|
|
41
|
-
export declare const nativeExtensionNotInstalled = "native_extension_not_installed";
|
|
42
|
-
export declare const nativeConnectionNotEstablished = "native_connection_not_established";
|
|
43
|
-
export declare const uninitializedPublicClientApplication = "uninitialized_public_client_application";
|
|
44
|
-
export declare const nativePromptNotSupported = "native_prompt_not_supported";
|
|
45
|
-
export declare const invalidBase64String = "invalid_base64_string";
|
|
46
|
-
export declare const invalidPopTokenRequest = "invalid_pop_token_request";
|
|
1
|
+
export declare const pkceNotCreated = "pkce_not_created";
|
|
2
|
+
export declare const cryptoNonExistent = "crypto_nonexistent";
|
|
3
|
+
export declare const emptyNavigateUri = "empty_navigate_uri";
|
|
4
|
+
export declare const hashEmptyError = "hash_empty_error";
|
|
5
|
+
export declare const noStateInHash = "no_state_in_hash";
|
|
6
|
+
export declare const hashDoesNotContainKnownProperties = "hash_does_not_contain_known_properties";
|
|
7
|
+
export declare const unableToParseState = "unable_to_parse_state";
|
|
8
|
+
export declare const stateInteractionTypeMismatch = "state_interaction_type_mismatch";
|
|
9
|
+
export declare const interactionInProgress = "interaction_in_progress";
|
|
10
|
+
export declare const popupWindowError = "popup_window_error";
|
|
11
|
+
export declare const emptyWindowError = "empty_window_error";
|
|
12
|
+
export declare const userCancelled = "user_cancelled";
|
|
13
|
+
export declare const monitorPopupTimeout = "monitor_popup_timeout";
|
|
14
|
+
export declare const monitorWindowTimeout = "monitor_window_timeout";
|
|
15
|
+
export declare const redirectInIframe = "redirect_in_iframe";
|
|
16
|
+
export declare const blockIframeReload = "block_iframe_reload";
|
|
17
|
+
export declare const blockNestedPopups = "block_nested_popups";
|
|
18
|
+
export declare const iframeClosedPrematurely = "iframe_closed_prematurely";
|
|
19
|
+
export declare const silentLogoutUnsupported = "silent_logout_unsupported";
|
|
20
|
+
export declare const noAccountError = "no_account_error";
|
|
21
|
+
export declare const silentPromptValueError = "silent_prompt_value_error";
|
|
22
|
+
export declare const noTokenRequestCacheError = "no_token_request_cache_error";
|
|
23
|
+
export declare const unableToParseTokenRequestCacheError = "unable_to_parse_token_request_cache_error";
|
|
24
|
+
export declare const noCachedAuthorityError = "no_cached_authority_error";
|
|
25
|
+
export declare const authRequestNotSetError = "auth_request_not_set_error";
|
|
26
|
+
export declare const invalidCacheType = "invalid_cache_type";
|
|
27
|
+
export declare const nonBrowserEnvironment = "non_browser_environment";
|
|
28
|
+
export declare const databaseNotOpen = "database_not_open";
|
|
29
|
+
export declare const noNetworkConnectivity = "no_network_connectivity";
|
|
30
|
+
export declare const postRequestFailed = "post_request_failed";
|
|
31
|
+
export declare const getRequestFailed = "get_request_failed";
|
|
32
|
+
export declare const failedToParseResponse = "failed_to_parse_response";
|
|
33
|
+
export declare const unableToLoadToken = "unable_to_load_token";
|
|
34
|
+
export declare const cryptoKeyNotFound = "crypto_key_not_found";
|
|
35
|
+
export declare const authCodeRequired = "auth_code_required";
|
|
36
|
+
export declare const authCodeOrNativeAccountIdRequired = "auth_code_or_nativeAccountId_required";
|
|
37
|
+
export declare const spaCodeAndNativeAccountIdPresent = "spa_code_and_nativeAccountId_present";
|
|
38
|
+
export declare const databaseUnavailable = "database_unavailable";
|
|
39
|
+
export declare const unableToAcquireTokenFromNativePlatform = "unable_to_acquire_token_from_native_platform";
|
|
40
|
+
export declare const nativeHandshakeTimeout = "native_handshake_timeout";
|
|
41
|
+
export declare const nativeExtensionNotInstalled = "native_extension_not_installed";
|
|
42
|
+
export declare const nativeConnectionNotEstablished = "native_connection_not_established";
|
|
43
|
+
export declare const uninitializedPublicClientApplication = "uninitialized_public_client_application";
|
|
44
|
+
export declare const nativePromptNotSupported = "native_prompt_not_supported";
|
|
45
|
+
export declare const invalidBase64String = "invalid_base64_string";
|
|
46
|
+
export declare const invalidPopTokenRequest = "invalid_pop_token_request";
|
|
47
47
|
//# sourceMappingURL=BrowserAuthErrorCodes.d.ts.map
|