@azure/msal-browser 3.19.1 → 3.20.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.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.mjs +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +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.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- 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 +9 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +83 -43
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +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 +1 -1
- 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/request/RequestHelpers.mjs +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.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +206 -107
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +206 -107
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +64 -64
- package/package.json +2 -2
- package/src/interaction_client/NativeInteractionClient.ts +105 -54
- package/src/packageMetadata.ts +1 -1
package/lib/msal-browser.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.20.0 2024-07-23 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v14.
|
|
5
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -311,7 +311,7 @@ const JsonWebTokenTypes = {
|
|
|
311
311
|
// Token renewal offset default in seconds
|
|
312
312
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
313
313
|
|
|
314
|
-
/*! @azure/msal-common v14.
|
|
314
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
315
315
|
/*
|
|
316
316
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
317
317
|
* Licensed under the MIT License.
|
|
@@ -328,7 +328,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
328
328
|
unexpectedError: unexpectedError
|
|
329
329
|
});
|
|
330
330
|
|
|
331
|
-
/*! @azure/msal-common v14.
|
|
331
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
332
332
|
|
|
333
333
|
/*
|
|
334
334
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -377,7 +377,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
377
377
|
: AuthErrorMessages[code]);
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
/*! @azure/msal-common v14.
|
|
380
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
381
381
|
/*
|
|
382
382
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
383
383
|
* Licensed under the MIT License.
|
|
@@ -475,7 +475,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
475
475
|
userTimeoutReached: userTimeoutReached
|
|
476
476
|
});
|
|
477
477
|
|
|
478
|
-
/*! @azure/msal-common v14.
|
|
478
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
479
479
|
|
|
480
480
|
/*
|
|
481
481
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -727,7 +727,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
727
727
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
728
728
|
}
|
|
729
729
|
|
|
730
|
-
/*! @azure/msal-common v14.
|
|
730
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
731
731
|
|
|
732
732
|
/*
|
|
733
733
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -788,7 +788,7 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
|
|
791
|
-
/*! @azure/msal-common v14.
|
|
791
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
792
792
|
/*
|
|
793
793
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
794
794
|
* Licensed under the MIT License.
|
|
@@ -803,7 +803,7 @@ const AuthorityType = {
|
|
|
803
803
|
Ciam: 3,
|
|
804
804
|
};
|
|
805
805
|
|
|
806
|
-
/*! @azure/msal-common v14.
|
|
806
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
807
807
|
/*
|
|
808
808
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
809
809
|
* Licensed under the MIT License.
|
|
@@ -815,7 +815,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
815
815
|
response.hasOwnProperty("jwks_uri"));
|
|
816
816
|
}
|
|
817
817
|
|
|
818
|
-
/*! @azure/msal-common v14.
|
|
818
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
819
819
|
/*
|
|
820
820
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
821
821
|
* Licensed under the MIT License.
|
|
@@ -869,7 +869,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
869
869
|
urlParseError: urlParseError
|
|
870
870
|
});
|
|
871
871
|
|
|
872
|
-
/*! @azure/msal-common v14.
|
|
872
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
873
873
|
|
|
874
874
|
/*
|
|
875
875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1007,7 +1007,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
1007
1007
|
return new ClientConfigurationError(errorCode);
|
|
1008
1008
|
}
|
|
1009
1009
|
|
|
1010
|
-
/*! @azure/msal-common v14.
|
|
1010
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1011
1011
|
/*
|
|
1012
1012
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1013
1013
|
* Licensed under the MIT License.
|
|
@@ -1104,7 +1104,7 @@ class StringUtils {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
1107
|
-
/*! @azure/msal-common v14.
|
|
1107
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1108
1108
|
|
|
1109
1109
|
/*
|
|
1110
1110
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1151,7 +1151,7 @@ function getDeserializedResponse(responseString) {
|
|
|
1151
1151
|
return null;
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
-
/*! @azure/msal-common v14.
|
|
1154
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1155
1155
|
|
|
1156
1156
|
/*
|
|
1157
1157
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1315,7 +1315,7 @@ class UrlString {
|
|
|
1315
1315
|
}
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
1318
|
-
/*! @azure/msal-common v14.
|
|
1318
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1319
1319
|
|
|
1320
1320
|
/*
|
|
1321
1321
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1455,7 +1455,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1455
1455
|
return null;
|
|
1456
1456
|
}
|
|
1457
1457
|
|
|
1458
|
-
/*! @azure/msal-common v14.
|
|
1458
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1459
1459
|
/*
|
|
1460
1460
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1461
1461
|
* Licensed under the MIT License.
|
|
@@ -1468,7 +1468,7 @@ const ProtocolMode = {
|
|
|
1468
1468
|
OIDC: "OIDC",
|
|
1469
1469
|
};
|
|
1470
1470
|
|
|
1471
|
-
/*! @azure/msal-common v14.
|
|
1471
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1472
1472
|
/*
|
|
1473
1473
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1474
1474
|
* Licensed under the MIT License.
|
|
@@ -1488,7 +1488,7 @@ const AzureCloudInstance = {
|
|
|
1488
1488
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1489
1489
|
};
|
|
1490
1490
|
|
|
1491
|
-
/*! @azure/msal-common v14.
|
|
1491
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1492
1492
|
/*
|
|
1493
1493
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1494
1494
|
* Licensed under the MIT License.
|
|
@@ -1498,7 +1498,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1498
1498
|
response.hasOwnProperty("metadata"));
|
|
1499
1499
|
}
|
|
1500
1500
|
|
|
1501
|
-
/*! @azure/msal-common v14.
|
|
1501
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1502
1502
|
/*
|
|
1503
1503
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1504
1504
|
* Licensed under the MIT License.
|
|
@@ -1508,7 +1508,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1508
1508
|
response.hasOwnProperty("error_description"));
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
|
-
/*! @azure/msal-common v14.
|
|
1511
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1512
1512
|
/*
|
|
1513
1513
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1514
1514
|
* Licensed under the MIT License.
|
|
@@ -1990,7 +1990,7 @@ const IntFields = new Set([
|
|
|
1990
1990
|
"multiMatchedRT",
|
|
1991
1991
|
]);
|
|
1992
1992
|
|
|
1993
|
-
/*! @azure/msal-common v14.
|
|
1993
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
1994
1994
|
/*
|
|
1995
1995
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1996
1996
|
* Licensed under the MIT License.
|
|
@@ -2086,7 +2086,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
2086
2086
|
};
|
|
2087
2087
|
};
|
|
2088
2088
|
|
|
2089
|
-
/*! @azure/msal-common v14.
|
|
2089
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
2090
2090
|
|
|
2091
2091
|
/*
|
|
2092
2092
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2195,7 +2195,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
2195
2195
|
},
|
|
2196
2196
|
};
|
|
2197
2197
|
|
|
2198
|
-
/*! @azure/msal-common v14.
|
|
2198
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
2199
2199
|
/*
|
|
2200
2200
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2201
2201
|
* Licensed under the MIT License.
|
|
@@ -2232,7 +2232,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
2232
2232
|
return cachedAtSec > nowSeconds();
|
|
2233
2233
|
}
|
|
2234
2234
|
|
|
2235
|
-
/*! @azure/msal-common v14.
|
|
2235
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
2236
2236
|
|
|
2237
2237
|
/*
|
|
2238
2238
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2559,7 +2559,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
2559
2559
|
return metadata.expiresAt <= nowSeconds();
|
|
2560
2560
|
}
|
|
2561
2561
|
|
|
2562
|
-
/*! @azure/msal-common v14.
|
|
2562
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
2563
2563
|
|
|
2564
2564
|
/*
|
|
2565
2565
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3398,7 +3398,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3398
3398
|
};
|
|
3399
3399
|
}
|
|
3400
3400
|
|
|
3401
|
-
/*! @azure/msal-common v14.
|
|
3401
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3402
3402
|
|
|
3403
3403
|
/*
|
|
3404
3404
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3429,7 +3429,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3429
3429
|
}
|
|
3430
3430
|
}
|
|
3431
3431
|
|
|
3432
|
-
/*! @azure/msal-common v14.
|
|
3432
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3433
3433
|
/*
|
|
3434
3434
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3435
3435
|
* Licensed under the MIT License.
|
|
@@ -3447,7 +3447,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
3447
3447
|
}
|
|
3448
3448
|
}
|
|
3449
3449
|
|
|
3450
|
-
/*! @azure/msal-common v14.
|
|
3450
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3451
3451
|
/*
|
|
3452
3452
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3453
3453
|
* Licensed under the MIT License.
|
|
@@ -3493,8 +3493,9 @@ const LOGOUT_HINT = "logout_hint";
|
|
|
3493
3493
|
const SID = "sid";
|
|
3494
3494
|
const LOGIN_HINT = "login_hint";
|
|
3495
3495
|
const DOMAIN_HINT = "domain_hint";
|
|
3496
|
+
const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
|
|
3496
3497
|
|
|
3497
|
-
/*! @azure/msal-common v14.
|
|
3498
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3498
3499
|
|
|
3499
3500
|
/*
|
|
3500
3501
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3533,7 +3534,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3533
3534
|
},
|
|
3534
3535
|
};
|
|
3535
3536
|
|
|
3536
|
-
/*! @azure/msal-common v14.
|
|
3537
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3537
3538
|
|
|
3538
3539
|
/*
|
|
3539
3540
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3724,12 +3725,12 @@ class Logger {
|
|
|
3724
3725
|
}
|
|
3725
3726
|
}
|
|
3726
3727
|
|
|
3727
|
-
/*! @azure/msal-common v14.
|
|
3728
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3728
3729
|
/* eslint-disable header/header */
|
|
3729
3730
|
const name$1 = "@azure/msal-common";
|
|
3730
|
-
const version$1 = "14.
|
|
3731
|
+
const version$1 = "14.14.0";
|
|
3731
3732
|
|
|
3732
|
-
/*! @azure/msal-common v14.
|
|
3733
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3733
3734
|
|
|
3734
3735
|
/*
|
|
3735
3736
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3929,7 +3930,7 @@ class ScopeSet {
|
|
|
3929
3930
|
}
|
|
3930
3931
|
}
|
|
3931
3932
|
|
|
3932
|
-
/*! @azure/msal-common v14.
|
|
3933
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3933
3934
|
|
|
3934
3935
|
/*
|
|
3935
3936
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3969,7 +3970,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
3969
3970
|
};
|
|
3970
3971
|
}
|
|
3971
3972
|
|
|
3972
|
-
/*! @azure/msal-common v14.
|
|
3973
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
3973
3974
|
/*
|
|
3974
3975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3975
3976
|
* Licensed under the MIT License.
|
|
@@ -4048,7 +4049,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
4048
4049
|
return updatedAccountInfo;
|
|
4049
4050
|
}
|
|
4050
4051
|
|
|
4051
|
-
/*! @azure/msal-common v14.
|
|
4052
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
4052
4053
|
/*
|
|
4053
4054
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4054
4055
|
* Licensed under the MIT License.
|
|
@@ -4070,7 +4071,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
4070
4071
|
return null;
|
|
4071
4072
|
}
|
|
4072
4073
|
|
|
4073
|
-
/*! @azure/msal-common v14.
|
|
4074
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
4074
4075
|
|
|
4075
4076
|
/*
|
|
4076
4077
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4313,7 +4314,7 @@ class AccountEntity {
|
|
|
4313
4314
|
}
|
|
4314
4315
|
}
|
|
4315
4316
|
|
|
4316
|
-
/*! @azure/msal-common v14.
|
|
4317
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
4317
4318
|
/*
|
|
4318
4319
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4319
4320
|
* Licensed under the MIT License.
|
|
@@ -4321,7 +4322,7 @@ class AccountEntity {
|
|
|
4321
4322
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
4322
4323
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
4323
4324
|
|
|
4324
|
-
/*! @azure/msal-common v14.
|
|
4325
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
4325
4326
|
|
|
4326
4327
|
/*
|
|
4327
4328
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4348,7 +4349,7 @@ class CacheError extends Error {
|
|
|
4348
4349
|
}
|
|
4349
4350
|
}
|
|
4350
4351
|
|
|
4351
|
-
/*! @azure/msal-common v14.
|
|
4352
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
4352
4353
|
|
|
4353
4354
|
/*
|
|
4354
4355
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5600,7 +5601,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5600
5601
|
}
|
|
5601
5602
|
}
|
|
5602
5603
|
|
|
5603
|
-
/*! @azure/msal-common v14.
|
|
5604
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
5604
5605
|
|
|
5605
5606
|
/*
|
|
5606
5607
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5698,7 +5699,7 @@ function isOidcProtocolMode(config) {
|
|
|
5698
5699
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5699
5700
|
}
|
|
5700
5701
|
|
|
5701
|
-
/*! @azure/msal-common v14.
|
|
5702
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
5702
5703
|
|
|
5703
5704
|
/*
|
|
5704
5705
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5717,7 +5718,7 @@ class ServerError extends AuthError {
|
|
|
5717
5718
|
}
|
|
5718
5719
|
}
|
|
5719
5720
|
|
|
5720
|
-
/*! @azure/msal-common v14.
|
|
5721
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
5721
5722
|
|
|
5722
5723
|
/*
|
|
5723
5724
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5815,7 +5816,7 @@ class ThrottlingUtils {
|
|
|
5815
5816
|
}
|
|
5816
5817
|
}
|
|
5817
5818
|
|
|
5818
|
-
/*! @azure/msal-common v14.
|
|
5819
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
5819
5820
|
|
|
5820
5821
|
/*
|
|
5821
5822
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5852,7 +5853,7 @@ class NetworkManager {
|
|
|
5852
5853
|
}
|
|
5853
5854
|
}
|
|
5854
5855
|
|
|
5855
|
-
/*! @azure/msal-common v14.
|
|
5856
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
5856
5857
|
/*
|
|
5857
5858
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5858
5859
|
* Licensed under the MIT License.
|
|
@@ -5862,7 +5863,7 @@ const CcsCredentialType = {
|
|
|
5862
5863
|
UPN: "UPN",
|
|
5863
5864
|
};
|
|
5864
5865
|
|
|
5865
|
-
/*! @azure/msal-common v14.
|
|
5866
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
5866
5867
|
|
|
5867
5868
|
/*
|
|
5868
5869
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5929,7 +5930,7 @@ class RequestValidator {
|
|
|
5929
5930
|
}
|
|
5930
5931
|
}
|
|
5931
5932
|
|
|
5932
|
-
/*! @azure/msal-common v14.
|
|
5933
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
5933
5934
|
|
|
5934
5935
|
/*
|
|
5935
5936
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6314,7 +6315,7 @@ class RequestParameterBuilder {
|
|
|
6314
6315
|
}
|
|
6315
6316
|
}
|
|
6316
6317
|
|
|
6317
|
-
/*! @azure/msal-common v14.
|
|
6318
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6318
6319
|
|
|
6319
6320
|
/*
|
|
6320
6321
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6417,7 +6418,7 @@ class BaseClient {
|
|
|
6417
6418
|
}
|
|
6418
6419
|
}
|
|
6419
6420
|
|
|
6420
|
-
/*! @azure/msal-common v14.
|
|
6421
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6421
6422
|
/*
|
|
6422
6423
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6423
6424
|
* Licensed under the MIT License.
|
|
@@ -6443,7 +6444,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6443
6444
|
refreshTokenExpired: refreshTokenExpired
|
|
6444
6445
|
});
|
|
6445
6446
|
|
|
6446
|
-
/*! @azure/msal-common v14.
|
|
6447
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6447
6448
|
|
|
6448
6449
|
/*
|
|
6449
6450
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6531,7 +6532,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
6531
6532
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6532
6533
|
}
|
|
6533
6534
|
|
|
6534
|
-
/*! @azure/msal-common v14.
|
|
6535
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6535
6536
|
|
|
6536
6537
|
/*
|
|
6537
6538
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6603,7 +6604,7 @@ class ProtocolUtils {
|
|
|
6603
6604
|
}
|
|
6604
6605
|
}
|
|
6605
6606
|
|
|
6606
|
-
/*! @azure/msal-common v14.
|
|
6607
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6607
6608
|
|
|
6608
6609
|
/*
|
|
6609
6610
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6687,7 +6688,7 @@ class PopTokenGenerator {
|
|
|
6687
6688
|
}
|
|
6688
6689
|
}
|
|
6689
6690
|
|
|
6690
|
-
/*! @azure/msal-common v14.
|
|
6691
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6691
6692
|
/*
|
|
6692
6693
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6693
6694
|
* Licensed under the MIT License.
|
|
@@ -6714,7 +6715,7 @@ class PopTokenGenerator {
|
|
|
6714
6715
|
}
|
|
6715
6716
|
}
|
|
6716
6717
|
|
|
6717
|
-
/*! @azure/msal-common v14.
|
|
6718
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
6718
6719
|
|
|
6719
6720
|
/*
|
|
6720
6721
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7091,7 +7092,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
7091
7092
|
return baseAccount;
|
|
7092
7093
|
}
|
|
7093
7094
|
|
|
7094
|
-
/*! @azure/msal-common v14.
|
|
7095
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7095
7096
|
|
|
7096
7097
|
/*
|
|
7097
7098
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7514,7 +7515,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7514
7515
|
}
|
|
7515
7516
|
}
|
|
7516
7517
|
|
|
7517
|
-
/*! @azure/msal-common v14.
|
|
7518
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7518
7519
|
|
|
7519
7520
|
/*
|
|
7520
7521
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7728,7 +7729,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7728
7729
|
}
|
|
7729
7730
|
}
|
|
7730
7731
|
|
|
7731
|
-
/*! @azure/msal-common v14.
|
|
7732
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7732
7733
|
|
|
7733
7734
|
/*
|
|
7734
7735
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7864,7 +7865,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
7864
7865
|
}
|
|
7865
7866
|
}
|
|
7866
7867
|
|
|
7867
|
-
/*! @azure/msal-common v14.
|
|
7868
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7868
7869
|
|
|
7869
7870
|
/*
|
|
7870
7871
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7879,7 +7880,7 @@ const StubbedNetworkModule = {
|
|
|
7879
7880
|
},
|
|
7880
7881
|
};
|
|
7881
7882
|
|
|
7882
|
-
/*! @azure/msal-common v14.
|
|
7883
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7883
7884
|
/*
|
|
7884
7885
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7885
7886
|
* Licensed under the MIT License.
|
|
@@ -7887,7 +7888,7 @@ const StubbedNetworkModule = {
|
|
|
7887
7888
|
const missingKidError = "missing_kid_error";
|
|
7888
7889
|
const missingAlgError = "missing_alg_error";
|
|
7889
7890
|
|
|
7890
|
-
/*! @azure/msal-common v14.
|
|
7891
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7891
7892
|
|
|
7892
7893
|
/*
|
|
7893
7894
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7912,7 +7913,7 @@ function createJoseHeaderError(code) {
|
|
|
7912
7913
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
7913
7914
|
}
|
|
7914
7915
|
|
|
7915
|
-
/*! @azure/msal-common v14.
|
|
7916
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7916
7917
|
|
|
7917
7918
|
/*
|
|
7918
7919
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7952,7 +7953,7 @@ class JoseHeader {
|
|
|
7952
7953
|
}
|
|
7953
7954
|
}
|
|
7954
7955
|
|
|
7955
|
-
/*! @azure/msal-common v14.
|
|
7956
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
7956
7957
|
|
|
7957
7958
|
/*
|
|
7958
7959
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8010,12 +8011,50 @@ class AuthenticationHeaderParser {
|
|
|
8010
8011
|
}
|
|
8011
8012
|
}
|
|
8012
8013
|
|
|
8013
|
-
/*! @azure/msal-common v14.
|
|
8014
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
8014
8015
|
|
|
8015
8016
|
/*
|
|
8016
8017
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8017
8018
|
* Licensed under the MIT License.
|
|
8018
8019
|
*/
|
|
8020
|
+
const skuGroupSeparator = ",";
|
|
8021
|
+
const skuValueSeparator = "|";
|
|
8022
|
+
function makeExtraSkuString(params) {
|
|
8023
|
+
const { skus, libraryName, libraryVersion, extensionName, extensionVersion, } = params;
|
|
8024
|
+
const skuMap = new Map([
|
|
8025
|
+
[0, [libraryName, libraryVersion]],
|
|
8026
|
+
[2, [extensionName, extensionVersion]],
|
|
8027
|
+
]);
|
|
8028
|
+
let skuArr = [];
|
|
8029
|
+
if (skus?.length) {
|
|
8030
|
+
skuArr = skus.split(skuGroupSeparator);
|
|
8031
|
+
// Ignore invalid input sku param
|
|
8032
|
+
if (skuArr.length < 4) {
|
|
8033
|
+
return skus;
|
|
8034
|
+
}
|
|
8035
|
+
}
|
|
8036
|
+
else {
|
|
8037
|
+
skuArr = Array.from({ length: 4 }, () => skuValueSeparator);
|
|
8038
|
+
}
|
|
8039
|
+
skuMap.forEach((value, key) => {
|
|
8040
|
+
if (value.length === 2 && value[0]?.length && value[1]?.length) {
|
|
8041
|
+
setSku({
|
|
8042
|
+
skuArr,
|
|
8043
|
+
index: key,
|
|
8044
|
+
skuName: value[0],
|
|
8045
|
+
skuVersion: value[1],
|
|
8046
|
+
});
|
|
8047
|
+
}
|
|
8048
|
+
});
|
|
8049
|
+
return skuArr.join(skuGroupSeparator);
|
|
8050
|
+
}
|
|
8051
|
+
function setSku(params) {
|
|
8052
|
+
const { skuArr, index, skuName, skuVersion } = params;
|
|
8053
|
+
if (index >= skuArr.length) {
|
|
8054
|
+
return;
|
|
8055
|
+
}
|
|
8056
|
+
skuArr[index] = [skuName, skuVersion].join(skuValueSeparator);
|
|
8057
|
+
}
|
|
8019
8058
|
/** @internal */
|
|
8020
8059
|
class ServerTelemetryManager {
|
|
8021
8060
|
constructor(telemetryRequest, cacheManager) {
|
|
@@ -8035,7 +8074,12 @@ class ServerTelemetryManager {
|
|
|
8035
8074
|
*/
|
|
8036
8075
|
generateCurrentRequestHeaderValue() {
|
|
8037
8076
|
const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`;
|
|
8038
|
-
const
|
|
8077
|
+
const platformFieldsArr = [this.wrapperSKU, this.wrapperVer];
|
|
8078
|
+
const nativeBrokerErrorCode = this.getNativeBrokerErrorCode();
|
|
8079
|
+
if (nativeBrokerErrorCode?.length) {
|
|
8080
|
+
platformFieldsArr.push(`broker_error=${nativeBrokerErrorCode}`);
|
|
8081
|
+
}
|
|
8082
|
+
const platformFields = platformFieldsArr.join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);
|
|
8039
8083
|
const regionDiscoveryFields = this.getRegionDiscoveryFields();
|
|
8040
8084
|
const requestWithRegionDiscoveryFields = [
|
|
8041
8085
|
request,
|
|
@@ -8212,9 +8256,25 @@ class ServerTelemetryManager {
|
|
|
8212
8256
|
setCacheOutcome(cacheOutcome) {
|
|
8213
8257
|
this.cacheOutcome = cacheOutcome;
|
|
8214
8258
|
}
|
|
8259
|
+
setNativeBrokerErrorCode(errorCode) {
|
|
8260
|
+
const lastRequests = this.getLastRequests();
|
|
8261
|
+
lastRequests.nativeBrokerErrorCode = errorCode;
|
|
8262
|
+
this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);
|
|
8263
|
+
}
|
|
8264
|
+
getNativeBrokerErrorCode() {
|
|
8265
|
+
return this.getLastRequests().nativeBrokerErrorCode;
|
|
8266
|
+
}
|
|
8267
|
+
clearNativeBrokerErrorCode() {
|
|
8268
|
+
const lastRequests = this.getLastRequests();
|
|
8269
|
+
delete lastRequests.nativeBrokerErrorCode;
|
|
8270
|
+
this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);
|
|
8271
|
+
}
|
|
8272
|
+
static makeExtraSkuString(params) {
|
|
8273
|
+
return makeExtraSkuString(params);
|
|
8274
|
+
}
|
|
8215
8275
|
}
|
|
8216
8276
|
|
|
8217
|
-
/*! @azure/msal-common v14.
|
|
8277
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
8218
8278
|
|
|
8219
8279
|
/*
|
|
8220
8280
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8293,7 +8353,7 @@ class StubPerformanceClient {
|
|
|
8293
8353
|
}
|
|
8294
8354
|
}
|
|
8295
8355
|
|
|
8296
|
-
/*! @azure/msal-common v14.
|
|
8356
|
+
/*! @azure/msal-common v14.14.0 2024-07-23 */
|
|
8297
8357
|
|
|
8298
8358
|
/*
|
|
8299
8359
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10164,7 +10224,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
10164
10224
|
|
|
10165
10225
|
/* eslint-disable header/header */
|
|
10166
10226
|
const name = "@azure/msal-browser";
|
|
10167
|
-
const version = "3.
|
|
10227
|
+
const version = "3.20.0";
|
|
10168
10228
|
|
|
10169
10229
|
/*
|
|
10170
10230
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -13312,6 +13372,30 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13312
13372
|
this.nativeMessageHandler = provider;
|
|
13313
13373
|
this.nativeStorageManager = nativeStorageImpl;
|
|
13314
13374
|
this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId);
|
|
13375
|
+
this.serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
|
|
13376
|
+
const extensionName = this.nativeMessageHandler.getExtensionId() ===
|
|
13377
|
+
NativeConstants.PREFERRED_EXTENSION_ID
|
|
13378
|
+
? "chrome"
|
|
13379
|
+
: this.nativeMessageHandler.getExtensionId()?.length
|
|
13380
|
+
? "unknown"
|
|
13381
|
+
: undefined;
|
|
13382
|
+
this.skus = ServerTelemetryManager.makeExtraSkuString({
|
|
13383
|
+
libraryName: BrowserConstants.MSAL_SKU,
|
|
13384
|
+
libraryVersion: version,
|
|
13385
|
+
extensionName: extensionName,
|
|
13386
|
+
extensionVersion: this.nativeMessageHandler.getExtensionVersion(),
|
|
13387
|
+
});
|
|
13388
|
+
}
|
|
13389
|
+
/**
|
|
13390
|
+
* Adds SKUs to request extra query parameters
|
|
13391
|
+
* @param request {NativeTokenRequest}
|
|
13392
|
+
* @private
|
|
13393
|
+
*/
|
|
13394
|
+
addRequestSKUs(request) {
|
|
13395
|
+
request.extraParameters = {
|
|
13396
|
+
...request.extraParameters,
|
|
13397
|
+
[X_CLIENT_EXTRA_SKU]: this.skus,
|
|
13398
|
+
};
|
|
13315
13399
|
}
|
|
13316
13400
|
/**
|
|
13317
13401
|
* Acquire token from native platform via browser extension
|
|
@@ -13323,48 +13407,57 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13323
13407
|
// start the perf measurement
|
|
13324
13408
|
const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
|
|
13325
13409
|
const reqTimestamp = nowSeconds();
|
|
13326
|
-
// initialize native request
|
|
13327
|
-
const nativeRequest = await this.initializeNativeRequest(request);
|
|
13328
|
-
// check if the tokens can be retrieved from internal cache
|
|
13329
13410
|
try {
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13411
|
+
// initialize native request
|
|
13412
|
+
const nativeRequest = await this.initializeNativeRequest(request);
|
|
13413
|
+
// check if the tokens can be retrieved from internal cache
|
|
13414
|
+
try {
|
|
13415
|
+
const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
|
|
13416
|
+
nativeATMeasurement.end({
|
|
13417
|
+
success: true,
|
|
13418
|
+
isNativeBroker: false,
|
|
13419
|
+
fromCache: true,
|
|
13420
|
+
});
|
|
13421
|
+
return result;
|
|
13422
|
+
}
|
|
13423
|
+
catch (e) {
|
|
13424
|
+
// continue with a native call for any and all errors
|
|
13425
|
+
this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
|
|
13426
|
+
}
|
|
13427
|
+
const { ...nativeTokenRequest } = nativeRequest;
|
|
13428
|
+
// fall back to native calls
|
|
13429
|
+
const messageBody = {
|
|
13430
|
+
method: NativeExtensionMethod.GetToken,
|
|
13431
|
+
request: nativeTokenRequest,
|
|
13432
|
+
};
|
|
13433
|
+
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
13434
|
+
const validatedResponse = this.validateNativeResponse(response);
|
|
13435
|
+
return await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
|
|
13436
|
+
.then((result) => {
|
|
13437
|
+
nativeATMeasurement.end({
|
|
13438
|
+
success: true,
|
|
13439
|
+
isNativeBroker: true,
|
|
13440
|
+
requestId: result.requestId,
|
|
13441
|
+
});
|
|
13442
|
+
this.serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
13443
|
+
return result;
|
|
13444
|
+
})
|
|
13445
|
+
.catch((error) => {
|
|
13446
|
+
nativeATMeasurement.end({
|
|
13447
|
+
success: false,
|
|
13448
|
+
errorCode: error.errorCode,
|
|
13449
|
+
subErrorCode: error.subError,
|
|
13450
|
+
isNativeBroker: true,
|
|
13451
|
+
});
|
|
13452
|
+
throw error;
|
|
13335
13453
|
});
|
|
13336
|
-
return result;
|
|
13337
13454
|
}
|
|
13338
13455
|
catch (e) {
|
|
13339
|
-
|
|
13340
|
-
|
|
13456
|
+
if (e instanceof NativeAuthError) {
|
|
13457
|
+
this.serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
13458
|
+
}
|
|
13459
|
+
throw e;
|
|
13341
13460
|
}
|
|
13342
|
-
const { ...nativeTokenRequest } = nativeRequest;
|
|
13343
|
-
// fall back to native calls
|
|
13344
|
-
const messageBody = {
|
|
13345
|
-
method: NativeExtensionMethod.GetToken,
|
|
13346
|
-
request: nativeTokenRequest,
|
|
13347
|
-
};
|
|
13348
|
-
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
13349
|
-
const validatedResponse = this.validateNativeResponse(response);
|
|
13350
|
-
return this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
|
|
13351
|
-
.then((result) => {
|
|
13352
|
-
nativeATMeasurement.end({
|
|
13353
|
-
success: true,
|
|
13354
|
-
isNativeBroker: true,
|
|
13355
|
-
requestId: result.requestId,
|
|
13356
|
-
});
|
|
13357
|
-
return result;
|
|
13358
|
-
})
|
|
13359
|
-
.catch((error) => {
|
|
13360
|
-
nativeATMeasurement.end({
|
|
13361
|
-
success: false,
|
|
13362
|
-
errorCode: error.errorCode,
|
|
13363
|
-
subErrorCode: error.subError,
|
|
13364
|
-
isNativeBroker: true,
|
|
13365
|
-
});
|
|
13366
|
-
throw error;
|
|
13367
|
-
});
|
|
13368
13461
|
}
|
|
13369
13462
|
/**
|
|
13370
13463
|
* Creates silent flow request
|
|
@@ -13437,8 +13530,11 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13437
13530
|
}
|
|
13438
13531
|
catch (e) {
|
|
13439
13532
|
// Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
|
|
13440
|
-
if (e instanceof NativeAuthError
|
|
13441
|
-
|
|
13533
|
+
if (e instanceof NativeAuthError) {
|
|
13534
|
+
this.serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
13535
|
+
if (isFatalNativeAuthError(e)) {
|
|
13536
|
+
throw e;
|
|
13537
|
+
}
|
|
13442
13538
|
}
|
|
13443
13539
|
}
|
|
13444
13540
|
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(nativeRequest), true);
|
|
@@ -13489,7 +13585,9 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13489
13585
|
this.validateNativeResponse(response);
|
|
13490
13586
|
const result = this.handleNativeResponse(response, request, reqTimestamp);
|
|
13491
13587
|
this.browserStorage.setInteractionInProgress(false);
|
|
13492
|
-
|
|
13588
|
+
const res = await result;
|
|
13589
|
+
this.serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
13590
|
+
return res;
|
|
13493
13591
|
}
|
|
13494
13592
|
catch (e) {
|
|
13495
13593
|
this.browserStorage.setInteractionInProgress(false);
|
|
@@ -13853,6 +13951,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13853
13951
|
// SPAs require whole string to be passed to broker
|
|
13854
13952
|
validatedRequest.reqCnf = reqCnfData;
|
|
13855
13953
|
}
|
|
13954
|
+
this.addRequestSKUs(validatedRequest);
|
|
13856
13955
|
return validatedRequest;
|
|
13857
13956
|
}
|
|
13858
13957
|
/**
|