@azure/msal-browser 4.8.0 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +4 -41
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +18 -143
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +2 -2
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +5 -5
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts +2 -2
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +28 -16
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.d.ts +2 -2
- package/dist/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.d.ts +11 -0
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +68 -5
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.d.ts +3 -5
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.mjs +5 -7
- package/dist/error/BrowserAuthError.mjs.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts +3 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +6 -4
- package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +2 -2
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +1 -3
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts +14 -1
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +65 -64
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +20 -3
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +132 -76
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +13 -3
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +57 -44
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts +2 -3
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +4 -5
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts +4 -2
- package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +15 -5
- package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +2 -2
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts +53 -1
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +147 -4
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts +2 -4
- package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/PopupRequest.d.ts +1 -1
- package/dist/request/PopupRequest.d.ts.map +1 -1
- package/dist/request/RedirectRequest.d.ts +1 -1
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/request/SsoSilentRequest.d.ts +1 -1
- package/dist/request/SsoSilentRequest.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.d.ts +1 -10
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +2 -15
- package/dist/utils/BrowserConstants.mjs.map +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +1588 -1555
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +1588 -1555
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +68 -67
- package/lib/types/cache/BrowserCacheManager.d.ts +4 -41
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/controllers/NestedAppAuthController.d.ts +2 -2
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/controllers/UnknownOperatingContextController.d.ts +2 -2
- package/lib/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/lib/types/crypto/BrowserCrypto.d.ts +11 -0
- package/lib/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/lib/types/error/BrowserAuthError.d.ts +3 -5
- package/lib/types/error/BrowserAuthError.d.ts.map +1 -1
- package/lib/types/error/BrowserAuthErrorCodes.d.ts +3 -1
- package/lib/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_client/PopupClient.d.ts +14 -1
- package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.d.ts +20 -3
- package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentIframeClient.d.ts +13 -3
- package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/lib/types/interaction_client/StandardInteractionClient.d.ts +2 -3
- package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_handler/InteractionHandler.d.ts +4 -5
- package/lib/types/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/lib/types/interaction_handler/SilentHandler.d.ts +4 -2
- package/lib/types/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts +53 -1
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/request/AuthorizationUrlRequest.d.ts +2 -4
- package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -1
- package/lib/types/request/PopupRequest.d.ts +1 -1
- package/lib/types/request/PopupRequest.d.ts.map +1 -1
- package/lib/types/request/RedirectRequest.d.ts +1 -1
- package/lib/types/request/RedirectRequest.d.ts.map +1 -1
- package/lib/types/request/SsoSilentRequest.d.ts +1 -1
- package/lib/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/lib/types/utils/BrowserConstants.d.ts +1 -10
- package/lib/types/utils/BrowserConstants.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/cache/BrowserCacheManager.ts +30 -205
- package/src/config/Configuration.ts +2 -2
- package/src/controllers/NestedAppAuthController.ts +2 -0
- package/src/controllers/StandardController.ts +35 -24
- package/src/controllers/UnknownOperatingContextController.ts +2 -0
- package/src/crypto/BrowserCrypto.ts +91 -2
- package/src/error/BrowserAuthError.ts +6 -8
- package/src/error/BrowserAuthErrorCodes.ts +3 -1
- package/src/interaction_client/NativeInteractionClient.ts +0 -2
- package/src/interaction_client/PopupClient.ts +163 -119
- package/src/interaction_client/RedirectClient.ts +258 -140
- package/src/interaction_client/SilentAuthCodeClient.ts +2 -2
- package/src/interaction_client/SilentIframeClient.ts +154 -99
- package/src/interaction_client/StandardInteractionClient.ts +3 -3
- package/src/interaction_handler/InteractionHandler.ts +4 -4
- package/src/interaction_handler/SilentHandler.ts +31 -2
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +356 -2
- package/src/request/AuthorizationUrlRequest.ts +3 -5
- package/src/request/PopupRequest.ts +1 -0
- package/src/request/RedirectRequest.ts +1 -0
- package/src/request/SsoSilentRequest.ts +1 -0
- package/src/utils/BrowserConstants.ts +1 -10
- package/dist/interaction_handler/RedirectHandler.d.ts +0 -33
- package/dist/interaction_handler/RedirectHandler.d.ts.map +0 -1
- package/dist/interaction_handler/RedirectHandler.mjs +0 -144
- package/dist/interaction_handler/RedirectHandler.mjs.map +0 -1
- package/lib/types/interaction_handler/RedirectHandler.d.ts +0 -33
- package/lib/types/interaction_handler/RedirectHandler.d.ts.map +0 -1
- package/src/interaction_handler/RedirectHandler.ts +0 -252
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
/*! @azure/msal-browser v4.
|
|
1
|
+
/*! @azure/msal-browser v4.9.1 2025-03-26 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import { createClientConfigurationError, ClientConfigurationErrorCodes, invokeAsync, PerformanceEvents, RequestParameterBuilder, Constants, AuthorizeProtocol, ProtocolMode, AuthenticationScheme, PopTokenGenerator } from '@azure/msal-common/browser';
|
|
3
|
+
import { createClientConfigurationError, ClientConfigurationErrorCodes, invokeAsync, PerformanceEvents, RequestParameterBuilder, OAuthResponseType, Constants, AuthorizeProtocol, ThrottlingUtils, ResponseHandler, TimeUtils, ProtocolMode, AuthenticationScheme, PopTokenGenerator, ProtocolUtils } from '@azure/msal-common/browser';
|
|
4
4
|
import { BrowserConstants } from '../utils/BrowserConstants.mjs';
|
|
5
5
|
import { version } from '../packageMetadata.mjs';
|
|
6
6
|
import { CryptoOps } from '../crypto/CryptoOps.mjs';
|
|
7
|
+
import { createBrowserAuthError } from '../error/BrowserAuthError.mjs';
|
|
8
|
+
import { InteractionHandler } from '../interaction_handler/InteractionHandler.mjs';
|
|
9
|
+
import { NativeInteractionClient } from '../interaction_client/NativeInteractionClient.mjs';
|
|
10
|
+
import { decryptEarResponse } from '../crypto/BrowserCrypto.mjs';
|
|
11
|
+
import { earJwkEmpty, earJweEmpty, nativeConnectionNotEstablished } from '../error/BrowserAuthErrorCodes.mjs';
|
|
7
12
|
|
|
8
13
|
/*
|
|
9
14
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -65,10 +70,148 @@ async function getAuthCodeRequestUrl(config, authority, request, logger, perform
|
|
|
65
70
|
throw createClientConfigurationError(ClientConfigurationErrorCodes.pkceParamsMissing);
|
|
66
71
|
}
|
|
67
72
|
const parameters = await invokeAsync(getStandardParameters, PerformanceEvents.GetStandardParams, logger, performanceClient, request.correlationId)(config, authority, request, logger, performanceClient);
|
|
68
|
-
RequestParameterBuilder.
|
|
73
|
+
RequestParameterBuilder.addResponseType(parameters, OAuthResponseType.CODE);
|
|
69
74
|
RequestParameterBuilder.addCodeChallengeParams(parameters, request.codeChallenge, Constants.S256_CODE_CHALLENGE_METHOD);
|
|
75
|
+
RequestParameterBuilder.addExtraQueryParameters(parameters, request.extraQueryParameters || {});
|
|
70
76
|
return AuthorizeProtocol.getAuthorizeUrl(authority, parameters);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Gets the form that will be posted to /authorize with request parameters when using EAR
|
|
80
|
+
*/
|
|
81
|
+
async function getEARForm(frame, config, authority, request, logger, performanceClient) {
|
|
82
|
+
if (!request.earJwk) {
|
|
83
|
+
throw createBrowserAuthError(earJwkEmpty);
|
|
84
|
+
}
|
|
85
|
+
const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
|
|
86
|
+
RequestParameterBuilder.addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
|
|
87
|
+
RequestParameterBuilder.addEARParameters(parameters, request.earJwk);
|
|
88
|
+
const queryParams = new Map();
|
|
89
|
+
RequestParameterBuilder.addExtraQueryParameters(queryParams, request.extraQueryParameters || {});
|
|
90
|
+
const url = AuthorizeProtocol.getAuthorizeUrl(authority, queryParams);
|
|
91
|
+
return createForm(frame, url, parameters);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Creates form element in the provided document with auth parameters in the post body
|
|
95
|
+
* @param frame
|
|
96
|
+
* @param authorizeUrl
|
|
97
|
+
* @param parameters
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
function createForm(frame, authorizeUrl, parameters) {
|
|
101
|
+
const form = frame.createElement("form");
|
|
102
|
+
form.method = "post";
|
|
103
|
+
form.action = authorizeUrl;
|
|
104
|
+
parameters.forEach((value, key) => {
|
|
105
|
+
const param = frame.createElement("input");
|
|
106
|
+
param.hidden = true;
|
|
107
|
+
param.name = key;
|
|
108
|
+
param.value = value;
|
|
109
|
+
form.appendChild(param);
|
|
110
|
+
});
|
|
111
|
+
frame.body.appendChild(form);
|
|
112
|
+
return form;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Response handler when server returns accountId on the /authorize request
|
|
116
|
+
* @param request
|
|
117
|
+
* @param accountId
|
|
118
|
+
* @param apiId
|
|
119
|
+
* @param config
|
|
120
|
+
* @param browserStorage
|
|
121
|
+
* @param nativeStorage
|
|
122
|
+
* @param eventHandler
|
|
123
|
+
* @param logger
|
|
124
|
+
* @param performanceClient
|
|
125
|
+
* @param nativeMessageHandler
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
128
|
+
async function handleResponsePlatformBroker(request, accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, nativeMessageHandler) {
|
|
129
|
+
if (!nativeMessageHandler) {
|
|
130
|
+
throw createBrowserAuthError(nativeConnectionNotEstablished);
|
|
131
|
+
}
|
|
132
|
+
const browserCrypto = new CryptoOps(logger, performanceClient);
|
|
133
|
+
const nativeInteractionClient = new NativeInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, nativeMessageHandler, accountId, nativeStorage, request.correlationId);
|
|
134
|
+
const { userRequestState } = ProtocolUtils.parseRequestState(browserCrypto, request.state);
|
|
135
|
+
return invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), PerformanceEvents.NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)({
|
|
136
|
+
...request,
|
|
137
|
+
state: userRequestState,
|
|
138
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Response handler when server returns code on the /authorize request
|
|
143
|
+
* @param request
|
|
144
|
+
* @param response
|
|
145
|
+
* @param codeVerifier
|
|
146
|
+
* @param authClient
|
|
147
|
+
* @param browserStorage
|
|
148
|
+
* @param logger
|
|
149
|
+
* @param performanceClient
|
|
150
|
+
* @returns
|
|
151
|
+
*/
|
|
152
|
+
async function handleResponseCode(request, response, codeVerifier, apiId, config, authClient, browserStorage, nativeStorage, eventHandler, logger, performanceClient, nativeMessageHandler) {
|
|
153
|
+
// Remove throttle if it exists
|
|
154
|
+
ThrottlingUtils.removeThrottle(browserStorage, config.auth.clientId, request);
|
|
155
|
+
if (response.accountId) {
|
|
156
|
+
return invokeAsync(handleResponsePlatformBroker, PerformanceEvents.HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, response.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, nativeMessageHandler);
|
|
157
|
+
}
|
|
158
|
+
const authCodeRequest = {
|
|
159
|
+
...request,
|
|
160
|
+
code: response.code || "",
|
|
161
|
+
codeVerifier: codeVerifier,
|
|
162
|
+
};
|
|
163
|
+
// Create popup interaction handler.
|
|
164
|
+
const interactionHandler = new InteractionHandler(authClient, browserStorage, authCodeRequest, logger, performanceClient);
|
|
165
|
+
// Handle response from hash string.
|
|
166
|
+
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request);
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Response handler when server returns ear_jwe on the /authorize request
|
|
171
|
+
* @param request
|
|
172
|
+
* @param response
|
|
173
|
+
* @param apiId
|
|
174
|
+
* @param config
|
|
175
|
+
* @param authority
|
|
176
|
+
* @param browserStorage
|
|
177
|
+
* @param nativeStorage
|
|
178
|
+
* @param eventHandler
|
|
179
|
+
* @param logger
|
|
180
|
+
* @param performanceClient
|
|
181
|
+
* @param nativeMessageHandler
|
|
182
|
+
* @returns
|
|
183
|
+
*/
|
|
184
|
+
async function handleResponseEAR(request, response, apiId, config, authority, browserStorage, nativeStorage, eventHandler, logger, performanceClient, nativeMessageHandler) {
|
|
185
|
+
// Remove throttle if it exists
|
|
186
|
+
ThrottlingUtils.removeThrottle(browserStorage, config.auth.clientId, request);
|
|
187
|
+
// Validate state & check response for errors
|
|
188
|
+
AuthorizeProtocol.validateAuthorizationResponse(response, request.state);
|
|
189
|
+
if (!response.ear_jwe) {
|
|
190
|
+
throw createBrowserAuthError(earJweEmpty);
|
|
191
|
+
}
|
|
192
|
+
if (!request.earJwk) {
|
|
193
|
+
throw createBrowserAuthError(earJwkEmpty);
|
|
194
|
+
}
|
|
195
|
+
const decryptedData = JSON.parse(await invokeAsync(decryptEarResponse, PerformanceEvents.DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe));
|
|
196
|
+
if (decryptedData.accountId) {
|
|
197
|
+
return invokeAsync(handleResponsePlatformBroker, PerformanceEvents.HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, nativeMessageHandler);
|
|
198
|
+
}
|
|
199
|
+
const responseHandler = new ResponseHandler(config.auth.clientId, browserStorage, new CryptoOps(logger, performanceClient), logger, null, null, performanceClient);
|
|
200
|
+
// Validate response. This function throws a server error if an error is returned by the server.
|
|
201
|
+
responseHandler.validateTokenResponse(decryptedData);
|
|
202
|
+
// Temporary until response handler is refactored to be more flow agnostic.
|
|
203
|
+
const additionalData = {
|
|
204
|
+
code: "",
|
|
205
|
+
state: request.state,
|
|
206
|
+
nonce: request.nonce,
|
|
207
|
+
client_info: decryptedData.client_info,
|
|
208
|
+
cloud_graph_host_name: decryptedData.cloud_graph_host_name,
|
|
209
|
+
cloud_instance_host_name: decryptedData.cloud_instance_host_name,
|
|
210
|
+
cloud_instance_name: decryptedData.cloud_instance_name,
|
|
211
|
+
msgraph_host: decryptedData.msgraph_host,
|
|
212
|
+
};
|
|
213
|
+
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, TimeUtils.nowSeconds(), request, additionalData, undefined, undefined, undefined, undefined));
|
|
71
214
|
}
|
|
72
215
|
|
|
73
|
-
export { getAuthCodeRequestUrl };
|
|
216
|
+
export { getAuthCodeRequestUrl, getEARForm, handleResponseCode, handleResponseEAR, handleResponsePlatformBroker };
|
|
74
217
|
//# sourceMappingURL=Authorize.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorize.mjs","sources":["../../src/protocol/Authorize.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Authorize.mjs","sources":["../../src/protocol/Authorize.ts"],"sourcesContent":[null],"names":["BrowserAuthErrorCodes.earJwkEmpty","BrowserAuthErrorCodes.nativeConnectionNotEstablished","BrowserAuthErrorCodes.earJweEmpty"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AA4CH;;;;;;;;AAQG;AACH,eAAe,qBAAqB,CAChC,MAA4B,EAC5B,SAAoB,EACpB,OAAsC,EACtC,MAAc,EACd,iBAAqC,EAAA;IAErC,MAAM,UAAU,GAAG,iBAAiB,CAAC,qCAAqC,CACtE,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,EACxC,OAAO,EACP,MAAM,EACN,iBAAiB,CACpB,CAAC;AACF,IAAA,uBAAuB,CAAC,cAAc,CAAC,UAAU,EAAE;QAC/C,GAAG,EAAE,gBAAgB,CAAC,QAAQ;AAC9B,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,EAAE,EAAE,EAAE;AACN,QAAA,GAAG,EAAE,EAAE;AACV,KAAA,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,KAAK,YAAY,CAAC,IAAI,EAAE;QAChD,uBAAuB,CAAC,uBAAuB,CAC3C,UAAU,EACV,MAAM,CAAC,SAAS,CAAC,WAAW,CAC/B,CAAC;AACL,KAAA;IAED,IAAI,OAAO,CAAC,cAAc,EAAE;;AAExB,QAAA,uBAAuB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;;AAGpD,QAAA,IAAI,OAAO,CAAC,oBAAoB,KAAK,oBAAoB,CAAC,GAAG,EAAE;YAC3D,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC3D,YAAA,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAC;;AAG3D,YAAA,IAAI,UAAU,CAAC;AACf,YAAA,IAAI,CAA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MAAM,EACN,cAAc,EACd,aAAa,EACb,YAAY,EACZ,MAAM,EACN,iBAAiB,EACjB,oBAAoB,CACvB,CAAC;AACL,KAAA;AAED,IAAA,MAAM,eAAe,GAAG,IAAI,eAAe,CACvC,MAAM,CAAC,IAAI,CAAC,QAAQ,EACpB,cAAc,EACd,IAAI,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACxC,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,iBAAiB,CACpB,CAAC;;AAGF,IAAA,eAAe,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC;;AAGrD,IAAA,MAAM,cAAc,GAA6B;AAC7C,QAAA,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW,EAAE,aAAa,CAAC,WAAW;QACtC,qBAAqB,EAAE,aAAa,CAAC,qBAAqB;QAC1D,wBAAwB,EAAE,aAAa,CAAC,wBAAwB;QAChE,mBAAmB,EAAE,aAAa,CAAC,mBAAmB;QACtD,YAAY,EAAE,aAAa,CAAC,YAAY;KAC3C,CAAC;IAEF,QAAQ,MAAM,WAAW,CACrB,eAAe,CAAC,yBAAyB,CAAC,IAAI,CAAC,eAAe,CAAC,EAC/D,iBAAiB,CAAC,yBAAyB,EAC3C,MAAM,EACN,iBAAiB,EACjB,OAAO,CAAC,aAAa,CACxB,CACG,aAAa,EACb,SAAS,EACT,SAAS,CAAC,UAAU,EAAE,EACtB,OAAO,EACP,cAAc,EACd,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,CACZ,EAA0B;AAC/B;;;;"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
2
2
|
/**
|
|
3
3
|
* This type is deprecated and will be removed on the next major version update
|
|
4
|
+
* @deprecated Will be removed in future version
|
|
4
5
|
*/
|
|
5
|
-
export type AuthorizationUrlRequest = Omit<CommonAuthorizationUrlRequest, "
|
|
6
|
-
state: string;
|
|
7
|
-
nonce: string;
|
|
8
|
-
};
|
|
6
|
+
export type AuthorizationUrlRequest = Omit<CommonAuthorizationUrlRequest, "requestedClaimsHash" | "platformBroker">;
|
|
9
7
|
//# sourceMappingURL=AuthorizationUrlRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/AuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E
|
|
1
|
+
{"version":3,"file":"AuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/AuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACtC,6BAA6B,EAC7B,qBAAqB,GAAG,gBAAgB,CAC3C,CAAC"}
|
|
@@ -28,7 +28,7 @@ import { PopupWindowAttributes } from "./PopupWindowAttributes.js";
|
|
|
28
28
|
* - popupWindowAttributes - Optional popup window attributes. popupSize with height and width, and popupPosition with top and left can be set.
|
|
29
29
|
* - popupWindowParent - Optional window object to use as the parent when opening popup windows. Uses global `window` if not given.
|
|
30
30
|
*/
|
|
31
|
-
export type PopupRequest = Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "scopes" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">> & {
|
|
31
|
+
export type PopupRequest = Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "scopes" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">> & {
|
|
32
32
|
scopes: Array<string>;
|
|
33
33
|
popupWindowAttributes?: PopupWindowAttributes;
|
|
34
34
|
popupWindowParent?: Window;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupRequest.d.ts","sourceRoot":"","sources":["../../src/request/PopupRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,CAC9B,IAAI,CACA,6BAA6B,EAC3B,cAAc,GACd,QAAQ,GACR,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,gBAAgB,CACrB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"PopupRequest.d.ts","sourceRoot":"","sources":["../../src/request/PopupRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,CAC9B,IAAI,CACA,6BAA6B,EAC3B,cAAc,GACd,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,gBAAgB,CACrB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC"}
|
|
@@ -27,7 +27,7 @@ import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
|
27
27
|
* - redirectStartPage - The page that should be returned to after loginRedirect or acquireTokenRedirect. This should only be used if this is different from the redirectUri and will default to the page that initiates the request. When the navigateToLoginRequestUrl config option is set to false this parameter will be ignored.
|
|
28
28
|
* - onRedirectNavigate - Callback that will be passed the url that MSAL will navigate to. Returning false in the callback will stop navigation.
|
|
29
29
|
*/
|
|
30
|
-
export type RedirectRequest = Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "scopes" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">> & {
|
|
30
|
+
export type RedirectRequest = Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "scopes" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">> & {
|
|
31
31
|
scopes: Array<string>;
|
|
32
32
|
redirectStartPage?: string;
|
|
33
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectRequest.d.ts","sourceRoot":"","sources":["../../src/request/RedirectRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CACjC,IAAI,CACA,6BAA6B,EAC3B,cAAc,GACd,QAAQ,GACR,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,gBAAgB,CACrB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;CACxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"RedirectRequest.d.ts","sourceRoot":"","sources":["../../src/request/RedirectRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CACjC,IAAI,CACA,6BAA6B,EAC3B,cAAc,GACd,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,gBAAgB,CACrB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;CACxD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v4.
|
|
1
|
+
/*! @azure/msal-browser v4.9.1 2025-03-26 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { PerformanceEvents, invokeAsync, AuthenticationScheme, createClientConfigurationError, ClientConfigurationErrorCodes, StringUtils } from '@azure/msal-common/browser';
|
|
4
4
|
import { hashString } from '../crypto/BrowserCrypto.mjs';
|
|
@@ -24,5 +24,5 @@ import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
|
24
24
|
* - tokenQueryParameters - String to string map of custom query parameters added to the /token call
|
|
25
25
|
* - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks.
|
|
26
26
|
*/
|
|
27
|
-
export type SsoSilentRequest = Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>;
|
|
27
|
+
export type SsoSilentRequest = Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>;
|
|
28
28
|
//# sourceMappingURL=SsoSilentRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SsoSilentRequest.d.ts","sourceRoot":"","sources":["../../src/request/SsoSilentRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAClC,IAAI,CACA,6BAA6B,EAC3B,cAAc,GACd,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,gBAAgB,CACrB,CACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"SsoSilentRequest.d.ts","sourceRoot":"","sources":["../../src/request/SsoSilentRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAClC,IAAI,CACA,6BAA6B,EAC3B,cAAc,GACd,QAAQ,GACR,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,gBAAgB,CACrB,CACJ,CAAC"}
|
|
@@ -63,21 +63,12 @@ export type HTTP_REQUEST_TYPE = (typeof HTTP_REQUEST_TYPE)[keyof typeof HTTP_REQ
|
|
|
63
63
|
* Temporary cache keys for MSAL, deleted after any request.
|
|
64
64
|
*/
|
|
65
65
|
export declare const TemporaryCacheKeys: {
|
|
66
|
-
readonly AUTHORITY: "authority";
|
|
67
|
-
readonly ACQUIRE_TOKEN_ACCOUNT: "acquireToken.account";
|
|
68
|
-
readonly SESSION_STATE: "session.state";
|
|
69
|
-
readonly REQUEST_STATE: "request.state";
|
|
70
|
-
readonly NONCE_IDTOKEN: "nonce.id_token";
|
|
71
66
|
readonly ORIGIN_URI: "request.origin";
|
|
72
|
-
readonly RENEW_STATUS: "token.renew.status";
|
|
73
67
|
readonly URL_HASH: "urlHash";
|
|
74
68
|
readonly REQUEST_PARAMS: "request.params";
|
|
75
|
-
readonly
|
|
69
|
+
readonly VERIFIER: "code.verifier";
|
|
76
70
|
readonly INTERACTION_STATUS_KEY: "interaction.status";
|
|
77
|
-
readonly CCS_CREDENTIAL: "ccs.credential";
|
|
78
|
-
readonly CORRELATION_ID: "request.correlationId";
|
|
79
71
|
readonly NATIVE_REQUEST: "request.native";
|
|
80
|
-
readonly REDIRECT_CONTEXT: "request.redirect.context";
|
|
81
72
|
};
|
|
82
73
|
export type TemporaryCacheKeys = (typeof TemporaryCacheKeys)[keyof typeof TemporaryCacheKeys];
|
|
83
74
|
export declare const StaticCacheKeys: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEN,CAAC;AAEF,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC7B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC5B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,Y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DC_DEFAULT_SCOPES } from '@azure/msal-common/browser';
|
|
4
4
|
|
|
@@ -10,10 +10,6 @@ import { OIDC_DEFAULT_SCOPES } from '@azure/msal-common/browser';
|
|
|
10
10
|
* Constants
|
|
11
11
|
*/
|
|
12
12
|
const BrowserConstants = {
|
|
13
|
-
/**
|
|
14
|
-
* Interaction in progress cache value
|
|
15
|
-
*/
|
|
16
|
-
INTERACTION_IN_PROGRESS_VALUE: "interaction_in_progress",
|
|
17
13
|
/**
|
|
18
14
|
* Invalid grant error code
|
|
19
15
|
*/
|
|
@@ -66,21 +62,12 @@ const HTTP_REQUEST_TYPE = {
|
|
|
66
62
|
* Temporary cache keys for MSAL, deleted after any request.
|
|
67
63
|
*/
|
|
68
64
|
const TemporaryCacheKeys = {
|
|
69
|
-
AUTHORITY: "authority",
|
|
70
|
-
ACQUIRE_TOKEN_ACCOUNT: "acquireToken.account",
|
|
71
|
-
SESSION_STATE: "session.state",
|
|
72
|
-
REQUEST_STATE: "request.state",
|
|
73
|
-
NONCE_IDTOKEN: "nonce.id_token",
|
|
74
65
|
ORIGIN_URI: "request.origin",
|
|
75
|
-
RENEW_STATUS: "token.renew.status",
|
|
76
66
|
URL_HASH: "urlHash",
|
|
77
67
|
REQUEST_PARAMS: "request.params",
|
|
78
|
-
|
|
68
|
+
VERIFIER: "code.verifier",
|
|
79
69
|
INTERACTION_STATUS_KEY: "interaction.status",
|
|
80
|
-
CCS_CREDENTIAL: "ccs.credential",
|
|
81
|
-
CORRELATION_ID: "request.correlationId",
|
|
82
70
|
NATIVE_REQUEST: "request.native",
|
|
83
|
-
REDIRECT_CONTEXT: "request.redirect.context",
|
|
84
71
|
};
|
|
85
72
|
const StaticCacheKeys = {
|
|
86
73
|
ACCOUNT_KEYS: "msal.account.keys",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserConstants.mjs","sources":["../../src/utils/BrowserConstants.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;A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