@cosmotech/core 3.0.0-dev.0 → 3.0.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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +1 -1
- package/dist/index.cjs.js +292 -205
- package/dist/index.esm.js +292 -205
- package/package.json +13 -13
package/dist/index.esm.js
CHANGED
|
@@ -7172,7 +7172,12 @@ var includesStringExports = includesString.exports;
|
|
|
7172
7172
|
var before_at = before_slash.substring(0, at_position);
|
|
7173
7173
|
var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/;
|
|
7174
7174
|
var is_valid_auth = valid_auth_regex.test(before_at);
|
|
7175
|
-
|
|
7175
|
+
|
|
7176
|
+
// Check if this contains URL-encoded content that could be malicious
|
|
7177
|
+
// For example: javascript:%61%6c%65%72%74%28%31%29@example.com
|
|
7178
|
+
// The encoded part decodes to: alert(1)
|
|
7179
|
+
var has_encoded_content = /%[0-9a-fA-F]{2}/.test(before_at);
|
|
7180
|
+
if (is_valid_auth && !has_encoded_content) {
|
|
7176
7181
|
// This looks like authentication (e.g., user:password@host), not a protocol
|
|
7177
7182
|
if (options.require_protocol) {
|
|
7178
7183
|
return false;
|
|
@@ -7181,6 +7186,7 @@ var includesStringExports = includesString.exports;
|
|
|
7181
7186
|
// Don't consume the colon; let the auth parsing handle it later
|
|
7182
7187
|
} else {
|
|
7183
7188
|
// This looks like a malicious protocol (e.g., javascript:alert();@host)
|
|
7189
|
+
// or URL-encoded protocol handler (e.g., javascript:%61%6c%65%72%74%28%31%29@host)
|
|
7184
7190
|
url = cleanUpProtocol(potential_protocol);
|
|
7185
7191
|
if (url === false) {
|
|
7186
7192
|
return false;
|
|
@@ -8427,11 +8433,18 @@ var isHexColor = {exports: {}};
|
|
|
8427
8433
|
});
|
|
8428
8434
|
exports$1.default = isHexColor;
|
|
8429
8435
|
var _assertString = _interopRequireDefault(assertStringExports);
|
|
8436
|
+
var _merge = _interopRequireDefault(mergeExports);
|
|
8430
8437
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8431
8438
|
var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
|
|
8432
|
-
|
|
8439
|
+
var hexcolor_with_prefix = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
|
|
8440
|
+
var default_is_hexcolor_options = {
|
|
8441
|
+
require_hashtag: false
|
|
8442
|
+
};
|
|
8443
|
+
function isHexColor(str, options) {
|
|
8433
8444
|
(0, _assertString.default)(str);
|
|
8434
|
-
|
|
8445
|
+
options = (0, _merge.default)(options, default_is_hexcolor_options);
|
|
8446
|
+
var hexcolor_regex = options.require_hashtag ? hexcolor_with_prefix : hexcolor;
|
|
8447
|
+
return hexcolor_regex.test(str);
|
|
8435
8448
|
}
|
|
8436
8449
|
module.exports = exports$1.default;
|
|
8437
8450
|
module.exports.default = exports$1.default;
|
|
@@ -8589,7 +8602,7 @@ var ibanRegexThroughCountryCode = {
|
|
|
8589
8602
|
IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/,
|
|
8590
8603
|
IL: /^(IL[0-9]{2})\d{19}$/,
|
|
8591
8604
|
IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,
|
|
8592
|
-
IR: /^(IR[0-9]{2})
|
|
8605
|
+
IR: /^(IR[0-9]{2})\d{22}$/,
|
|
8593
8606
|
IS: /^(IS[0-9]{2})\d{22}$/,
|
|
8594
8607
|
IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,
|
|
8595
8608
|
JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/,
|
|
@@ -13356,7 +13369,7 @@ function isVAT(str, countryCode) {
|
|
|
13356
13369
|
var _isVAT = _interopRequireDefault(isVAT$1);
|
|
13357
13370
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13358
13371
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13359
|
-
var version = '13.15.
|
|
13372
|
+
var version = '13.15.26';
|
|
13360
13373
|
var validator = {
|
|
13361
13374
|
version: version,
|
|
13362
13375
|
toDate: _toDate.default,
|
|
@@ -42487,7 +42500,7 @@ var AuthDev = {
|
|
|
42487
42500
|
acquireTokensByRequest
|
|
42488
42501
|
};
|
|
42489
42502
|
|
|
42490
|
-
/*! @azure/msal-common v15.
|
|
42503
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42491
42504
|
/*
|
|
42492
42505
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
42493
42506
|
* Licensed under the MIT License.
|
|
@@ -42761,7 +42774,7 @@ const JsonWebTokenTypes = {
|
|
|
42761
42774
|
// Token renewal offset default in seconds
|
|
42762
42775
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
42763
42776
|
|
|
42764
|
-
/*! @azure/msal-common v15.
|
|
42777
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42765
42778
|
/*
|
|
42766
42779
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
42767
42780
|
* Licensed under the MIT License.
|
|
@@ -42772,7 +42785,7 @@ const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
|
42772
42785
|
const unexpectedError = "unexpected_error";
|
|
42773
42786
|
const postRequestFailed$1 = "post_request_failed";
|
|
42774
42787
|
|
|
42775
|
-
/*! @azure/msal-common v15.
|
|
42788
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42776
42789
|
|
|
42777
42790
|
/*
|
|
42778
42791
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -42807,7 +42820,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
42807
42820
|
: AuthErrorMessages[code]);
|
|
42808
42821
|
}
|
|
42809
42822
|
|
|
42810
|
-
/*! @azure/msal-common v15.
|
|
42823
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42811
42824
|
/*
|
|
42812
42825
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
42813
42826
|
* Licensed under the MIT License.
|
|
@@ -42858,7 +42871,7 @@ const methodNotImplemented = "method_not_implemented";
|
|
|
42858
42871
|
const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
|
|
42859
42872
|
const platformBrokerError = "platform_broker_error";
|
|
42860
42873
|
|
|
42861
|
-
/*! @azure/msal-common v15.
|
|
42874
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42862
42875
|
|
|
42863
42876
|
/*
|
|
42864
42877
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -42933,7 +42946,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
42933
42946
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
42934
42947
|
}
|
|
42935
42948
|
|
|
42936
|
-
/*! @azure/msal-common v15.
|
|
42949
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42937
42950
|
|
|
42938
42951
|
/*
|
|
42939
42952
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -42972,7 +42985,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
42972
42985
|
},
|
|
42973
42986
|
};
|
|
42974
42987
|
|
|
42975
|
-
/*! @azure/msal-common v15.
|
|
42988
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42976
42989
|
|
|
42977
42990
|
/*
|
|
42978
42991
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43163,12 +43176,12 @@ class Logger {
|
|
|
43163
43176
|
}
|
|
43164
43177
|
}
|
|
43165
43178
|
|
|
43166
|
-
/*! @azure/msal-common v15.
|
|
43179
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43167
43180
|
/* eslint-disable header/header */
|
|
43168
43181
|
const name$2 = "@azure/msal-common";
|
|
43169
|
-
const version$1 = "15.
|
|
43182
|
+
const version$1 = "15.14.1";
|
|
43170
43183
|
|
|
43171
|
-
/*! @azure/msal-common v15.
|
|
43184
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43172
43185
|
/*
|
|
43173
43186
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43174
43187
|
* Licensed under the MIT License.
|
|
@@ -43177,7 +43190,7 @@ const AzureCloudInstance = {
|
|
|
43177
43190
|
// AzureCloudInstance is not specified.
|
|
43178
43191
|
None: "none"};
|
|
43179
43192
|
|
|
43180
|
-
/*! @azure/msal-common v15.
|
|
43193
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43181
43194
|
/*
|
|
43182
43195
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43183
43196
|
* Licensed under the MIT License.
|
|
@@ -43207,7 +43220,7 @@ const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
|
|
|
43207
43220
|
const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
|
|
43208
43221
|
const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
|
|
43209
43222
|
|
|
43210
|
-
/*! @azure/msal-common v15.
|
|
43223
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43211
43224
|
|
|
43212
43225
|
/*
|
|
43213
43226
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43253,7 +43266,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
43253
43266
|
return new ClientConfigurationError(errorCode);
|
|
43254
43267
|
}
|
|
43255
43268
|
|
|
43256
|
-
/*! @azure/msal-common v15.
|
|
43269
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43257
43270
|
/*
|
|
43258
43271
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43259
43272
|
* Licensed under the MIT License.
|
|
@@ -43350,7 +43363,7 @@ class StringUtils {
|
|
|
43350
43363
|
}
|
|
43351
43364
|
}
|
|
43352
43365
|
|
|
43353
|
-
/*! @azure/msal-common v15.
|
|
43366
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43354
43367
|
|
|
43355
43368
|
/*
|
|
43356
43369
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43545,7 +43558,7 @@ class ScopeSet {
|
|
|
43545
43558
|
}
|
|
43546
43559
|
}
|
|
43547
43560
|
|
|
43548
|
-
/*! @azure/msal-common v15.
|
|
43561
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43549
43562
|
|
|
43550
43563
|
/*
|
|
43551
43564
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43585,7 +43598,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
43585
43598
|
};
|
|
43586
43599
|
}
|
|
43587
43600
|
|
|
43588
|
-
/*! @azure/msal-common v15.
|
|
43601
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43589
43602
|
/*
|
|
43590
43603
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43591
43604
|
* Licensed under the MIT License.
|
|
@@ -43667,7 +43680,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
43667
43680
|
return updatedAccountInfo;
|
|
43668
43681
|
}
|
|
43669
43682
|
|
|
43670
|
-
/*! @azure/msal-common v15.
|
|
43683
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43671
43684
|
/*
|
|
43672
43685
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43673
43686
|
* Licensed under the MIT License.
|
|
@@ -43682,7 +43695,7 @@ const AuthorityType = {
|
|
|
43682
43695
|
Ciam: 3,
|
|
43683
43696
|
};
|
|
43684
43697
|
|
|
43685
|
-
/*! @azure/msal-common v15.
|
|
43698
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43686
43699
|
/*
|
|
43687
43700
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43688
43701
|
* Licensed under the MIT License.
|
|
@@ -43704,7 +43717,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
43704
43717
|
return null;
|
|
43705
43718
|
}
|
|
43706
43719
|
|
|
43707
|
-
/*! @azure/msal-common v15.
|
|
43720
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43708
43721
|
/*
|
|
43709
43722
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43710
43723
|
* Licensed under the MIT License.
|
|
@@ -43728,7 +43741,7 @@ const ProtocolMode = {
|
|
|
43728
43741
|
EAR: "EAR",
|
|
43729
43742
|
};
|
|
43730
43743
|
|
|
43731
|
-
/*! @azure/msal-common v15.
|
|
43744
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43732
43745
|
|
|
43733
43746
|
/*
|
|
43734
43747
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43762,6 +43775,13 @@ class AccountEntity {
|
|
|
43762
43775
|
* Returns the AccountInfo interface for this account.
|
|
43763
43776
|
*/
|
|
43764
43777
|
static getAccountInfo(accountEntity) {
|
|
43778
|
+
const tenantProfiles = accountEntity.tenantProfiles || [];
|
|
43779
|
+
// Ensure at least the home tenant profile exists
|
|
43780
|
+
if (tenantProfiles.length === 0 &&
|
|
43781
|
+
accountEntity.realm &&
|
|
43782
|
+
accountEntity.localAccountId) {
|
|
43783
|
+
tenantProfiles.push(buildTenantProfile(accountEntity.homeAccountId, accountEntity.localAccountId, accountEntity.realm));
|
|
43784
|
+
}
|
|
43765
43785
|
return {
|
|
43766
43786
|
homeAccountId: accountEntity.homeAccountId,
|
|
43767
43787
|
environment: accountEntity.environment,
|
|
@@ -43773,7 +43793,7 @@ class AccountEntity {
|
|
|
43773
43793
|
nativeAccountId: accountEntity.nativeAccountId,
|
|
43774
43794
|
authorityType: accountEntity.authorityType,
|
|
43775
43795
|
// Deserialize tenant profiles array into a Map
|
|
43776
|
-
tenantProfiles: new Map(
|
|
43796
|
+
tenantProfiles: new Map(tenantProfiles.map((tenantProfile) => {
|
|
43777
43797
|
return [tenantProfile.tenantId, tenantProfile];
|
|
43778
43798
|
})),
|
|
43779
43799
|
dataBoundary: accountEntity.dataBoundary,
|
|
@@ -43874,7 +43894,14 @@ class AccountEntity {
|
|
|
43874
43894
|
account.cloudGraphHostName = cloudGraphHostName;
|
|
43875
43895
|
account.msGraphHost = msGraphHost;
|
|
43876
43896
|
// Serialize tenant profiles map into an array
|
|
43877
|
-
|
|
43897
|
+
const tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []);
|
|
43898
|
+
// Ensure at least the home tenant profile exists
|
|
43899
|
+
if (tenantProfiles.length === 0 &&
|
|
43900
|
+
accountInfo.tenantId &&
|
|
43901
|
+
accountInfo.localAccountId) {
|
|
43902
|
+
tenantProfiles.push(buildTenantProfile(accountInfo.homeAccountId, accountInfo.localAccountId, accountInfo.tenantId, accountInfo.idTokenClaims));
|
|
43903
|
+
}
|
|
43904
|
+
account.tenantProfiles = tenantProfiles;
|
|
43878
43905
|
account.dataBoundary = accountInfo.dataBoundary;
|
|
43879
43906
|
return account;
|
|
43880
43907
|
}
|
|
@@ -43949,7 +43976,7 @@ class AccountEntity {
|
|
|
43949
43976
|
}
|
|
43950
43977
|
}
|
|
43951
43978
|
|
|
43952
|
-
/*! @azure/msal-common v15.
|
|
43979
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43953
43980
|
|
|
43954
43981
|
/*
|
|
43955
43982
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44030,7 +44057,7 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
44030
44057
|
}
|
|
44031
44058
|
}
|
|
44032
44059
|
|
|
44033
|
-
/*! @azure/msal-common v15.
|
|
44060
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44034
44061
|
|
|
44035
44062
|
/*
|
|
44036
44063
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44146,7 +44173,7 @@ function normalizeUrlForComparison(url) {
|
|
|
44146
44173
|
}
|
|
44147
44174
|
}
|
|
44148
44175
|
|
|
44149
|
-
/*! @azure/msal-common v15.
|
|
44176
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44150
44177
|
|
|
44151
44178
|
/*
|
|
44152
44179
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44310,7 +44337,7 @@ class UrlString {
|
|
|
44310
44337
|
}
|
|
44311
44338
|
}
|
|
44312
44339
|
|
|
44313
|
-
/*! @azure/msal-common v15.
|
|
44340
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44314
44341
|
|
|
44315
44342
|
/*
|
|
44316
44343
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44449,7 +44476,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
44449
44476
|
return null;
|
|
44450
44477
|
}
|
|
44451
44478
|
|
|
44452
|
-
/*! @azure/msal-common v15.
|
|
44479
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44453
44480
|
/*
|
|
44454
44481
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
44455
44482
|
* Licensed under the MIT License.
|
|
@@ -44457,7 +44484,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
44457
44484
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
44458
44485
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
44459
44486
|
|
|
44460
|
-
/*! @azure/msal-common v15.
|
|
44487
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44461
44488
|
|
|
44462
44489
|
/*
|
|
44463
44490
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44502,7 +44529,7 @@ function createCacheError(e) {
|
|
|
44502
44529
|
}
|
|
44503
44530
|
}
|
|
44504
44531
|
|
|
44505
|
-
/*! @azure/msal-common v15.
|
|
44532
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44506
44533
|
|
|
44507
44534
|
/*
|
|
44508
44535
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44672,15 +44699,16 @@ class CacheManager {
|
|
|
44672
44699
|
* @param cacheRecord {CacheRecord}
|
|
44673
44700
|
* @param correlationId {?string} correlation id
|
|
44674
44701
|
* @param kmsi - Keep Me Signed In
|
|
44702
|
+
* @param apiId - API identifier for telemetry tracking
|
|
44675
44703
|
* @param storeInCache {?StoreInCache}
|
|
44676
44704
|
*/
|
|
44677
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
44705
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
44678
44706
|
if (!cacheRecord) {
|
|
44679
44707
|
throw createClientAuthError(invalidCacheRecord);
|
|
44680
44708
|
}
|
|
44681
44709
|
try {
|
|
44682
44710
|
if (!!cacheRecord.account) {
|
|
44683
|
-
await this.setAccount(cacheRecord.account, correlationId, kmsi);
|
|
44711
|
+
await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
|
|
44684
44712
|
}
|
|
44685
44713
|
if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
|
|
44686
44714
|
await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
|
|
@@ -45611,7 +45639,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
45611
45639
|
}
|
|
45612
45640
|
}
|
|
45613
45641
|
|
|
45614
|
-
/*! @azure/msal-common v15.
|
|
45642
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
45615
45643
|
/*
|
|
45616
45644
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
45617
45645
|
* Licensed under the MIT License.
|
|
@@ -45868,6 +45896,11 @@ const PerformanceEvents = {
|
|
|
45868
45896
|
Decrypt: "decrypt",
|
|
45869
45897
|
GenerateEarKey: "generateEarKey",
|
|
45870
45898
|
DecryptEarResponse: "decryptEarResponse",
|
|
45899
|
+
LoadExternalTokens: "LoadExternalTokens",
|
|
45900
|
+
LoadAccount: "loadAccount",
|
|
45901
|
+
LoadIdToken: "loadIdToken",
|
|
45902
|
+
LoadAccessToken: "loadAccessToken",
|
|
45903
|
+
LoadRefreshToken: "loadRefreshToken",
|
|
45871
45904
|
};
|
|
45872
45905
|
/**
|
|
45873
45906
|
* State of the performance event.
|
|
@@ -45878,7 +45911,7 @@ const PerformanceEvents = {
|
|
|
45878
45911
|
const PerformanceEventStatus = {
|
|
45879
45912
|
InProgress: 1};
|
|
45880
45913
|
|
|
45881
|
-
/*! @azure/msal-common v15.
|
|
45914
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
45882
45915
|
|
|
45883
45916
|
/*
|
|
45884
45917
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -45957,7 +45990,7 @@ class StubPerformanceClient {
|
|
|
45957
45990
|
}
|
|
45958
45991
|
}
|
|
45959
45992
|
|
|
45960
|
-
/*! @azure/msal-common v15.
|
|
45993
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
45961
45994
|
|
|
45962
45995
|
/*
|
|
45963
45996
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -46057,7 +46090,7 @@ function isOidcProtocolMode(config) {
|
|
|
46057
46090
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
46058
46091
|
}
|
|
46059
46092
|
|
|
46060
|
-
/*! @azure/msal-common v15.
|
|
46093
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46061
46094
|
/*
|
|
46062
46095
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46063
46096
|
* Licensed under the MIT License.
|
|
@@ -46067,7 +46100,7 @@ const CcsCredentialType = {
|
|
|
46067
46100
|
UPN: "UPN",
|
|
46068
46101
|
};
|
|
46069
46102
|
|
|
46070
|
-
/*! @azure/msal-common v15.
|
|
46103
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46071
46104
|
/*
|
|
46072
46105
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46073
46106
|
* Licensed under the MIT License.
|
|
@@ -46117,7 +46150,7 @@ const INSTANCE_AWARE = "instance_aware";
|
|
|
46117
46150
|
const EAR_JWK = "ear_jwk";
|
|
46118
46151
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
46119
46152
|
|
|
46120
|
-
/*! @azure/msal-common v15.
|
|
46153
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46121
46154
|
|
|
46122
46155
|
/*
|
|
46123
46156
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -46497,7 +46530,7 @@ function addPostBodyParameters(parameters, bodyParameters) {
|
|
|
46497
46530
|
});
|
|
46498
46531
|
}
|
|
46499
46532
|
|
|
46500
|
-
/*! @azure/msal-common v15.
|
|
46533
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46501
46534
|
/*
|
|
46502
46535
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46503
46536
|
* Licensed under the MIT License.
|
|
@@ -46509,7 +46542,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
46509
46542
|
response.hasOwnProperty("jwks_uri"));
|
|
46510
46543
|
}
|
|
46511
46544
|
|
|
46512
|
-
/*! @azure/msal-common v15.
|
|
46545
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46513
46546
|
/*
|
|
46514
46547
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46515
46548
|
* Licensed under the MIT License.
|
|
@@ -46519,7 +46552,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
46519
46552
|
response.hasOwnProperty("metadata"));
|
|
46520
46553
|
}
|
|
46521
46554
|
|
|
46522
|
-
/*! @azure/msal-common v15.
|
|
46555
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46523
46556
|
/*
|
|
46524
46557
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46525
46558
|
* Licensed under the MIT License.
|
|
@@ -46529,7 +46562,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
46529
46562
|
response.hasOwnProperty("error_description"));
|
|
46530
46563
|
}
|
|
46531
46564
|
|
|
46532
|
-
/*! @azure/msal-common v15.
|
|
46565
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46533
46566
|
/*
|
|
46534
46567
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46535
46568
|
* Licensed under the MIT License.
|
|
@@ -46625,7 +46658,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
46625
46658
|
};
|
|
46626
46659
|
};
|
|
46627
46660
|
|
|
46628
|
-
/*! @azure/msal-common v15.
|
|
46661
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46629
46662
|
|
|
46630
46663
|
/*
|
|
46631
46664
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -46731,7 +46764,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
46731
46764
|
},
|
|
46732
46765
|
};
|
|
46733
46766
|
|
|
46734
|
-
/*! @azure/msal-common v15.
|
|
46767
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46735
46768
|
/*
|
|
46736
46769
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46737
46770
|
* Licensed under the MIT License.
|
|
@@ -46796,7 +46829,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
46796
46829
|
return cachedAtSec > nowSeconds();
|
|
46797
46830
|
}
|
|
46798
46831
|
|
|
46799
|
-
/*! @azure/msal-common v15.
|
|
46832
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46800
46833
|
|
|
46801
46834
|
/*
|
|
46802
46835
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47058,7 +47091,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
47058
47091
|
return metadata.expiresAt <= nowSeconds();
|
|
47059
47092
|
}
|
|
47060
47093
|
|
|
47061
|
-
/*! @azure/msal-common v15.
|
|
47094
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47062
47095
|
|
|
47063
47096
|
/*
|
|
47064
47097
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47897,7 +47930,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
47897
47930
|
};
|
|
47898
47931
|
}
|
|
47899
47932
|
|
|
47900
|
-
/*! @azure/msal-common v15.
|
|
47933
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47901
47934
|
|
|
47902
47935
|
/*
|
|
47903
47936
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47928,7 +47961,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
47928
47961
|
}
|
|
47929
47962
|
}
|
|
47930
47963
|
|
|
47931
|
-
/*! @azure/msal-common v15.
|
|
47964
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47932
47965
|
|
|
47933
47966
|
/*
|
|
47934
47967
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47947,7 +47980,7 @@ class ServerError extends AuthError {
|
|
|
47947
47980
|
}
|
|
47948
47981
|
}
|
|
47949
47982
|
|
|
47950
|
-
/*! @azure/msal-common v15.
|
|
47983
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47951
47984
|
/*
|
|
47952
47985
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
47953
47986
|
* Licensed under the MIT License.
|
|
@@ -47968,7 +48001,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
47968
48001
|
};
|
|
47969
48002
|
}
|
|
47970
48003
|
|
|
47971
|
-
/*! @azure/msal-common v15.
|
|
48004
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47972
48005
|
|
|
47973
48006
|
/*
|
|
47974
48007
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48055,7 +48088,7 @@ class ThrottlingUtils {
|
|
|
48055
48088
|
}
|
|
48056
48089
|
}
|
|
48057
48090
|
|
|
48058
|
-
/*! @azure/msal-common v15.
|
|
48091
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48059
48092
|
|
|
48060
48093
|
/*
|
|
48061
48094
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48086,7 +48119,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
48086
48119
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
48087
48120
|
}
|
|
48088
48121
|
|
|
48089
|
-
/*! @azure/msal-common v15.
|
|
48122
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48090
48123
|
|
|
48091
48124
|
/*
|
|
48092
48125
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48234,7 +48267,7 @@ class BaseClient {
|
|
|
48234
48267
|
}
|
|
48235
48268
|
}
|
|
48236
48269
|
|
|
48237
|
-
/*! @azure/msal-common v15.
|
|
48270
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48238
48271
|
/*
|
|
48239
48272
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
48240
48273
|
* Licensed under the MIT License.
|
|
@@ -48250,7 +48283,7 @@ const consentRequired = "consent_required";
|
|
|
48250
48283
|
const loginRequired = "login_required";
|
|
48251
48284
|
const badToken = "bad_token";
|
|
48252
48285
|
|
|
48253
|
-
/*! @azure/msal-common v15.
|
|
48286
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48254
48287
|
|
|
48255
48288
|
/*
|
|
48256
48289
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48322,7 +48355,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
48322
48355
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
48323
48356
|
}
|
|
48324
48357
|
|
|
48325
|
-
/*! @azure/msal-common v15.
|
|
48358
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48326
48359
|
|
|
48327
48360
|
/*
|
|
48328
48361
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48394,7 +48427,7 @@ class ProtocolUtils {
|
|
|
48394
48427
|
}
|
|
48395
48428
|
}
|
|
48396
48429
|
|
|
48397
|
-
/*! @azure/msal-common v15.
|
|
48430
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48398
48431
|
|
|
48399
48432
|
/*
|
|
48400
48433
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48476,7 +48509,7 @@ class PopTokenGenerator {
|
|
|
48476
48509
|
}
|
|
48477
48510
|
}
|
|
48478
48511
|
|
|
48479
|
-
/*! @azure/msal-common v15.
|
|
48512
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48480
48513
|
/*
|
|
48481
48514
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
48482
48515
|
* Licensed under the MIT License.
|
|
@@ -48503,7 +48536,7 @@ class PopTokenGenerator {
|
|
|
48503
48536
|
}
|
|
48504
48537
|
}
|
|
48505
48538
|
|
|
48506
|
-
/*! @azure/msal-common v15.
|
|
48539
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48507
48540
|
|
|
48508
48541
|
/*
|
|
48509
48542
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48567,7 +48600,7 @@ class ResponseHandler {
|
|
|
48567
48600
|
* @param serverTokenResponse
|
|
48568
48601
|
* @param authority
|
|
48569
48602
|
*/
|
|
48570
|
-
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
48603
|
+
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
48571
48604
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
|
|
48572
48605
|
// create an idToken object (not entity)
|
|
48573
48606
|
let idTokenClaims;
|
|
@@ -48615,14 +48648,19 @@ class ResponseHandler {
|
|
|
48615
48648
|
if (handlingRefreshTokenResponse &&
|
|
48616
48649
|
!forceCacheRefreshTokenResponse &&
|
|
48617
48650
|
cacheRecord.account) {
|
|
48618
|
-
const
|
|
48619
|
-
|
|
48620
|
-
|
|
48651
|
+
const cachedAccounts = this.cacheStorage.getAllAccounts({
|
|
48652
|
+
homeAccountId: cacheRecord.account.homeAccountId,
|
|
48653
|
+
environment: cacheRecord.account.environment,
|
|
48654
|
+
}, request.correlationId);
|
|
48655
|
+
if (cachedAccounts.length < 1) {
|
|
48621
48656
|
this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache");
|
|
48657
|
+
this.performanceClient?.addFields({
|
|
48658
|
+
acntLoggedOut: true,
|
|
48659
|
+
}, request.correlationId);
|
|
48622
48660
|
return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId);
|
|
48623
48661
|
}
|
|
48624
48662
|
}
|
|
48625
|
-
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
|
|
48663
|
+
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
|
|
48626
48664
|
}
|
|
48627
48665
|
finally {
|
|
48628
48666
|
if (this.persistencePlugin &&
|
|
@@ -48692,6 +48730,9 @@ class ResponseHandler {
|
|
|
48692
48730
|
? parseInt(serverTokenResponse.refresh_token_expires_in, 10)
|
|
48693
48731
|
: serverTokenResponse.refresh_token_expires_in;
|
|
48694
48732
|
rtExpiresOn = reqTimestamp + rtExpiresIn;
|
|
48733
|
+
this.performanceClient?.addFields({
|
|
48734
|
+
ntwkRtExpiresOnSeconds: rtExpiresOn,
|
|
48735
|
+
}, request.correlationId);
|
|
48695
48736
|
}
|
|
48696
48737
|
cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn);
|
|
48697
48738
|
}
|
|
@@ -48834,7 +48875,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
48834
48875
|
return baseAccount;
|
|
48835
48876
|
}
|
|
48836
48877
|
|
|
48837
|
-
/*! @azure/msal-common v15.
|
|
48878
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48838
48879
|
/*
|
|
48839
48880
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
48840
48881
|
* Licensed under the MIT License.
|
|
@@ -48852,7 +48893,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
48852
48893
|
}
|
|
48853
48894
|
}
|
|
48854
48895
|
|
|
48855
|
-
/*! @azure/msal-common v15.
|
|
48896
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48856
48897
|
|
|
48857
48898
|
/*
|
|
48858
48899
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48874,8 +48915,9 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
48874
48915
|
* API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the
|
|
48875
48916
|
* authorization_code_grant
|
|
48876
48917
|
* @param request
|
|
48918
|
+
* @param apiId - API identifier for telemetry tracking
|
|
48877
48919
|
*/
|
|
48878
|
-
async acquireToken(request, authCodePayload) {
|
|
48920
|
+
async acquireToken(request, apiId, authCodePayload) {
|
|
48879
48921
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
|
|
48880
48922
|
if (!request.code) {
|
|
48881
48923
|
throw createClientAuthError(requestCannotBeMade);
|
|
@@ -48887,7 +48929,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
48887
48929
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient);
|
|
48888
48930
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
48889
48931
|
responseHandler.validateTokenResponse(response.body);
|
|
48890
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId);
|
|
48932
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
|
|
48891
48933
|
}
|
|
48892
48934
|
/**
|
|
48893
48935
|
* Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
|
|
@@ -49087,7 +49129,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
49087
49129
|
}
|
|
49088
49130
|
}
|
|
49089
49131
|
|
|
49090
|
-
/*! @azure/msal-common v15.
|
|
49132
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49091
49133
|
|
|
49092
49134
|
/*
|
|
49093
49135
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49102,7 +49144,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49102
49144
|
constructor(configuration, performanceClient) {
|
|
49103
49145
|
super(configuration, performanceClient);
|
|
49104
49146
|
}
|
|
49105
|
-
async acquireToken(request) {
|
|
49147
|
+
async acquireToken(request, apiId) {
|
|
49106
49148
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
49107
49149
|
const reqTimestamp = nowSeconds();
|
|
49108
49150
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
@@ -49110,13 +49152,13 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49110
49152
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
49111
49153
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
49112
49154
|
responseHandler.validateTokenResponse(response.body);
|
|
49113
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);
|
|
49155
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
|
|
49114
49156
|
}
|
|
49115
49157
|
/**
|
|
49116
49158
|
* Gets cached refresh token and attaches to request, then calls acquireToken API
|
|
49117
49159
|
* @param request
|
|
49118
49160
|
*/
|
|
49119
|
-
async acquireTokenByRefreshToken(request) {
|
|
49161
|
+
async acquireTokenByRefreshToken(request, apiId) {
|
|
49120
49162
|
// Cannot renew token if no request object is given.
|
|
49121
49163
|
if (!request) {
|
|
49122
49164
|
throw createClientConfigurationError(tokenRequestEmpty);
|
|
@@ -49131,7 +49173,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49131
49173
|
// if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
|
|
49132
49174
|
if (isFOCI) {
|
|
49133
49175
|
try {
|
|
49134
|
-
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
|
|
49176
|
+
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
|
|
49135
49177
|
}
|
|
49136
49178
|
catch (e) {
|
|
49137
49179
|
const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
|
|
@@ -49142,7 +49184,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49142
49184
|
e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
49143
49185
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
49144
49186
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
49145
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
49187
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
49146
49188
|
// throw in all other cases
|
|
49147
49189
|
}
|
|
49148
49190
|
else {
|
|
@@ -49151,26 +49193,30 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49151
49193
|
}
|
|
49152
49194
|
}
|
|
49153
49195
|
// fall back to application refresh token acquisition
|
|
49154
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
49196
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
49155
49197
|
}
|
|
49156
49198
|
/**
|
|
49157
49199
|
* makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
|
|
49158
49200
|
* @param request
|
|
49159
49201
|
*/
|
|
49160
|
-
async acquireTokenWithCachedRefreshToken(request, foci) {
|
|
49202
|
+
async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
|
|
49161
49203
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
49162
49204
|
// fetches family RT or application RT based on FOCI value
|
|
49163
49205
|
const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient);
|
|
49164
49206
|
if (!refreshToken) {
|
|
49165
49207
|
throw createInteractionRequiredAuthError(noTokensFound);
|
|
49166
49208
|
}
|
|
49167
|
-
if (refreshToken.expiresOn
|
|
49168
|
-
|
|
49169
|
-
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS
|
|
49170
|
-
this.performanceClient?.addFields({
|
|
49171
|
-
|
|
49209
|
+
if (refreshToken.expiresOn) {
|
|
49210
|
+
const offset = request.refreshTokenExpirationOffsetSeconds ||
|
|
49211
|
+
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS;
|
|
49212
|
+
this.performanceClient?.addFields({
|
|
49213
|
+
cacheRtExpiresOnSeconds: Number(refreshToken.expiresOn),
|
|
49214
|
+
rtOffsetSeconds: offset,
|
|
49215
|
+
}, request.correlationId);
|
|
49216
|
+
if (isTokenExpired(refreshToken.expiresOn, offset)) {
|
|
49217
|
+
throw createInteractionRequiredAuthError(refreshTokenExpired);
|
|
49218
|
+
}
|
|
49172
49219
|
}
|
|
49173
|
-
// attach cached RT size to the current measurement
|
|
49174
49220
|
const refreshTokenRequest = {
|
|
49175
49221
|
...request,
|
|
49176
49222
|
refreshToken: refreshToken.secret,
|
|
@@ -49181,11 +49227,10 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49181
49227
|
},
|
|
49182
49228
|
};
|
|
49183
49229
|
try {
|
|
49184
|
-
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
|
|
49230
|
+
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
|
|
49185
49231
|
}
|
|
49186
49232
|
catch (e) {
|
|
49187
49233
|
if (e instanceof InteractionRequiredAuthError) {
|
|
49188
|
-
this.performanceClient?.addFields({ rtExpiresOnMs: Number(refreshToken.expiresOn) }, request.correlationId);
|
|
49189
49234
|
if (e.subError === badToken) {
|
|
49190
49235
|
// Remove bad refresh token from cache
|
|
49191
49236
|
this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
@@ -49296,7 +49341,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49296
49341
|
}
|
|
49297
49342
|
}
|
|
49298
49343
|
|
|
49299
|
-
/*! @azure/msal-common v15.
|
|
49344
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49300
49345
|
|
|
49301
49346
|
/*
|
|
49302
49347
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49394,7 +49439,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
49394
49439
|
}
|
|
49395
49440
|
}
|
|
49396
49441
|
|
|
49397
|
-
/*! @azure/msal-common v15.
|
|
49442
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49398
49443
|
|
|
49399
49444
|
/*
|
|
49400
49445
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49409,7 +49454,7 @@ const StubbedNetworkModule = {
|
|
|
49409
49454
|
},
|
|
49410
49455
|
};
|
|
49411
49456
|
|
|
49412
|
-
/*! @azure/msal-common v15.
|
|
49457
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49413
49458
|
|
|
49414
49459
|
/*
|
|
49415
49460
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49633,7 +49678,7 @@ function extractLoginHint(account) {
|
|
|
49633
49678
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
49634
49679
|
}
|
|
49635
49680
|
|
|
49636
|
-
/*! @azure/msal-common v15.
|
|
49681
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49637
49682
|
|
|
49638
49683
|
/*
|
|
49639
49684
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49896,7 +49941,7 @@ class ServerTelemetryManager {
|
|
|
49896
49941
|
}
|
|
49897
49942
|
}
|
|
49898
49943
|
|
|
49899
|
-
/*! @azure/msal-common v15.
|
|
49944
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49900
49945
|
/*
|
|
49901
49946
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
49902
49947
|
* Licensed under the MIT License.
|
|
@@ -49904,7 +49949,7 @@ class ServerTelemetryManager {
|
|
|
49904
49949
|
const missingKidError = "missing_kid_error";
|
|
49905
49950
|
const missingAlgError = "missing_alg_error";
|
|
49906
49951
|
|
|
49907
|
-
/*! @azure/msal-common v15.
|
|
49952
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49908
49953
|
|
|
49909
49954
|
/*
|
|
49910
49955
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49929,7 +49974,7 @@ function createJoseHeaderError(code) {
|
|
|
49929
49974
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
49930
49975
|
}
|
|
49931
49976
|
|
|
49932
|
-
/*! @azure/msal-common v15.
|
|
49977
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49933
49978
|
|
|
49934
49979
|
/*
|
|
49935
49980
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49969,7 +50014,7 @@ class JoseHeader {
|
|
|
49969
50014
|
}
|
|
49970
50015
|
}
|
|
49971
50016
|
|
|
49972
|
-
/*! @azure/msal-browser v4.
|
|
50017
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
49973
50018
|
/*
|
|
49974
50019
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
49975
50020
|
* Licensed under the MIT License.
|
|
@@ -50026,7 +50071,7 @@ const failedToParseHeaders = "failed_to_parse_headers";
|
|
|
50026
50071
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
50027
50072
|
const timedOut = "timed_out";
|
|
50028
50073
|
|
|
50029
|
-
/*! @azure/msal-browser v4.
|
|
50074
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50030
50075
|
|
|
50031
50076
|
/*
|
|
50032
50077
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50103,7 +50148,7 @@ function createBrowserAuthError(errorCode, subError) {
|
|
|
50103
50148
|
return new BrowserAuthError(errorCode, subError);
|
|
50104
50149
|
}
|
|
50105
50150
|
|
|
50106
|
-
/*! @azure/msal-browser v4.
|
|
50151
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50107
50152
|
|
|
50108
50153
|
/*
|
|
50109
50154
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50190,9 +50235,9 @@ const InMemoryCacheKeys = {
|
|
|
50190
50235
|
};
|
|
50191
50236
|
/**
|
|
50192
50237
|
* API Codes for Telemetry purposes.
|
|
50193
|
-
* Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
|
|
50194
50238
|
* 0-99 Silent Flow
|
|
50195
50239
|
* 800-899 Auth Code Flow
|
|
50240
|
+
* 900-999 Miscellaneous
|
|
50196
50241
|
*/
|
|
50197
50242
|
const ApiId = {
|
|
50198
50243
|
acquireTokenRedirect: 861,
|
|
@@ -50204,6 +50249,30 @@ const ApiId = {
|
|
|
50204
50249
|
acquireTokenSilent_silentFlow: 61,
|
|
50205
50250
|
logout: 961,
|
|
50206
50251
|
logoutPopup: 962,
|
|
50252
|
+
hydrateCache: 963,
|
|
50253
|
+
loadExternalTokens: 964,
|
|
50254
|
+
};
|
|
50255
|
+
/**
|
|
50256
|
+
* API Names for Telemetry purposes.
|
|
50257
|
+
*/
|
|
50258
|
+
const ApiName = {
|
|
50259
|
+
861: "acquireTokenRedirect",
|
|
50260
|
+
862: "acquireTokenPopup",
|
|
50261
|
+
863: "ssoSilent",
|
|
50262
|
+
864: "acquireTokenSilent_authCode",
|
|
50263
|
+
865: "handleRedirectPromise",
|
|
50264
|
+
866: "acquireTokenByCode",
|
|
50265
|
+
61: "acquireTokenSilent_silentFlow",
|
|
50266
|
+
961: "logout",
|
|
50267
|
+
962: "logoutPopup",
|
|
50268
|
+
963: "hydrateCache",
|
|
50269
|
+
964: "loadExternalTokens",
|
|
50270
|
+
};
|
|
50271
|
+
const apiIdToName = (id) => {
|
|
50272
|
+
if (typeof id === "number" && id in ApiName) {
|
|
50273
|
+
return ApiName[id];
|
|
50274
|
+
}
|
|
50275
|
+
return "unknown";
|
|
50207
50276
|
};
|
|
50208
50277
|
/*
|
|
50209
50278
|
* Interaction type of the API - used for state and telemetry
|
|
@@ -50268,7 +50337,7 @@ const iFrameRenewalPolicies = [
|
|
|
50268
50337
|
CacheLookupPolicy.RefreshTokenAndNetwork,
|
|
50269
50338
|
];
|
|
50270
50339
|
|
|
50271
|
-
/*! @azure/msal-browser v4.
|
|
50340
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50272
50341
|
/*
|
|
50273
50342
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
50274
50343
|
* Licensed under the MIT License.
|
|
@@ -50313,7 +50382,7 @@ function base64EncArr(aBytes) {
|
|
|
50313
50382
|
return btoa(binString);
|
|
50314
50383
|
}
|
|
50315
50384
|
|
|
50316
|
-
/*! @azure/msal-browser v4.
|
|
50385
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50317
50386
|
|
|
50318
50387
|
/*
|
|
50319
50388
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50352,7 +50421,7 @@ function base64DecToArr(base64String) {
|
|
|
50352
50421
|
return Uint8Array.from(binString, (m) => m.codePointAt(0) || 0);
|
|
50353
50422
|
}
|
|
50354
50423
|
|
|
50355
|
-
/*! @azure/msal-browser v4.
|
|
50424
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50356
50425
|
|
|
50357
50426
|
/*
|
|
50358
50427
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50651,7 +50720,7 @@ async function hashString(plainText) {
|
|
|
50651
50720
|
return urlEncodeArr(hashBytes);
|
|
50652
50721
|
}
|
|
50653
50722
|
|
|
50654
|
-
/*! @azure/msal-browser v4.
|
|
50723
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50655
50724
|
/*
|
|
50656
50725
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
50657
50726
|
* Licensed under the MIT License.
|
|
@@ -50660,7 +50729,7 @@ const storageNotSupported = "storage_not_supported";
|
|
|
50660
50729
|
const stubbedPublicClientApplicationCalled = "stubbed_public_client_application_called";
|
|
50661
50730
|
const inMemRedirectUnavailable = "in_mem_redirect_unavailable";
|
|
50662
50731
|
|
|
50663
|
-
/*! @azure/msal-browser v4.
|
|
50732
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50664
50733
|
|
|
50665
50734
|
/*
|
|
50666
50735
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50700,7 +50769,7 @@ function createBrowserConfigurationAuthError(errorCode) {
|
|
|
50700
50769
|
return new BrowserConfigurationAuthError(errorCode, BrowserConfigurationAuthErrorMessages[errorCode]);
|
|
50701
50770
|
}
|
|
50702
50771
|
|
|
50703
|
-
/*! @azure/msal-browser v4.
|
|
50772
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50704
50773
|
|
|
50705
50774
|
/*
|
|
50706
50775
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50862,7 +50931,7 @@ function createGuid() {
|
|
|
50862
50931
|
return createNewGuid();
|
|
50863
50932
|
}
|
|
50864
50933
|
|
|
50865
|
-
/*! @azure/msal-browser v4.
|
|
50934
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50866
50935
|
|
|
50867
50936
|
/*
|
|
50868
50937
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50905,7 +50974,7 @@ class NavigationClient {
|
|
|
50905
50974
|
}
|
|
50906
50975
|
}
|
|
50907
50976
|
|
|
50908
|
-
/*! @azure/msal-browser v4.
|
|
50977
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50909
50978
|
|
|
50910
50979
|
/*
|
|
50911
50980
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51026,7 +51095,7 @@ function getHeaderDict(headers) {
|
|
|
51026
51095
|
}
|
|
51027
51096
|
}
|
|
51028
51097
|
|
|
51029
|
-
/*! @azure/msal-browser v4.
|
|
51098
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51030
51099
|
|
|
51031
51100
|
/*
|
|
51032
51101
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51161,12 +51230,12 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
51161
51230
|
return overlayedConfig;
|
|
51162
51231
|
}
|
|
51163
51232
|
|
|
51164
|
-
/*! @azure/msal-browser v4.
|
|
51233
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51165
51234
|
/* eslint-disable header/header */
|
|
51166
51235
|
const name$1 = "@azure/msal-browser";
|
|
51167
|
-
const version = "4.
|
|
51236
|
+
const version = "4.28.1";
|
|
51168
51237
|
|
|
51169
|
-
/*! @azure/msal-browser v4.
|
|
51238
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51170
51239
|
/*
|
|
51171
51240
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
51172
51241
|
* Licensed under the MIT License.
|
|
@@ -51194,7 +51263,7 @@ function getTokenKeysCacheKey(clientId, schema = CREDENTIAL_SCHEMA_VERSION) {
|
|
|
51194
51263
|
return `${PREFIX}.${schema}.${TOKEN_KEYS}.${clientId}`;
|
|
51195
51264
|
}
|
|
51196
51265
|
|
|
51197
|
-
/*! @azure/msal-browser v4.
|
|
51266
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51198
51267
|
|
|
51199
51268
|
/*
|
|
51200
51269
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51291,7 +51360,7 @@ class BaseOperatingContext {
|
|
|
51291
51360
|
}
|
|
51292
51361
|
}
|
|
51293
51362
|
|
|
51294
|
-
/*! @azure/msal-browser v4.
|
|
51363
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51295
51364
|
|
|
51296
51365
|
/*
|
|
51297
51366
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51337,7 +51406,7 @@ StandardOperatingContext.MODULE_NAME = "";
|
|
|
51337
51406
|
*/
|
|
51338
51407
|
StandardOperatingContext.ID = "StandardOperatingContext";
|
|
51339
51408
|
|
|
51340
|
-
/*! @azure/msal-browser v4.
|
|
51409
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51341
51410
|
|
|
51342
51411
|
/*
|
|
51343
51412
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51540,7 +51609,7 @@ class DatabaseStorage {
|
|
|
51540
51609
|
}
|
|
51541
51610
|
}
|
|
51542
51611
|
|
|
51543
|
-
/*! @azure/msal-browser v4.
|
|
51612
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51544
51613
|
/*
|
|
51545
51614
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
51546
51615
|
* Licensed under the MIT License.
|
|
@@ -51586,7 +51655,7 @@ class MemoryStorage {
|
|
|
51586
51655
|
}
|
|
51587
51656
|
}
|
|
51588
51657
|
|
|
51589
|
-
/*! @azure/msal-browser v4.
|
|
51658
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51590
51659
|
|
|
51591
51660
|
/*
|
|
51592
51661
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51720,7 +51789,7 @@ class AsyncMemoryStorage {
|
|
|
51720
51789
|
}
|
|
51721
51790
|
}
|
|
51722
51791
|
|
|
51723
|
-
/*! @azure/msal-browser v4.
|
|
51792
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51724
51793
|
|
|
51725
51794
|
/*
|
|
51726
51795
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51901,7 +51970,7 @@ function getSortedObjectString(obj) {
|
|
|
51901
51970
|
return JSON.stringify(obj, Object.keys(obj).sort());
|
|
51902
51971
|
}
|
|
51903
51972
|
|
|
51904
|
-
/*! @azure/msal-browser v4.
|
|
51973
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51905
51974
|
|
|
51906
51975
|
/*
|
|
51907
51976
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51979,7 +52048,7 @@ function getCookieExpirationTime(cookieLifeDays) {
|
|
|
51979
52048
|
return expr.toUTCString();
|
|
51980
52049
|
}
|
|
51981
52050
|
|
|
51982
|
-
/*! @azure/msal-browser v4.
|
|
52051
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51983
52052
|
|
|
51984
52053
|
/*
|
|
51985
52054
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52021,7 +52090,7 @@ function getTokenKeys(clientId, storage, schemaVersion) {
|
|
|
52021
52090
|
};
|
|
52022
52091
|
}
|
|
52023
52092
|
|
|
52024
|
-
/*! @azure/msal-browser v4.
|
|
52093
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52025
52094
|
/*
|
|
52026
52095
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
52027
52096
|
* Licensed under the MIT License.
|
|
@@ -52032,7 +52101,7 @@ function isEncrypted(data) {
|
|
|
52032
52101
|
data.hasOwnProperty("data"));
|
|
52033
52102
|
}
|
|
52034
52103
|
|
|
52035
|
-
/*! @azure/msal-browser v4.
|
|
52104
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52036
52105
|
|
|
52037
52106
|
/*
|
|
52038
52107
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52322,7 +52391,7 @@ class LocalStorage {
|
|
|
52322
52391
|
}
|
|
52323
52392
|
}
|
|
52324
52393
|
|
|
52325
|
-
/*! @azure/msal-browser v4.
|
|
52394
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52326
52395
|
|
|
52327
52396
|
/*
|
|
52328
52397
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52364,7 +52433,7 @@ class SessionStorage {
|
|
|
52364
52433
|
}
|
|
52365
52434
|
}
|
|
52366
52435
|
|
|
52367
|
-
/*! @azure/msal-browser v4.
|
|
52436
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52368
52437
|
/*
|
|
52369
52438
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
52370
52439
|
* Licensed under the MIT License.
|
|
@@ -52399,7 +52468,7 @@ const EventType = {
|
|
|
52399
52468
|
BROKER_CONNECTION_ESTABLISHED: "msal:brokerConnectionEstablished",
|
|
52400
52469
|
};
|
|
52401
52470
|
|
|
52402
|
-
/*! @azure/msal-browser v4.
|
|
52471
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52403
52472
|
/*
|
|
52404
52473
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
52405
52474
|
* Licensed under the MIT License.
|
|
@@ -52416,7 +52485,7 @@ function removeElementFromArray(array, element) {
|
|
|
52416
52485
|
}
|
|
52417
52486
|
}
|
|
52418
52487
|
|
|
52419
|
-
/*! @azure/msal-browser v4.
|
|
52488
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52420
52489
|
|
|
52421
52490
|
/*
|
|
52422
52491
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52973,17 +53042,21 @@ class BrowserCacheManager extends CacheManager {
|
|
|
52973
53042
|
if (!parsedAccount || !AccountEntity.isAccountEntity(parsedAccount)) {
|
|
52974
53043
|
return null;
|
|
52975
53044
|
}
|
|
53045
|
+
this.performanceClient.addFields({
|
|
53046
|
+
accountCachedBy: apiIdToName(parsedAccount.cachedByApiId),
|
|
53047
|
+
}, correlationId);
|
|
52976
53048
|
return CacheManager.toObject(new AccountEntity(), parsedAccount);
|
|
52977
53049
|
}
|
|
52978
53050
|
/**
|
|
52979
53051
|
* set account entity in the platform cache
|
|
52980
53052
|
* @param account
|
|
52981
53053
|
*/
|
|
52982
|
-
async setAccount(account, correlationId, kmsi) {
|
|
53054
|
+
async setAccount(account, correlationId, kmsi, apiId) {
|
|
52983
53055
|
this.logger.trace("BrowserCacheManager.setAccount called");
|
|
52984
53056
|
const key = this.generateAccountKey(AccountEntity.getAccountInfo(account));
|
|
52985
53057
|
const timestamp = Date.now().toString();
|
|
52986
53058
|
account.lastUpdatedAt = timestamp;
|
|
53059
|
+
account.cachedByApiId = apiId;
|
|
52987
53060
|
await this.setUserData(key, JSON.stringify(account), correlationId, timestamp, kmsi);
|
|
52988
53061
|
const wasAdded = this.addAccountKeyToMap(key, correlationId);
|
|
52989
53062
|
this.performanceClient.addFields({ kmsi: kmsi }, correlationId);
|
|
@@ -53738,7 +53811,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53738
53811
|
* @param request
|
|
53739
53812
|
*/
|
|
53740
53813
|
async hydrateCache(result, request) {
|
|
53741
|
-
const idTokenEntity = createIdTokenEntity(result.account
|
|
53814
|
+
const idTokenEntity = createIdTokenEntity(result.account.homeAccountId, result.account.environment, result.idToken, this.clientId, result.tenantId);
|
|
53742
53815
|
let claimsHash;
|
|
53743
53816
|
if (request.claims) {
|
|
53744
53817
|
claimsHash = await this.cryptoImpl.hashString(request.claims);
|
|
@@ -53750,7 +53823,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53750
53823
|
*
|
|
53751
53824
|
* The next MSAL VFuture should map these both to same value if possible
|
|
53752
53825
|
*/
|
|
53753
|
-
const accessTokenEntity = createAccessTokenEntity(result.account
|
|
53826
|
+
const accessTokenEntity = createAccessTokenEntity(result.account.homeAccountId, result.account.environment, result.accessToken, this.clientId, result.tenantId, result.scopes.join(" "),
|
|
53754
53827
|
// Access token expiresOn stored in seconds, converting from AuthenticationResult expiresOn stored as Date
|
|
53755
53828
|
result.expiresOn
|
|
53756
53829
|
? toSecondsFromDate(result.expiresOn)
|
|
@@ -53763,7 +53836,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53763
53836
|
idToken: idTokenEntity,
|
|
53764
53837
|
accessToken: accessTokenEntity,
|
|
53765
53838
|
};
|
|
53766
|
-
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)));
|
|
53839
|
+
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)), ApiId.hydrateCache);
|
|
53767
53840
|
}
|
|
53768
53841
|
/**
|
|
53769
53842
|
* saves a cache record
|
|
@@ -53771,9 +53844,9 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53771
53844
|
* @param storeInCache {?StoreInCache}
|
|
53772
53845
|
* @param correlationId {?string} correlation id
|
|
53773
53846
|
*/
|
|
53774
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
53847
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
53775
53848
|
try {
|
|
53776
|
-
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache);
|
|
53849
|
+
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache);
|
|
53777
53850
|
}
|
|
53778
53851
|
catch (e) {
|
|
53779
53852
|
if (e instanceof CacheError &&
|
|
@@ -53827,7 +53900,7 @@ const DEFAULT_BROWSER_CACHE_MANAGER = (clientId, logger, performanceClient, even
|
|
|
53827
53900
|
return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger, performanceClient, eventHandler);
|
|
53828
53901
|
};
|
|
53829
53902
|
|
|
53830
|
-
/*! @azure/msal-browser v4.
|
|
53903
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
53831
53904
|
/*
|
|
53832
53905
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
53833
53906
|
* Licensed under the MIT License.
|
|
@@ -53952,7 +54025,7 @@ function getActiveAccount(browserStorage, correlationId) {
|
|
|
53952
54025
|
return browserStorage.getActiveAccount(correlationId);
|
|
53953
54026
|
}
|
|
53954
54027
|
|
|
53955
|
-
/*! @azure/msal-browser v4.
|
|
54028
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
53956
54029
|
|
|
53957
54030
|
/*
|
|
53958
54031
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54058,7 +54131,7 @@ class EventHandler {
|
|
|
54058
54131
|
}
|
|
54059
54132
|
}
|
|
54060
54133
|
|
|
54061
|
-
/*! @azure/msal-browser v4.
|
|
54134
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54062
54135
|
|
|
54063
54136
|
/*
|
|
54064
54137
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54174,7 +54247,7 @@ class BaseInteractionClient {
|
|
|
54174
54247
|
}
|
|
54175
54248
|
}
|
|
54176
54249
|
|
|
54177
|
-
/*! @azure/msal-browser v4.
|
|
54250
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54178
54251
|
|
|
54179
54252
|
/*
|
|
54180
54253
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54259,7 +54332,7 @@ function validateRequestMethod(interactionRequest, protocolMode) {
|
|
|
54259
54332
|
return httpMethod;
|
|
54260
54333
|
}
|
|
54261
54334
|
|
|
54262
|
-
/*! @azure/msal-browser v4.
|
|
54335
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54263
54336
|
|
|
54264
54337
|
/*
|
|
54265
54338
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54463,7 +54536,7 @@ class StandardInteractionClient extends BaseInteractionClient {
|
|
|
54463
54536
|
}
|
|
54464
54537
|
}
|
|
54465
54538
|
|
|
54466
|
-
/*! @azure/msal-browser v4.
|
|
54539
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54467
54540
|
|
|
54468
54541
|
/*
|
|
54469
54542
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54487,7 +54560,7 @@ function extractBrowserRequestState(browserCrypto, state) {
|
|
|
54487
54560
|
}
|
|
54488
54561
|
}
|
|
54489
54562
|
|
|
54490
|
-
/*! @azure/msal-browser v4.
|
|
54563
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54491
54564
|
|
|
54492
54565
|
/*
|
|
54493
54566
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54526,7 +54599,7 @@ function validateInteractionType(response, browserCrypto, interactionType) {
|
|
|
54526
54599
|
}
|
|
54527
54600
|
}
|
|
54528
54601
|
|
|
54529
|
-
/*! @azure/msal-browser v4.
|
|
54602
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54530
54603
|
|
|
54531
54604
|
/*
|
|
54532
54605
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54547,7 +54620,7 @@ class InteractionHandler {
|
|
|
54547
54620
|
* Function to handle response parameters from hash.
|
|
54548
54621
|
* @param locationHash
|
|
54549
54622
|
*/
|
|
54550
|
-
async handleCodeResponse(response, request) {
|
|
54623
|
+
async handleCodeResponse(response, request, apiId) {
|
|
54551
54624
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponse, request.correlationId);
|
|
54552
54625
|
let authCodeResponse;
|
|
54553
54626
|
try {
|
|
@@ -54563,7 +54636,7 @@ class InteractionHandler {
|
|
|
54563
54636
|
throw e;
|
|
54564
54637
|
}
|
|
54565
54638
|
}
|
|
54566
|
-
return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request);
|
|
54639
|
+
return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request, apiId);
|
|
54567
54640
|
}
|
|
54568
54641
|
/**
|
|
54569
54642
|
* Process auth code response from AAD
|
|
@@ -54573,7 +54646,7 @@ class InteractionHandler {
|
|
|
54573
54646
|
* @param networkModule
|
|
54574
54647
|
* @returns
|
|
54575
54648
|
*/
|
|
54576
|
-
async handleCodeResponseFromServer(authCodeResponse, request, validateNonce = true) {
|
|
54649
|
+
async handleCodeResponseFromServer(authCodeResponse, request, apiId, validateNonce = true) {
|
|
54577
54650
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponseFromServer, request.correlationId);
|
|
54578
54651
|
this.logger.trace("InteractionHandler.handleCodeResponseFromServer called");
|
|
54579
54652
|
// Assign code to request
|
|
@@ -54599,7 +54672,7 @@ class InteractionHandler {
|
|
|
54599
54672
|
}
|
|
54600
54673
|
}
|
|
54601
54674
|
// Acquire token with retrieved code.
|
|
54602
|
-
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, authCodeResponse));
|
|
54675
|
+
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, apiId, authCodeResponse));
|
|
54603
54676
|
return tokenResponse;
|
|
54604
54677
|
}
|
|
54605
54678
|
/**
|
|
@@ -54622,7 +54695,7 @@ class InteractionHandler {
|
|
|
54622
54695
|
}
|
|
54623
54696
|
}
|
|
54624
54697
|
|
|
54625
|
-
/*! @azure/msal-browser v4.
|
|
54698
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54626
54699
|
/*
|
|
54627
54700
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
54628
54701
|
* Licensed under the MIT License.
|
|
@@ -54631,7 +54704,7 @@ const contentError = "ContentError";
|
|
|
54631
54704
|
const pageException = "PageException";
|
|
54632
54705
|
const userSwitch = "user_switch";
|
|
54633
54706
|
|
|
54634
|
-
/*! @azure/msal-browser v4.
|
|
54707
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54635
54708
|
/*
|
|
54636
54709
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
54637
54710
|
* Licensed under the MIT License.
|
|
@@ -54644,7 +54717,7 @@ const DISABLED = "DISABLED";
|
|
|
54644
54717
|
const ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE";
|
|
54645
54718
|
const UX_NOT_ALLOWED = "UX_NOT_ALLOWED";
|
|
54646
54719
|
|
|
54647
|
-
/*! @azure/msal-browser v4.
|
|
54720
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54648
54721
|
|
|
54649
54722
|
/*
|
|
54650
54723
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54709,7 +54782,7 @@ function createNativeAuthError(code, description, ext) {
|
|
|
54709
54782
|
return new NativeAuthError(code, NativeAuthErrorMessages[code] || description, ext);
|
|
54710
54783
|
}
|
|
54711
54784
|
|
|
54712
|
-
/*! @azure/msal-browser v4.
|
|
54785
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54713
54786
|
|
|
54714
54787
|
/*
|
|
54715
54788
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54759,7 +54832,7 @@ class SilentCacheClient extends StandardInteractionClient {
|
|
|
54759
54832
|
}
|
|
54760
54833
|
}
|
|
54761
54834
|
|
|
54762
|
-
/*! @azure/msal-browser v4.
|
|
54835
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54763
54836
|
|
|
54764
54837
|
/*
|
|
54765
54838
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55155,7 +55228,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
55155
55228
|
*/
|
|
55156
55229
|
async cacheAccount(accountEntity, correlationId, kmsi) {
|
|
55157
55230
|
// Store the account info and hence `nativeAccountId` in browser cache
|
|
55158
|
-
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi);
|
|
55231
|
+
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi, this.apiId);
|
|
55159
55232
|
// Remove any existing cached tokens for this account in browser storage
|
|
55160
55233
|
this.browserStorage.removeAccountContext(AccountEntity.getAccountInfo(accountEntity), correlationId);
|
|
55161
55234
|
}
|
|
@@ -55184,7 +55257,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
55184
55257
|
idToken: cachedIdToken,
|
|
55185
55258
|
accessToken: cachedAccessToken,
|
|
55186
55259
|
};
|
|
55187
|
-
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), request.storeInCache);
|
|
55260
|
+
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, request.storeInCache);
|
|
55188
55261
|
}
|
|
55189
55262
|
getExpiresInValue(tokenType, expiresIn) {
|
|
55190
55263
|
return tokenType === AuthenticationScheme.POP
|
|
@@ -55386,7 +55459,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
55386
55459
|
}
|
|
55387
55460
|
}
|
|
55388
55461
|
|
|
55389
|
-
/*! @azure/msal-browser v4.
|
|
55462
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55390
55463
|
|
|
55391
55464
|
/*
|
|
55392
55465
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55561,7 +55634,7 @@ async function handleResponseCode(request, response, codeVerifier, apiId, config
|
|
|
55561
55634
|
// Create popup interaction handler.
|
|
55562
55635
|
const interactionHandler = new InteractionHandler(authClient, browserStorage, authCodeRequest, logger, performanceClient);
|
|
55563
55636
|
// Handle response from hash string.
|
|
55564
|
-
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request);
|
|
55637
|
+
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request, apiId);
|
|
55565
55638
|
return result;
|
|
55566
55639
|
}
|
|
55567
55640
|
/**
|
|
@@ -55608,10 +55681,10 @@ async function handleResponseEAR(request, response, apiId, config, authority, br
|
|
|
55608
55681
|
cloud_instance_name: decryptedData.cloud_instance_name,
|
|
55609
55682
|
msgraph_host: decryptedData.msgraph_host,
|
|
55610
55683
|
};
|
|
55611
|
-
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, additionalData, undefined, undefined, undefined, undefined));
|
|
55684
|
+
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, apiId, additionalData, undefined, undefined, undefined, undefined));
|
|
55612
55685
|
}
|
|
55613
55686
|
|
|
55614
|
-
/*! @azure/msal-browser v4.
|
|
55687
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55615
55688
|
|
|
55616
55689
|
/*
|
|
55617
55690
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55668,7 +55741,7 @@ async function generateCodeChallengeFromVerifier(pkceCodeVerifier, performanceCl
|
|
|
55668
55741
|
}
|
|
55669
55742
|
}
|
|
55670
55743
|
|
|
55671
|
-
/*! @azure/msal-browser v4.
|
|
55744
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55672
55745
|
|
|
55673
55746
|
/*
|
|
55674
55747
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55933,7 +56006,7 @@ class PlatformAuthExtensionHandler {
|
|
|
55933
56006
|
}
|
|
55934
56007
|
}
|
|
55935
56008
|
|
|
55936
|
-
/*! @azure/msal-browser v4.
|
|
56009
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55937
56010
|
|
|
55938
56011
|
/*
|
|
55939
56012
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -56070,7 +56143,7 @@ class PlatformAuthDOMHandler {
|
|
|
56070
56143
|
}
|
|
56071
56144
|
}
|
|
56072
56145
|
|
|
56073
|
-
/*! @azure/msal-browser v4.
|
|
56146
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
56074
56147
|
async function getPlatformAuthProvider(logger, performanceClient, correlationId, nativeBrokerHandshakeTimeout, enablePlatformBrokerDOMSupport) {
|
|
56075
56148
|
logger.trace("getPlatformAuthProvider called", correlationId);
|
|
56076
56149
|
logger.trace("Has client allowed platform auth via DOM API: " +
|
|
@@ -56135,7 +56208,7 @@ function isPlatformAuthAllowed(config, logger, platformAuthProvider, authenticat
|
|
|
56135
56208
|
return true;
|
|
56136
56209
|
}
|
|
56137
56210
|
|
|
56138
|
-
/*! @azure/msal-browser v4.
|
|
56211
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
56139
56212
|
|
|
56140
56213
|
/*
|
|
56141
56214
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -56632,7 +56705,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
56632
56705
|
}
|
|
56633
56706
|
}
|
|
56634
56707
|
|
|
56635
|
-
/*! @azure/msal-browser v4.
|
|
56708
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
56636
56709
|
|
|
56637
56710
|
/*
|
|
56638
56711
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57072,7 +57145,7 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
57072
57145
|
}
|
|
57073
57146
|
}
|
|
57074
57147
|
|
|
57075
|
-
/*! @azure/msal-browser v4.
|
|
57148
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57076
57149
|
|
|
57077
57150
|
/*
|
|
57078
57151
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57228,7 +57301,7 @@ function removeHiddenIframe(iframe) {
|
|
|
57228
57301
|
}
|
|
57229
57302
|
}
|
|
57230
57303
|
|
|
57231
|
-
/*! @azure/msal-browser v4.
|
|
57304
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57232
57305
|
|
|
57233
57306
|
/*
|
|
57234
57307
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57389,7 +57462,7 @@ class SilentIframeClient extends StandardInteractionClient {
|
|
|
57389
57462
|
}
|
|
57390
57463
|
}
|
|
57391
57464
|
|
|
57392
|
-
/*! @azure/msal-browser v4.
|
|
57465
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57393
57466
|
|
|
57394
57467
|
/*
|
|
57395
57468
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57419,7 +57492,7 @@ class SilentRefreshClient extends StandardInteractionClient {
|
|
|
57419
57492
|
account: silentRequest.account,
|
|
57420
57493
|
});
|
|
57421
57494
|
// Send request to renew token. Auth module will throw errors if token cannot be renewed.
|
|
57422
|
-
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest).catch((e) => {
|
|
57495
|
+
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch((e) => {
|
|
57423
57496
|
e.setCorrelationId(this.correlationId);
|
|
57424
57497
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
57425
57498
|
throw e;
|
|
@@ -57455,7 +57528,7 @@ class SilentRefreshClient extends StandardInteractionClient {
|
|
|
57455
57528
|
}
|
|
57456
57529
|
}
|
|
57457
57530
|
|
|
57458
|
-
/*! @azure/msal-browser v4.
|
|
57531
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57459
57532
|
|
|
57460
57533
|
/*
|
|
57461
57534
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57465,12 +57538,13 @@ class SilentRefreshClient extends StandardInteractionClient {
|
|
|
57465
57538
|
* Token cache manager
|
|
57466
57539
|
*/
|
|
57467
57540
|
class TokenCache {
|
|
57468
|
-
constructor(configuration, storage, logger, cryptoObj) {
|
|
57541
|
+
constructor(configuration, storage, logger, cryptoObj, performanceClient) {
|
|
57469
57542
|
this.isBrowserEnvironment = typeof window !== "undefined";
|
|
57470
57543
|
this.config = configuration;
|
|
57471
57544
|
this.storage = storage;
|
|
57472
57545
|
this.logger = logger;
|
|
57473
57546
|
this.cryptoObj = cryptoObj;
|
|
57547
|
+
this.performanceClient = performanceClient;
|
|
57474
57548
|
}
|
|
57475
57549
|
// Move getAllAccounts here and cache utility APIs
|
|
57476
57550
|
/**
|
|
@@ -57485,30 +57559,37 @@ class TokenCache {
|
|
|
57485
57559
|
throw createBrowserAuthError(nonBrowserEnvironment);
|
|
57486
57560
|
}
|
|
57487
57561
|
const correlationId = request.correlationId || createNewGuid();
|
|
57488
|
-
const
|
|
57489
|
-
|
|
57490
|
-
|
|
57491
|
-
|
|
57492
|
-
|
|
57493
|
-
|
|
57494
|
-
|
|
57495
|
-
|
|
57496
|
-
|
|
57497
|
-
|
|
57498
|
-
|
|
57499
|
-
|
|
57500
|
-
|
|
57501
|
-
|
|
57502
|
-
|
|
57503
|
-
|
|
57504
|
-
|
|
57505
|
-
|
|
57506
|
-
|
|
57507
|
-
|
|
57508
|
-
|
|
57509
|
-
|
|
57510
|
-
|
|
57511
|
-
|
|
57562
|
+
const rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.LoadExternalTokens, correlationId);
|
|
57563
|
+
try {
|
|
57564
|
+
const idTokenClaims = response.id_token
|
|
57565
|
+
? extractTokenClaims(response.id_token, base64Decode)
|
|
57566
|
+
: undefined;
|
|
57567
|
+
const kmsi = isKmsi(idTokenClaims || {});
|
|
57568
|
+
const authorityOptions = {
|
|
57569
|
+
protocolMode: this.config.auth.protocolMode,
|
|
57570
|
+
knownAuthorities: this.config.auth.knownAuthorities,
|
|
57571
|
+
cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
|
|
57572
|
+
authorityMetadata: this.config.auth.authorityMetadata,
|
|
57573
|
+
skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
|
|
57574
|
+
};
|
|
57575
|
+
const authorityString = request.authority || this.config.auth.authority;
|
|
57576
|
+
const authority = await createDiscoveredInstance(Authority.generateAuthority(authorityString, request.azureCloudOptions), this.config.system.networkClient, this.storage, authorityOptions, this.logger, correlationId, this.performanceClient);
|
|
57577
|
+
const cacheRecordAccount = await invokeAsync(this.loadAccount.bind(this), PerformanceEvents.LoadAccount, this.logger, this.performanceClient, correlationId)(request, options.clientInfo || response.client_info || "", correlationId, authority, idTokenClaims);
|
|
57578
|
+
const idToken = await invokeAsync(this.loadIdToken.bind(this), PerformanceEvents.LoadIdToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, correlationId, kmsi);
|
|
57579
|
+
const accessToken = await invokeAsync(this.loadAccessToken.bind(this), PerformanceEvents.LoadAccessToken, this.logger, this.performanceClient, correlationId)(request, response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, options, correlationId, kmsi);
|
|
57580
|
+
const refreshToken = await invokeAsync(this.loadRefreshToken.bind(this), PerformanceEvents.LoadRefreshToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, correlationId, kmsi);
|
|
57581
|
+
rootMeasurement.end({ success: true }, undefined, AccountEntity.getAccountInfo(cacheRecordAccount));
|
|
57582
|
+
return this.generateAuthenticationResult(request, {
|
|
57583
|
+
account: cacheRecordAccount,
|
|
57584
|
+
idToken,
|
|
57585
|
+
accessToken,
|
|
57586
|
+
refreshToken,
|
|
57587
|
+
}, authority, idTokenClaims);
|
|
57588
|
+
}
|
|
57589
|
+
catch (error) {
|
|
57590
|
+
rootMeasurement.end({ success: false }, error);
|
|
57591
|
+
throw error;
|
|
57592
|
+
}
|
|
57512
57593
|
}
|
|
57513
57594
|
/**
|
|
57514
57595
|
* Helper function to load account to msal-browser cache
|
|
@@ -57519,23 +57600,23 @@ class TokenCache {
|
|
|
57519
57600
|
* @param requestHomeAccountId
|
|
57520
57601
|
* @returns `AccountEntity`
|
|
57521
57602
|
*/
|
|
57522
|
-
async loadAccount(request, clientInfo, correlationId,
|
|
57603
|
+
async loadAccount(request, clientInfo, correlationId, authority, idTokenClaims) {
|
|
57523
57604
|
this.logger.verbose("TokenCache - loading account");
|
|
57524
57605
|
if (request.account) {
|
|
57525
57606
|
const accountEntity = AccountEntity.createFromAccountInfo(request.account);
|
|
57526
|
-
await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}));
|
|
57607
|
+
await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
57527
57608
|
return accountEntity;
|
|
57528
57609
|
}
|
|
57529
|
-
else if (!
|
|
57530
|
-
this.logger.error("TokenCache - if an account is not provided on the request,
|
|
57610
|
+
else if (!clientInfo && !idTokenClaims) {
|
|
57611
|
+
this.logger.error("TokenCache - if an account is not provided on the request, clientInfo or idToken must be provided instead.");
|
|
57531
57612
|
throw createBrowserAuthError(unableToLoadToken);
|
|
57532
57613
|
}
|
|
57533
57614
|
const homeAccountId = AccountEntity.generateHomeAccountId(clientInfo, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims);
|
|
57534
57615
|
const claimsTenantId = idTokenClaims?.tid;
|
|
57535
|
-
const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.
|
|
57616
|
+
const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.getPreferredCache(), claimsTenantId, undefined, // authCodePayload
|
|
57536
57617
|
undefined, // nativeAccountId
|
|
57537
57618
|
this.logger);
|
|
57538
|
-
await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}));
|
|
57619
|
+
await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
57539
57620
|
return cachedAccount;
|
|
57540
57621
|
}
|
|
57541
57622
|
/**
|
|
@@ -57604,9 +57685,15 @@ class TokenCache {
|
|
|
57604
57685
|
this.logger.verbose("TokenCache - no refresh token found in response");
|
|
57605
57686
|
return null;
|
|
57606
57687
|
}
|
|
57688
|
+
const expiresOn = response.refresh_token_expires_in
|
|
57689
|
+
? response.refresh_token_expires_in + nowSeconds()
|
|
57690
|
+
: undefined;
|
|
57691
|
+
this.performanceClient.addFields({
|
|
57692
|
+
extRtExpiresOnSeconds: expiresOn,
|
|
57693
|
+
}, correlationId);
|
|
57607
57694
|
this.logger.verbose("TokenCache - loading refresh token");
|
|
57608
57695
|
const refreshTokenEntity = createRefreshTokenEntity(homeAccountId, environment, response.refresh_token, this.config.auth.clientId, response.foci, undefined, // userAssertionHash
|
|
57609
|
-
|
|
57696
|
+
expiresOn);
|
|
57610
57697
|
await this.storage.setRefreshTokenCredential(refreshTokenEntity, correlationId, kmsi);
|
|
57611
57698
|
return refreshTokenEntity;
|
|
57612
57699
|
}
|
|
@@ -57618,7 +57705,7 @@ class TokenCache {
|
|
|
57618
57705
|
* @param authority
|
|
57619
57706
|
* @returns `AuthenticationResult`
|
|
57620
57707
|
*/
|
|
57621
|
-
generateAuthenticationResult(request, cacheRecord,
|
|
57708
|
+
generateAuthenticationResult(request, cacheRecord, authority, idTokenClaims) {
|
|
57622
57709
|
let accessToken = "";
|
|
57623
57710
|
let responseScopes = [];
|
|
57624
57711
|
let expiresOn = null;
|
|
@@ -57655,7 +57742,7 @@ class TokenCache {
|
|
|
57655
57742
|
}
|
|
57656
57743
|
}
|
|
57657
57744
|
|
|
57658
|
-
/*! @azure/msal-browser v4.
|
|
57745
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57659
57746
|
|
|
57660
57747
|
/*
|
|
57661
57748
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57668,7 +57755,7 @@ class HybridSpaAuthorizationCodeClient extends AuthorizationCodeClient {
|
|
|
57668
57755
|
}
|
|
57669
57756
|
}
|
|
57670
57757
|
|
|
57671
|
-
/*! @azure/msal-browser v4.
|
|
57758
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57672
57759
|
|
|
57673
57760
|
/*
|
|
57674
57761
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57715,7 +57802,7 @@ class SilentAuthCodeClient extends StandardInteractionClient {
|
|
|
57715
57802
|
msgraph_host: request.msGraphHost,
|
|
57716
57803
|
cloud_graph_host_name: request.cloudGraphHostName,
|
|
57717
57804
|
cloud_instance_host_name: request.cloudInstanceHostName,
|
|
57718
|
-
}, silentRequest, false);
|
|
57805
|
+
}, silentRequest, this.apiId, false);
|
|
57719
57806
|
}
|
|
57720
57807
|
catch (e) {
|
|
57721
57808
|
if (e instanceof AuthError) {
|
|
@@ -57734,7 +57821,7 @@ class SilentAuthCodeClient extends StandardInteractionClient {
|
|
|
57734
57821
|
}
|
|
57735
57822
|
}
|
|
57736
57823
|
|
|
57737
|
-
/*! @azure/msal-browser v4.
|
|
57824
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57738
57825
|
/*
|
|
57739
57826
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
57740
57827
|
* Licensed under the MIT License.
|
|
@@ -57754,7 +57841,7 @@ function collectInstanceStats(currentClientId, performanceEvent, logger) {
|
|
|
57754
57841
|
});
|
|
57755
57842
|
}
|
|
57756
57843
|
|
|
57757
|
-
/*! @azure/msal-browser v4.
|
|
57844
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57758
57845
|
|
|
57759
57846
|
/*
|
|
57760
57847
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57831,7 +57918,7 @@ class StandardController {
|
|
|
57831
57918
|
};
|
|
57832
57919
|
this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler);
|
|
57833
57920
|
// Initialize the token cache
|
|
57834
|
-
this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);
|
|
57921
|
+
this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto, this.performanceClient);
|
|
57835
57922
|
this.activeSilentTokenRequests = new Map();
|
|
57836
57923
|
// Register listener functions
|
|
57837
57924
|
this.trackPageVisibility = this.trackPageVisibility.bind(this);
|
|
@@ -58661,7 +58748,7 @@ class StandardController {
|
|
|
58661
58748
|
this.logger.verbose("hydrateCache called");
|
|
58662
58749
|
// Account gets saved to browser storage regardless of native or not
|
|
58663
58750
|
const accountEntity = AccountEntity.createFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
|
|
58664
|
-
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims));
|
|
58751
|
+
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims), ApiId.hydrateCache);
|
|
58665
58752
|
if (result.fromNativeBroker) {
|
|
58666
58753
|
this.logger.verbose("Response was from native broker, storing in-memory");
|
|
58667
58754
|
// Tokens from native broker are stored in-memory
|
|
@@ -59207,7 +59294,7 @@ function checkIfRefreshTokenErrorCanBeResolvedSilently(refreshTokenError, cacheL
|
|
|
59207
59294
|
return isSilentlyResolvable && tryIframeRenewal;
|
|
59208
59295
|
}
|
|
59209
59296
|
|
|
59210
|
-
/*! @azure/msal-browser v4.
|
|
59297
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
59211
59298
|
|
|
59212
59299
|
/*
|
|
59213
59300
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -59219,7 +59306,7 @@ async function createV3Controller(config, request) {
|
|
|
59219
59306
|
return StandardController.createController(standard, request);
|
|
59220
59307
|
}
|
|
59221
59308
|
|
|
59222
|
-
/*! @azure/msal-browser v4.
|
|
59309
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
59223
59310
|
|
|
59224
59311
|
/*
|
|
59225
59312
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|