@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.cjs.js
CHANGED
|
@@ -7174,7 +7174,12 @@ var includesStringExports = includesString.exports;
|
|
|
7174
7174
|
var before_at = before_slash.substring(0, at_position);
|
|
7175
7175
|
var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/;
|
|
7176
7176
|
var is_valid_auth = valid_auth_regex.test(before_at);
|
|
7177
|
-
|
|
7177
|
+
|
|
7178
|
+
// Check if this contains URL-encoded content that could be malicious
|
|
7179
|
+
// For example: javascript:%61%6c%65%72%74%28%31%29@example.com
|
|
7180
|
+
// The encoded part decodes to: alert(1)
|
|
7181
|
+
var has_encoded_content = /%[0-9a-fA-F]{2}/.test(before_at);
|
|
7182
|
+
if (is_valid_auth && !has_encoded_content) {
|
|
7178
7183
|
// This looks like authentication (e.g., user:password@host), not a protocol
|
|
7179
7184
|
if (options.require_protocol) {
|
|
7180
7185
|
return false;
|
|
@@ -7183,6 +7188,7 @@ var includesStringExports = includesString.exports;
|
|
|
7183
7188
|
// Don't consume the colon; let the auth parsing handle it later
|
|
7184
7189
|
} else {
|
|
7185
7190
|
// This looks like a malicious protocol (e.g., javascript:alert();@host)
|
|
7191
|
+
// or URL-encoded protocol handler (e.g., javascript:%61%6c%65%72%74%28%31%29@host)
|
|
7186
7192
|
url = cleanUpProtocol(potential_protocol);
|
|
7187
7193
|
if (url === false) {
|
|
7188
7194
|
return false;
|
|
@@ -8429,11 +8435,18 @@ var isHexColor = {exports: {}};
|
|
|
8429
8435
|
});
|
|
8430
8436
|
exports$1.default = isHexColor;
|
|
8431
8437
|
var _assertString = _interopRequireDefault(assertStringExports);
|
|
8438
|
+
var _merge = _interopRequireDefault(mergeExports);
|
|
8432
8439
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8433
8440
|
var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
|
|
8434
|
-
|
|
8441
|
+
var hexcolor_with_prefix = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
|
|
8442
|
+
var default_is_hexcolor_options = {
|
|
8443
|
+
require_hashtag: false
|
|
8444
|
+
};
|
|
8445
|
+
function isHexColor(str, options) {
|
|
8435
8446
|
(0, _assertString.default)(str);
|
|
8436
|
-
|
|
8447
|
+
options = (0, _merge.default)(options, default_is_hexcolor_options);
|
|
8448
|
+
var hexcolor_regex = options.require_hashtag ? hexcolor_with_prefix : hexcolor;
|
|
8449
|
+
return hexcolor_regex.test(str);
|
|
8437
8450
|
}
|
|
8438
8451
|
module.exports = exports$1.default;
|
|
8439
8452
|
module.exports.default = exports$1.default;
|
|
@@ -8591,7 +8604,7 @@ var ibanRegexThroughCountryCode = {
|
|
|
8591
8604
|
IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/,
|
|
8592
8605
|
IL: /^(IL[0-9]{2})\d{19}$/,
|
|
8593
8606
|
IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,
|
|
8594
|
-
IR: /^(IR[0-9]{2})
|
|
8607
|
+
IR: /^(IR[0-9]{2})\d{22}$/,
|
|
8595
8608
|
IS: /^(IS[0-9]{2})\d{22}$/,
|
|
8596
8609
|
IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,
|
|
8597
8610
|
JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/,
|
|
@@ -13358,7 +13371,7 @@ function isVAT(str, countryCode) {
|
|
|
13358
13371
|
var _isVAT = _interopRequireDefault(isVAT$1);
|
|
13359
13372
|
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); }
|
|
13360
13373
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13361
|
-
var version = '13.15.
|
|
13374
|
+
var version = '13.15.26';
|
|
13362
13375
|
var validator = {
|
|
13363
13376
|
version: version,
|
|
13364
13377
|
toDate: _toDate.default,
|
|
@@ -42489,7 +42502,7 @@ var AuthDev = {
|
|
|
42489
42502
|
acquireTokensByRequest
|
|
42490
42503
|
};
|
|
42491
42504
|
|
|
42492
|
-
/*! @azure/msal-common v15.
|
|
42505
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42493
42506
|
/*
|
|
42494
42507
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
42495
42508
|
* Licensed under the MIT License.
|
|
@@ -42763,7 +42776,7 @@ const JsonWebTokenTypes = {
|
|
|
42763
42776
|
// Token renewal offset default in seconds
|
|
42764
42777
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
42765
42778
|
|
|
42766
|
-
/*! @azure/msal-common v15.
|
|
42779
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42767
42780
|
/*
|
|
42768
42781
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
42769
42782
|
* Licensed under the MIT License.
|
|
@@ -42774,7 +42787,7 @@ const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
|
42774
42787
|
const unexpectedError = "unexpected_error";
|
|
42775
42788
|
const postRequestFailed$1 = "post_request_failed";
|
|
42776
42789
|
|
|
42777
|
-
/*! @azure/msal-common v15.
|
|
42790
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42778
42791
|
|
|
42779
42792
|
/*
|
|
42780
42793
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -42809,7 +42822,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
42809
42822
|
: AuthErrorMessages[code]);
|
|
42810
42823
|
}
|
|
42811
42824
|
|
|
42812
|
-
/*! @azure/msal-common v15.
|
|
42825
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42813
42826
|
/*
|
|
42814
42827
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
42815
42828
|
* Licensed under the MIT License.
|
|
@@ -42860,7 +42873,7 @@ const methodNotImplemented = "method_not_implemented";
|
|
|
42860
42873
|
const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
|
|
42861
42874
|
const platformBrokerError = "platform_broker_error";
|
|
42862
42875
|
|
|
42863
|
-
/*! @azure/msal-common v15.
|
|
42876
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42864
42877
|
|
|
42865
42878
|
/*
|
|
42866
42879
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -42935,7 +42948,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
42935
42948
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
42936
42949
|
}
|
|
42937
42950
|
|
|
42938
|
-
/*! @azure/msal-common v15.
|
|
42951
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42939
42952
|
|
|
42940
42953
|
/*
|
|
42941
42954
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -42974,7 +42987,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
42974
42987
|
},
|
|
42975
42988
|
};
|
|
42976
42989
|
|
|
42977
|
-
/*! @azure/msal-common v15.
|
|
42990
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
42978
42991
|
|
|
42979
42992
|
/*
|
|
42980
42993
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43165,12 +43178,12 @@ class Logger {
|
|
|
43165
43178
|
}
|
|
43166
43179
|
}
|
|
43167
43180
|
|
|
43168
|
-
/*! @azure/msal-common v15.
|
|
43181
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43169
43182
|
/* eslint-disable header/header */
|
|
43170
43183
|
const name$2 = "@azure/msal-common";
|
|
43171
|
-
const version$1 = "15.
|
|
43184
|
+
const version$1 = "15.14.1";
|
|
43172
43185
|
|
|
43173
|
-
/*! @azure/msal-common v15.
|
|
43186
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43174
43187
|
/*
|
|
43175
43188
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43176
43189
|
* Licensed under the MIT License.
|
|
@@ -43179,7 +43192,7 @@ const AzureCloudInstance = {
|
|
|
43179
43192
|
// AzureCloudInstance is not specified.
|
|
43180
43193
|
None: "none"};
|
|
43181
43194
|
|
|
43182
|
-
/*! @azure/msal-common v15.
|
|
43195
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43183
43196
|
/*
|
|
43184
43197
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43185
43198
|
* Licensed under the MIT License.
|
|
@@ -43209,7 +43222,7 @@ const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
|
|
|
43209
43222
|
const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
|
|
43210
43223
|
const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
|
|
43211
43224
|
|
|
43212
|
-
/*! @azure/msal-common v15.
|
|
43225
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43213
43226
|
|
|
43214
43227
|
/*
|
|
43215
43228
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43255,7 +43268,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
43255
43268
|
return new ClientConfigurationError(errorCode);
|
|
43256
43269
|
}
|
|
43257
43270
|
|
|
43258
|
-
/*! @azure/msal-common v15.
|
|
43271
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43259
43272
|
/*
|
|
43260
43273
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43261
43274
|
* Licensed under the MIT License.
|
|
@@ -43352,7 +43365,7 @@ class StringUtils {
|
|
|
43352
43365
|
}
|
|
43353
43366
|
}
|
|
43354
43367
|
|
|
43355
|
-
/*! @azure/msal-common v15.
|
|
43368
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43356
43369
|
|
|
43357
43370
|
/*
|
|
43358
43371
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43547,7 +43560,7 @@ class ScopeSet {
|
|
|
43547
43560
|
}
|
|
43548
43561
|
}
|
|
43549
43562
|
|
|
43550
|
-
/*! @azure/msal-common v15.
|
|
43563
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43551
43564
|
|
|
43552
43565
|
/*
|
|
43553
43566
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43587,7 +43600,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
43587
43600
|
};
|
|
43588
43601
|
}
|
|
43589
43602
|
|
|
43590
|
-
/*! @azure/msal-common v15.
|
|
43603
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43591
43604
|
/*
|
|
43592
43605
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43593
43606
|
* Licensed under the MIT License.
|
|
@@ -43669,7 +43682,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
43669
43682
|
return updatedAccountInfo;
|
|
43670
43683
|
}
|
|
43671
43684
|
|
|
43672
|
-
/*! @azure/msal-common v15.
|
|
43685
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43673
43686
|
/*
|
|
43674
43687
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43675
43688
|
* Licensed under the MIT License.
|
|
@@ -43684,7 +43697,7 @@ const AuthorityType = {
|
|
|
43684
43697
|
Ciam: 3,
|
|
43685
43698
|
};
|
|
43686
43699
|
|
|
43687
|
-
/*! @azure/msal-common v15.
|
|
43700
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43688
43701
|
/*
|
|
43689
43702
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43690
43703
|
* Licensed under the MIT License.
|
|
@@ -43706,7 +43719,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
43706
43719
|
return null;
|
|
43707
43720
|
}
|
|
43708
43721
|
|
|
43709
|
-
/*! @azure/msal-common v15.
|
|
43722
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43710
43723
|
/*
|
|
43711
43724
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
43712
43725
|
* Licensed under the MIT License.
|
|
@@ -43730,7 +43743,7 @@ const ProtocolMode = {
|
|
|
43730
43743
|
EAR: "EAR",
|
|
43731
43744
|
};
|
|
43732
43745
|
|
|
43733
|
-
/*! @azure/msal-common v15.
|
|
43746
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43734
43747
|
|
|
43735
43748
|
/*
|
|
43736
43749
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -43764,6 +43777,13 @@ class AccountEntity {
|
|
|
43764
43777
|
* Returns the AccountInfo interface for this account.
|
|
43765
43778
|
*/
|
|
43766
43779
|
static getAccountInfo(accountEntity) {
|
|
43780
|
+
const tenantProfiles = accountEntity.tenantProfiles || [];
|
|
43781
|
+
// Ensure at least the home tenant profile exists
|
|
43782
|
+
if (tenantProfiles.length === 0 &&
|
|
43783
|
+
accountEntity.realm &&
|
|
43784
|
+
accountEntity.localAccountId) {
|
|
43785
|
+
tenantProfiles.push(buildTenantProfile(accountEntity.homeAccountId, accountEntity.localAccountId, accountEntity.realm));
|
|
43786
|
+
}
|
|
43767
43787
|
return {
|
|
43768
43788
|
homeAccountId: accountEntity.homeAccountId,
|
|
43769
43789
|
environment: accountEntity.environment,
|
|
@@ -43775,7 +43795,7 @@ class AccountEntity {
|
|
|
43775
43795
|
nativeAccountId: accountEntity.nativeAccountId,
|
|
43776
43796
|
authorityType: accountEntity.authorityType,
|
|
43777
43797
|
// Deserialize tenant profiles array into a Map
|
|
43778
|
-
tenantProfiles: new Map(
|
|
43798
|
+
tenantProfiles: new Map(tenantProfiles.map((tenantProfile) => {
|
|
43779
43799
|
return [tenantProfile.tenantId, tenantProfile];
|
|
43780
43800
|
})),
|
|
43781
43801
|
dataBoundary: accountEntity.dataBoundary,
|
|
@@ -43876,7 +43896,14 @@ class AccountEntity {
|
|
|
43876
43896
|
account.cloudGraphHostName = cloudGraphHostName;
|
|
43877
43897
|
account.msGraphHost = msGraphHost;
|
|
43878
43898
|
// Serialize tenant profiles map into an array
|
|
43879
|
-
|
|
43899
|
+
const tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []);
|
|
43900
|
+
// Ensure at least the home tenant profile exists
|
|
43901
|
+
if (tenantProfiles.length === 0 &&
|
|
43902
|
+
accountInfo.tenantId &&
|
|
43903
|
+
accountInfo.localAccountId) {
|
|
43904
|
+
tenantProfiles.push(buildTenantProfile(accountInfo.homeAccountId, accountInfo.localAccountId, accountInfo.tenantId, accountInfo.idTokenClaims));
|
|
43905
|
+
}
|
|
43906
|
+
account.tenantProfiles = tenantProfiles;
|
|
43880
43907
|
account.dataBoundary = accountInfo.dataBoundary;
|
|
43881
43908
|
return account;
|
|
43882
43909
|
}
|
|
@@ -43951,7 +43978,7 @@ class AccountEntity {
|
|
|
43951
43978
|
}
|
|
43952
43979
|
}
|
|
43953
43980
|
|
|
43954
|
-
/*! @azure/msal-common v15.
|
|
43981
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
43955
43982
|
|
|
43956
43983
|
/*
|
|
43957
43984
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44032,7 +44059,7 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
44032
44059
|
}
|
|
44033
44060
|
}
|
|
44034
44061
|
|
|
44035
|
-
/*! @azure/msal-common v15.
|
|
44062
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44036
44063
|
|
|
44037
44064
|
/*
|
|
44038
44065
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44148,7 +44175,7 @@ function normalizeUrlForComparison(url) {
|
|
|
44148
44175
|
}
|
|
44149
44176
|
}
|
|
44150
44177
|
|
|
44151
|
-
/*! @azure/msal-common v15.
|
|
44178
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44152
44179
|
|
|
44153
44180
|
/*
|
|
44154
44181
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44312,7 +44339,7 @@ class UrlString {
|
|
|
44312
44339
|
}
|
|
44313
44340
|
}
|
|
44314
44341
|
|
|
44315
|
-
/*! @azure/msal-common v15.
|
|
44342
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44316
44343
|
|
|
44317
44344
|
/*
|
|
44318
44345
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44451,7 +44478,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
44451
44478
|
return null;
|
|
44452
44479
|
}
|
|
44453
44480
|
|
|
44454
|
-
/*! @azure/msal-common v15.
|
|
44481
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44455
44482
|
/*
|
|
44456
44483
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
44457
44484
|
* Licensed under the MIT License.
|
|
@@ -44459,7 +44486,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
44459
44486
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
44460
44487
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
44461
44488
|
|
|
44462
|
-
/*! @azure/msal-common v15.
|
|
44489
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44463
44490
|
|
|
44464
44491
|
/*
|
|
44465
44492
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44504,7 +44531,7 @@ function createCacheError(e) {
|
|
|
44504
44531
|
}
|
|
44505
44532
|
}
|
|
44506
44533
|
|
|
44507
|
-
/*! @azure/msal-common v15.
|
|
44534
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
44508
44535
|
|
|
44509
44536
|
/*
|
|
44510
44537
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -44674,15 +44701,16 @@ class CacheManager {
|
|
|
44674
44701
|
* @param cacheRecord {CacheRecord}
|
|
44675
44702
|
* @param correlationId {?string} correlation id
|
|
44676
44703
|
* @param kmsi - Keep Me Signed In
|
|
44704
|
+
* @param apiId - API identifier for telemetry tracking
|
|
44677
44705
|
* @param storeInCache {?StoreInCache}
|
|
44678
44706
|
*/
|
|
44679
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
44707
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
44680
44708
|
if (!cacheRecord) {
|
|
44681
44709
|
throw createClientAuthError(invalidCacheRecord);
|
|
44682
44710
|
}
|
|
44683
44711
|
try {
|
|
44684
44712
|
if (!!cacheRecord.account) {
|
|
44685
|
-
await this.setAccount(cacheRecord.account, correlationId, kmsi);
|
|
44713
|
+
await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
|
|
44686
44714
|
}
|
|
44687
44715
|
if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
|
|
44688
44716
|
await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
|
|
@@ -45613,7 +45641,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
45613
45641
|
}
|
|
45614
45642
|
}
|
|
45615
45643
|
|
|
45616
|
-
/*! @azure/msal-common v15.
|
|
45644
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
45617
45645
|
/*
|
|
45618
45646
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
45619
45647
|
* Licensed under the MIT License.
|
|
@@ -45870,6 +45898,11 @@ const PerformanceEvents = {
|
|
|
45870
45898
|
Decrypt: "decrypt",
|
|
45871
45899
|
GenerateEarKey: "generateEarKey",
|
|
45872
45900
|
DecryptEarResponse: "decryptEarResponse",
|
|
45901
|
+
LoadExternalTokens: "LoadExternalTokens",
|
|
45902
|
+
LoadAccount: "loadAccount",
|
|
45903
|
+
LoadIdToken: "loadIdToken",
|
|
45904
|
+
LoadAccessToken: "loadAccessToken",
|
|
45905
|
+
LoadRefreshToken: "loadRefreshToken",
|
|
45873
45906
|
};
|
|
45874
45907
|
/**
|
|
45875
45908
|
* State of the performance event.
|
|
@@ -45880,7 +45913,7 @@ const PerformanceEvents = {
|
|
|
45880
45913
|
const PerformanceEventStatus = {
|
|
45881
45914
|
InProgress: 1};
|
|
45882
45915
|
|
|
45883
|
-
/*! @azure/msal-common v15.
|
|
45916
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
45884
45917
|
|
|
45885
45918
|
/*
|
|
45886
45919
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -45959,7 +45992,7 @@ class StubPerformanceClient {
|
|
|
45959
45992
|
}
|
|
45960
45993
|
}
|
|
45961
45994
|
|
|
45962
|
-
/*! @azure/msal-common v15.
|
|
45995
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
45963
45996
|
|
|
45964
45997
|
/*
|
|
45965
45998
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -46059,7 +46092,7 @@ function isOidcProtocolMode(config) {
|
|
|
46059
46092
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
46060
46093
|
}
|
|
46061
46094
|
|
|
46062
|
-
/*! @azure/msal-common v15.
|
|
46095
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46063
46096
|
/*
|
|
46064
46097
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46065
46098
|
* Licensed under the MIT License.
|
|
@@ -46069,7 +46102,7 @@ const CcsCredentialType = {
|
|
|
46069
46102
|
UPN: "UPN",
|
|
46070
46103
|
};
|
|
46071
46104
|
|
|
46072
|
-
/*! @azure/msal-common v15.
|
|
46105
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46073
46106
|
/*
|
|
46074
46107
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46075
46108
|
* Licensed under the MIT License.
|
|
@@ -46119,7 +46152,7 @@ const INSTANCE_AWARE = "instance_aware";
|
|
|
46119
46152
|
const EAR_JWK = "ear_jwk";
|
|
46120
46153
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
46121
46154
|
|
|
46122
|
-
/*! @azure/msal-common v15.
|
|
46155
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46123
46156
|
|
|
46124
46157
|
/*
|
|
46125
46158
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -46499,7 +46532,7 @@ function addPostBodyParameters(parameters, bodyParameters) {
|
|
|
46499
46532
|
});
|
|
46500
46533
|
}
|
|
46501
46534
|
|
|
46502
|
-
/*! @azure/msal-common v15.
|
|
46535
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46503
46536
|
/*
|
|
46504
46537
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46505
46538
|
* Licensed under the MIT License.
|
|
@@ -46511,7 +46544,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
46511
46544
|
response.hasOwnProperty("jwks_uri"));
|
|
46512
46545
|
}
|
|
46513
46546
|
|
|
46514
|
-
/*! @azure/msal-common v15.
|
|
46547
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46515
46548
|
/*
|
|
46516
46549
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46517
46550
|
* Licensed under the MIT License.
|
|
@@ -46521,7 +46554,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
46521
46554
|
response.hasOwnProperty("metadata"));
|
|
46522
46555
|
}
|
|
46523
46556
|
|
|
46524
|
-
/*! @azure/msal-common v15.
|
|
46557
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46525
46558
|
/*
|
|
46526
46559
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46527
46560
|
* Licensed under the MIT License.
|
|
@@ -46531,7 +46564,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
46531
46564
|
response.hasOwnProperty("error_description"));
|
|
46532
46565
|
}
|
|
46533
46566
|
|
|
46534
|
-
/*! @azure/msal-common v15.
|
|
46567
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46535
46568
|
/*
|
|
46536
46569
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46537
46570
|
* Licensed under the MIT License.
|
|
@@ -46627,7 +46660,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
46627
46660
|
};
|
|
46628
46661
|
};
|
|
46629
46662
|
|
|
46630
|
-
/*! @azure/msal-common v15.
|
|
46663
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46631
46664
|
|
|
46632
46665
|
/*
|
|
46633
46666
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -46733,7 +46766,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
46733
46766
|
},
|
|
46734
46767
|
};
|
|
46735
46768
|
|
|
46736
|
-
/*! @azure/msal-common v15.
|
|
46769
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46737
46770
|
/*
|
|
46738
46771
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
46739
46772
|
* Licensed under the MIT License.
|
|
@@ -46798,7 +46831,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
46798
46831
|
return cachedAtSec > nowSeconds();
|
|
46799
46832
|
}
|
|
46800
46833
|
|
|
46801
|
-
/*! @azure/msal-common v15.
|
|
46834
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
46802
46835
|
|
|
46803
46836
|
/*
|
|
46804
46837
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47060,7 +47093,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
47060
47093
|
return metadata.expiresAt <= nowSeconds();
|
|
47061
47094
|
}
|
|
47062
47095
|
|
|
47063
|
-
/*! @azure/msal-common v15.
|
|
47096
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47064
47097
|
|
|
47065
47098
|
/*
|
|
47066
47099
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47899,7 +47932,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
47899
47932
|
};
|
|
47900
47933
|
}
|
|
47901
47934
|
|
|
47902
|
-
/*! @azure/msal-common v15.
|
|
47935
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47903
47936
|
|
|
47904
47937
|
/*
|
|
47905
47938
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47930,7 +47963,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
47930
47963
|
}
|
|
47931
47964
|
}
|
|
47932
47965
|
|
|
47933
|
-
/*! @azure/msal-common v15.
|
|
47966
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47934
47967
|
|
|
47935
47968
|
/*
|
|
47936
47969
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -47949,7 +47982,7 @@ class ServerError extends AuthError {
|
|
|
47949
47982
|
}
|
|
47950
47983
|
}
|
|
47951
47984
|
|
|
47952
|
-
/*! @azure/msal-common v15.
|
|
47985
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47953
47986
|
/*
|
|
47954
47987
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
47955
47988
|
* Licensed under the MIT License.
|
|
@@ -47970,7 +48003,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
47970
48003
|
};
|
|
47971
48004
|
}
|
|
47972
48005
|
|
|
47973
|
-
/*! @azure/msal-common v15.
|
|
48006
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
47974
48007
|
|
|
47975
48008
|
/*
|
|
47976
48009
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48057,7 +48090,7 @@ class ThrottlingUtils {
|
|
|
48057
48090
|
}
|
|
48058
48091
|
}
|
|
48059
48092
|
|
|
48060
|
-
/*! @azure/msal-common v15.
|
|
48093
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48061
48094
|
|
|
48062
48095
|
/*
|
|
48063
48096
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48088,7 +48121,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
48088
48121
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
48089
48122
|
}
|
|
48090
48123
|
|
|
48091
|
-
/*! @azure/msal-common v15.
|
|
48124
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48092
48125
|
|
|
48093
48126
|
/*
|
|
48094
48127
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48236,7 +48269,7 @@ class BaseClient {
|
|
|
48236
48269
|
}
|
|
48237
48270
|
}
|
|
48238
48271
|
|
|
48239
|
-
/*! @azure/msal-common v15.
|
|
48272
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48240
48273
|
/*
|
|
48241
48274
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
48242
48275
|
* Licensed under the MIT License.
|
|
@@ -48252,7 +48285,7 @@ const consentRequired = "consent_required";
|
|
|
48252
48285
|
const loginRequired = "login_required";
|
|
48253
48286
|
const badToken = "bad_token";
|
|
48254
48287
|
|
|
48255
|
-
/*! @azure/msal-common v15.
|
|
48288
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48256
48289
|
|
|
48257
48290
|
/*
|
|
48258
48291
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48324,7 +48357,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
48324
48357
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
48325
48358
|
}
|
|
48326
48359
|
|
|
48327
|
-
/*! @azure/msal-common v15.
|
|
48360
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48328
48361
|
|
|
48329
48362
|
/*
|
|
48330
48363
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48396,7 +48429,7 @@ class ProtocolUtils {
|
|
|
48396
48429
|
}
|
|
48397
48430
|
}
|
|
48398
48431
|
|
|
48399
|
-
/*! @azure/msal-common v15.
|
|
48432
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48400
48433
|
|
|
48401
48434
|
/*
|
|
48402
48435
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48478,7 +48511,7 @@ class PopTokenGenerator {
|
|
|
48478
48511
|
}
|
|
48479
48512
|
}
|
|
48480
48513
|
|
|
48481
|
-
/*! @azure/msal-common v15.
|
|
48514
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48482
48515
|
/*
|
|
48483
48516
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
48484
48517
|
* Licensed under the MIT License.
|
|
@@ -48505,7 +48538,7 @@ class PopTokenGenerator {
|
|
|
48505
48538
|
}
|
|
48506
48539
|
}
|
|
48507
48540
|
|
|
48508
|
-
/*! @azure/msal-common v15.
|
|
48541
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48509
48542
|
|
|
48510
48543
|
/*
|
|
48511
48544
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48569,7 +48602,7 @@ class ResponseHandler {
|
|
|
48569
48602
|
* @param serverTokenResponse
|
|
48570
48603
|
* @param authority
|
|
48571
48604
|
*/
|
|
48572
|
-
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
48605
|
+
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
48573
48606
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
|
|
48574
48607
|
// create an idToken object (not entity)
|
|
48575
48608
|
let idTokenClaims;
|
|
@@ -48617,14 +48650,19 @@ class ResponseHandler {
|
|
|
48617
48650
|
if (handlingRefreshTokenResponse &&
|
|
48618
48651
|
!forceCacheRefreshTokenResponse &&
|
|
48619
48652
|
cacheRecord.account) {
|
|
48620
|
-
const
|
|
48621
|
-
|
|
48622
|
-
|
|
48653
|
+
const cachedAccounts = this.cacheStorage.getAllAccounts({
|
|
48654
|
+
homeAccountId: cacheRecord.account.homeAccountId,
|
|
48655
|
+
environment: cacheRecord.account.environment,
|
|
48656
|
+
}, request.correlationId);
|
|
48657
|
+
if (cachedAccounts.length < 1) {
|
|
48623
48658
|
this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache");
|
|
48659
|
+
this.performanceClient?.addFields({
|
|
48660
|
+
acntLoggedOut: true,
|
|
48661
|
+
}, request.correlationId);
|
|
48624
48662
|
return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId);
|
|
48625
48663
|
}
|
|
48626
48664
|
}
|
|
48627
|
-
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
|
|
48665
|
+
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
|
|
48628
48666
|
}
|
|
48629
48667
|
finally {
|
|
48630
48668
|
if (this.persistencePlugin &&
|
|
@@ -48694,6 +48732,9 @@ class ResponseHandler {
|
|
|
48694
48732
|
? parseInt(serverTokenResponse.refresh_token_expires_in, 10)
|
|
48695
48733
|
: serverTokenResponse.refresh_token_expires_in;
|
|
48696
48734
|
rtExpiresOn = reqTimestamp + rtExpiresIn;
|
|
48735
|
+
this.performanceClient?.addFields({
|
|
48736
|
+
ntwkRtExpiresOnSeconds: rtExpiresOn,
|
|
48737
|
+
}, request.correlationId);
|
|
48697
48738
|
}
|
|
48698
48739
|
cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn);
|
|
48699
48740
|
}
|
|
@@ -48836,7 +48877,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
48836
48877
|
return baseAccount;
|
|
48837
48878
|
}
|
|
48838
48879
|
|
|
48839
|
-
/*! @azure/msal-common v15.
|
|
48880
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48840
48881
|
/*
|
|
48841
48882
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
48842
48883
|
* Licensed under the MIT License.
|
|
@@ -48854,7 +48895,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
48854
48895
|
}
|
|
48855
48896
|
}
|
|
48856
48897
|
|
|
48857
|
-
/*! @azure/msal-common v15.
|
|
48898
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
48858
48899
|
|
|
48859
48900
|
/*
|
|
48860
48901
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -48876,8 +48917,9 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
48876
48917
|
* API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the
|
|
48877
48918
|
* authorization_code_grant
|
|
48878
48919
|
* @param request
|
|
48920
|
+
* @param apiId - API identifier for telemetry tracking
|
|
48879
48921
|
*/
|
|
48880
|
-
async acquireToken(request, authCodePayload) {
|
|
48922
|
+
async acquireToken(request, apiId, authCodePayload) {
|
|
48881
48923
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
|
|
48882
48924
|
if (!request.code) {
|
|
48883
48925
|
throw createClientAuthError(requestCannotBeMade);
|
|
@@ -48889,7 +48931,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
48889
48931
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient);
|
|
48890
48932
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
48891
48933
|
responseHandler.validateTokenResponse(response.body);
|
|
48892
|
-
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);
|
|
48934
|
+
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);
|
|
48893
48935
|
}
|
|
48894
48936
|
/**
|
|
48895
48937
|
* Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
|
|
@@ -49089,7 +49131,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
49089
49131
|
}
|
|
49090
49132
|
}
|
|
49091
49133
|
|
|
49092
|
-
/*! @azure/msal-common v15.
|
|
49134
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49093
49135
|
|
|
49094
49136
|
/*
|
|
49095
49137
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49104,7 +49146,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49104
49146
|
constructor(configuration, performanceClient) {
|
|
49105
49147
|
super(configuration, performanceClient);
|
|
49106
49148
|
}
|
|
49107
|
-
async acquireToken(request) {
|
|
49149
|
+
async acquireToken(request, apiId) {
|
|
49108
49150
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
49109
49151
|
const reqTimestamp = nowSeconds();
|
|
49110
49152
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
@@ -49112,13 +49154,13 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49112
49154
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
49113
49155
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
49114
49156
|
responseHandler.validateTokenResponse(response.body);
|
|
49115
|
-
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);
|
|
49157
|
+
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);
|
|
49116
49158
|
}
|
|
49117
49159
|
/**
|
|
49118
49160
|
* Gets cached refresh token and attaches to request, then calls acquireToken API
|
|
49119
49161
|
* @param request
|
|
49120
49162
|
*/
|
|
49121
|
-
async acquireTokenByRefreshToken(request) {
|
|
49163
|
+
async acquireTokenByRefreshToken(request, apiId) {
|
|
49122
49164
|
// Cannot renew token if no request object is given.
|
|
49123
49165
|
if (!request) {
|
|
49124
49166
|
throw createClientConfigurationError(tokenRequestEmpty);
|
|
@@ -49133,7 +49175,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49133
49175
|
// if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
|
|
49134
49176
|
if (isFOCI) {
|
|
49135
49177
|
try {
|
|
49136
|
-
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
|
|
49178
|
+
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
|
|
49137
49179
|
}
|
|
49138
49180
|
catch (e) {
|
|
49139
49181
|
const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
|
|
@@ -49144,7 +49186,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49144
49186
|
e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
49145
49187
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
49146
49188
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
49147
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
49189
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
49148
49190
|
// throw in all other cases
|
|
49149
49191
|
}
|
|
49150
49192
|
else {
|
|
@@ -49153,26 +49195,30 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49153
49195
|
}
|
|
49154
49196
|
}
|
|
49155
49197
|
// fall back to application refresh token acquisition
|
|
49156
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
49198
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
49157
49199
|
}
|
|
49158
49200
|
/**
|
|
49159
49201
|
* makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
|
|
49160
49202
|
* @param request
|
|
49161
49203
|
*/
|
|
49162
|
-
async acquireTokenWithCachedRefreshToken(request, foci) {
|
|
49204
|
+
async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
|
|
49163
49205
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
49164
49206
|
// fetches family RT or application RT based on FOCI value
|
|
49165
49207
|
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);
|
|
49166
49208
|
if (!refreshToken) {
|
|
49167
49209
|
throw createInteractionRequiredAuthError(noTokensFound);
|
|
49168
49210
|
}
|
|
49169
|
-
if (refreshToken.expiresOn
|
|
49170
|
-
|
|
49171
|
-
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS
|
|
49172
|
-
this.performanceClient?.addFields({
|
|
49173
|
-
|
|
49211
|
+
if (refreshToken.expiresOn) {
|
|
49212
|
+
const offset = request.refreshTokenExpirationOffsetSeconds ||
|
|
49213
|
+
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS;
|
|
49214
|
+
this.performanceClient?.addFields({
|
|
49215
|
+
cacheRtExpiresOnSeconds: Number(refreshToken.expiresOn),
|
|
49216
|
+
rtOffsetSeconds: offset,
|
|
49217
|
+
}, request.correlationId);
|
|
49218
|
+
if (isTokenExpired(refreshToken.expiresOn, offset)) {
|
|
49219
|
+
throw createInteractionRequiredAuthError(refreshTokenExpired);
|
|
49220
|
+
}
|
|
49174
49221
|
}
|
|
49175
|
-
// attach cached RT size to the current measurement
|
|
49176
49222
|
const refreshTokenRequest = {
|
|
49177
49223
|
...request,
|
|
49178
49224
|
refreshToken: refreshToken.secret,
|
|
@@ -49183,11 +49229,10 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49183
49229
|
},
|
|
49184
49230
|
};
|
|
49185
49231
|
try {
|
|
49186
|
-
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
|
|
49232
|
+
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
|
|
49187
49233
|
}
|
|
49188
49234
|
catch (e) {
|
|
49189
49235
|
if (e instanceof InteractionRequiredAuthError) {
|
|
49190
|
-
this.performanceClient?.addFields({ rtExpiresOnMs: Number(refreshToken.expiresOn) }, request.correlationId);
|
|
49191
49236
|
if (e.subError === badToken) {
|
|
49192
49237
|
// Remove bad refresh token from cache
|
|
49193
49238
|
this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
@@ -49298,7 +49343,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
49298
49343
|
}
|
|
49299
49344
|
}
|
|
49300
49345
|
|
|
49301
|
-
/*! @azure/msal-common v15.
|
|
49346
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49302
49347
|
|
|
49303
49348
|
/*
|
|
49304
49349
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49396,7 +49441,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
49396
49441
|
}
|
|
49397
49442
|
}
|
|
49398
49443
|
|
|
49399
|
-
/*! @azure/msal-common v15.
|
|
49444
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49400
49445
|
|
|
49401
49446
|
/*
|
|
49402
49447
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49411,7 +49456,7 @@ const StubbedNetworkModule = {
|
|
|
49411
49456
|
},
|
|
49412
49457
|
};
|
|
49413
49458
|
|
|
49414
|
-
/*! @azure/msal-common v15.
|
|
49459
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49415
49460
|
|
|
49416
49461
|
/*
|
|
49417
49462
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49635,7 +49680,7 @@ function extractLoginHint(account) {
|
|
|
49635
49680
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
49636
49681
|
}
|
|
49637
49682
|
|
|
49638
|
-
/*! @azure/msal-common v15.
|
|
49683
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49639
49684
|
|
|
49640
49685
|
/*
|
|
49641
49686
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49898,7 +49943,7 @@ class ServerTelemetryManager {
|
|
|
49898
49943
|
}
|
|
49899
49944
|
}
|
|
49900
49945
|
|
|
49901
|
-
/*! @azure/msal-common v15.
|
|
49946
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49902
49947
|
/*
|
|
49903
49948
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
49904
49949
|
* Licensed under the MIT License.
|
|
@@ -49906,7 +49951,7 @@ class ServerTelemetryManager {
|
|
|
49906
49951
|
const missingKidError = "missing_kid_error";
|
|
49907
49952
|
const missingAlgError = "missing_alg_error";
|
|
49908
49953
|
|
|
49909
|
-
/*! @azure/msal-common v15.
|
|
49954
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49910
49955
|
|
|
49911
49956
|
/*
|
|
49912
49957
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49931,7 +49976,7 @@ function createJoseHeaderError(code) {
|
|
|
49931
49976
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
49932
49977
|
}
|
|
49933
49978
|
|
|
49934
|
-
/*! @azure/msal-common v15.
|
|
49979
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
49935
49980
|
|
|
49936
49981
|
/*
|
|
49937
49982
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -49971,7 +50016,7 @@ class JoseHeader {
|
|
|
49971
50016
|
}
|
|
49972
50017
|
}
|
|
49973
50018
|
|
|
49974
|
-
/*! @azure/msal-browser v4.
|
|
50019
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
49975
50020
|
/*
|
|
49976
50021
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
49977
50022
|
* Licensed under the MIT License.
|
|
@@ -50028,7 +50073,7 @@ const failedToParseHeaders = "failed_to_parse_headers";
|
|
|
50028
50073
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
50029
50074
|
const timedOut = "timed_out";
|
|
50030
50075
|
|
|
50031
|
-
/*! @azure/msal-browser v4.
|
|
50076
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50032
50077
|
|
|
50033
50078
|
/*
|
|
50034
50079
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50105,7 +50150,7 @@ function createBrowserAuthError(errorCode, subError) {
|
|
|
50105
50150
|
return new BrowserAuthError(errorCode, subError);
|
|
50106
50151
|
}
|
|
50107
50152
|
|
|
50108
|
-
/*! @azure/msal-browser v4.
|
|
50153
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50109
50154
|
|
|
50110
50155
|
/*
|
|
50111
50156
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50192,9 +50237,9 @@ const InMemoryCacheKeys = {
|
|
|
50192
50237
|
};
|
|
50193
50238
|
/**
|
|
50194
50239
|
* API Codes for Telemetry purposes.
|
|
50195
|
-
* Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
|
|
50196
50240
|
* 0-99 Silent Flow
|
|
50197
50241
|
* 800-899 Auth Code Flow
|
|
50242
|
+
* 900-999 Miscellaneous
|
|
50198
50243
|
*/
|
|
50199
50244
|
const ApiId = {
|
|
50200
50245
|
acquireTokenRedirect: 861,
|
|
@@ -50206,6 +50251,30 @@ const ApiId = {
|
|
|
50206
50251
|
acquireTokenSilent_silentFlow: 61,
|
|
50207
50252
|
logout: 961,
|
|
50208
50253
|
logoutPopup: 962,
|
|
50254
|
+
hydrateCache: 963,
|
|
50255
|
+
loadExternalTokens: 964,
|
|
50256
|
+
};
|
|
50257
|
+
/**
|
|
50258
|
+
* API Names for Telemetry purposes.
|
|
50259
|
+
*/
|
|
50260
|
+
const ApiName = {
|
|
50261
|
+
861: "acquireTokenRedirect",
|
|
50262
|
+
862: "acquireTokenPopup",
|
|
50263
|
+
863: "ssoSilent",
|
|
50264
|
+
864: "acquireTokenSilent_authCode",
|
|
50265
|
+
865: "handleRedirectPromise",
|
|
50266
|
+
866: "acquireTokenByCode",
|
|
50267
|
+
61: "acquireTokenSilent_silentFlow",
|
|
50268
|
+
961: "logout",
|
|
50269
|
+
962: "logoutPopup",
|
|
50270
|
+
963: "hydrateCache",
|
|
50271
|
+
964: "loadExternalTokens",
|
|
50272
|
+
};
|
|
50273
|
+
const apiIdToName = (id) => {
|
|
50274
|
+
if (typeof id === "number" && id in ApiName) {
|
|
50275
|
+
return ApiName[id];
|
|
50276
|
+
}
|
|
50277
|
+
return "unknown";
|
|
50209
50278
|
};
|
|
50210
50279
|
/*
|
|
50211
50280
|
* Interaction type of the API - used for state and telemetry
|
|
@@ -50270,7 +50339,7 @@ const iFrameRenewalPolicies = [
|
|
|
50270
50339
|
CacheLookupPolicy.RefreshTokenAndNetwork,
|
|
50271
50340
|
];
|
|
50272
50341
|
|
|
50273
|
-
/*! @azure/msal-browser v4.
|
|
50342
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50274
50343
|
/*
|
|
50275
50344
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
50276
50345
|
* Licensed under the MIT License.
|
|
@@ -50315,7 +50384,7 @@ function base64EncArr(aBytes) {
|
|
|
50315
50384
|
return btoa(binString);
|
|
50316
50385
|
}
|
|
50317
50386
|
|
|
50318
|
-
/*! @azure/msal-browser v4.
|
|
50387
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50319
50388
|
|
|
50320
50389
|
/*
|
|
50321
50390
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50354,7 +50423,7 @@ function base64DecToArr(base64String) {
|
|
|
50354
50423
|
return Uint8Array.from(binString, (m) => m.codePointAt(0) || 0);
|
|
50355
50424
|
}
|
|
50356
50425
|
|
|
50357
|
-
/*! @azure/msal-browser v4.
|
|
50426
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50358
50427
|
|
|
50359
50428
|
/*
|
|
50360
50429
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50653,7 +50722,7 @@ async function hashString(plainText) {
|
|
|
50653
50722
|
return urlEncodeArr(hashBytes);
|
|
50654
50723
|
}
|
|
50655
50724
|
|
|
50656
|
-
/*! @azure/msal-browser v4.
|
|
50725
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50657
50726
|
/*
|
|
50658
50727
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
50659
50728
|
* Licensed under the MIT License.
|
|
@@ -50662,7 +50731,7 @@ const storageNotSupported = "storage_not_supported";
|
|
|
50662
50731
|
const stubbedPublicClientApplicationCalled = "stubbed_public_client_application_called";
|
|
50663
50732
|
const inMemRedirectUnavailable = "in_mem_redirect_unavailable";
|
|
50664
50733
|
|
|
50665
|
-
/*! @azure/msal-browser v4.
|
|
50734
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50666
50735
|
|
|
50667
50736
|
/*
|
|
50668
50737
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50702,7 +50771,7 @@ function createBrowserConfigurationAuthError(errorCode) {
|
|
|
50702
50771
|
return new BrowserConfigurationAuthError(errorCode, BrowserConfigurationAuthErrorMessages[errorCode]);
|
|
50703
50772
|
}
|
|
50704
50773
|
|
|
50705
|
-
/*! @azure/msal-browser v4.
|
|
50774
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50706
50775
|
|
|
50707
50776
|
/*
|
|
50708
50777
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50864,7 +50933,7 @@ function createGuid() {
|
|
|
50864
50933
|
return createNewGuid();
|
|
50865
50934
|
}
|
|
50866
50935
|
|
|
50867
|
-
/*! @azure/msal-browser v4.
|
|
50936
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50868
50937
|
|
|
50869
50938
|
/*
|
|
50870
50939
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -50907,7 +50976,7 @@ class NavigationClient {
|
|
|
50907
50976
|
}
|
|
50908
50977
|
}
|
|
50909
50978
|
|
|
50910
|
-
/*! @azure/msal-browser v4.
|
|
50979
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
50911
50980
|
|
|
50912
50981
|
/*
|
|
50913
50982
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51028,7 +51097,7 @@ function getHeaderDict(headers) {
|
|
|
51028
51097
|
}
|
|
51029
51098
|
}
|
|
51030
51099
|
|
|
51031
|
-
/*! @azure/msal-browser v4.
|
|
51100
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51032
51101
|
|
|
51033
51102
|
/*
|
|
51034
51103
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51163,12 +51232,12 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
51163
51232
|
return overlayedConfig;
|
|
51164
51233
|
}
|
|
51165
51234
|
|
|
51166
|
-
/*! @azure/msal-browser v4.
|
|
51235
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51167
51236
|
/* eslint-disable header/header */
|
|
51168
51237
|
const name$1 = "@azure/msal-browser";
|
|
51169
|
-
const version = "4.
|
|
51238
|
+
const version = "4.28.1";
|
|
51170
51239
|
|
|
51171
|
-
/*! @azure/msal-browser v4.
|
|
51240
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51172
51241
|
/*
|
|
51173
51242
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
51174
51243
|
* Licensed under the MIT License.
|
|
@@ -51196,7 +51265,7 @@ function getTokenKeysCacheKey(clientId, schema = CREDENTIAL_SCHEMA_VERSION) {
|
|
|
51196
51265
|
return `${PREFIX}.${schema}.${TOKEN_KEYS}.${clientId}`;
|
|
51197
51266
|
}
|
|
51198
51267
|
|
|
51199
|
-
/*! @azure/msal-browser v4.
|
|
51268
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51200
51269
|
|
|
51201
51270
|
/*
|
|
51202
51271
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51293,7 +51362,7 @@ class BaseOperatingContext {
|
|
|
51293
51362
|
}
|
|
51294
51363
|
}
|
|
51295
51364
|
|
|
51296
|
-
/*! @azure/msal-browser v4.
|
|
51365
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51297
51366
|
|
|
51298
51367
|
/*
|
|
51299
51368
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51339,7 +51408,7 @@ StandardOperatingContext.MODULE_NAME = "";
|
|
|
51339
51408
|
*/
|
|
51340
51409
|
StandardOperatingContext.ID = "StandardOperatingContext";
|
|
51341
51410
|
|
|
51342
|
-
/*! @azure/msal-browser v4.
|
|
51411
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51343
51412
|
|
|
51344
51413
|
/*
|
|
51345
51414
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51542,7 +51611,7 @@ class DatabaseStorage {
|
|
|
51542
51611
|
}
|
|
51543
51612
|
}
|
|
51544
51613
|
|
|
51545
|
-
/*! @azure/msal-browser v4.
|
|
51614
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51546
51615
|
/*
|
|
51547
51616
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
51548
51617
|
* Licensed under the MIT License.
|
|
@@ -51588,7 +51657,7 @@ class MemoryStorage {
|
|
|
51588
51657
|
}
|
|
51589
51658
|
}
|
|
51590
51659
|
|
|
51591
|
-
/*! @azure/msal-browser v4.
|
|
51660
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51592
51661
|
|
|
51593
51662
|
/*
|
|
51594
51663
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51722,7 +51791,7 @@ class AsyncMemoryStorage {
|
|
|
51722
51791
|
}
|
|
51723
51792
|
}
|
|
51724
51793
|
|
|
51725
|
-
/*! @azure/msal-browser v4.
|
|
51794
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51726
51795
|
|
|
51727
51796
|
/*
|
|
51728
51797
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51903,7 +51972,7 @@ function getSortedObjectString(obj) {
|
|
|
51903
51972
|
return JSON.stringify(obj, Object.keys(obj).sort());
|
|
51904
51973
|
}
|
|
51905
51974
|
|
|
51906
|
-
/*! @azure/msal-browser v4.
|
|
51975
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51907
51976
|
|
|
51908
51977
|
/*
|
|
51909
51978
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -51981,7 +52050,7 @@ function getCookieExpirationTime(cookieLifeDays) {
|
|
|
51981
52050
|
return expr.toUTCString();
|
|
51982
52051
|
}
|
|
51983
52052
|
|
|
51984
|
-
/*! @azure/msal-browser v4.
|
|
52053
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
51985
52054
|
|
|
51986
52055
|
/*
|
|
51987
52056
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52023,7 +52092,7 @@ function getTokenKeys(clientId, storage, schemaVersion) {
|
|
|
52023
52092
|
};
|
|
52024
52093
|
}
|
|
52025
52094
|
|
|
52026
|
-
/*! @azure/msal-browser v4.
|
|
52095
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52027
52096
|
/*
|
|
52028
52097
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
52029
52098
|
* Licensed under the MIT License.
|
|
@@ -52034,7 +52103,7 @@ function isEncrypted(data) {
|
|
|
52034
52103
|
data.hasOwnProperty("data"));
|
|
52035
52104
|
}
|
|
52036
52105
|
|
|
52037
|
-
/*! @azure/msal-browser v4.
|
|
52106
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52038
52107
|
|
|
52039
52108
|
/*
|
|
52040
52109
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52324,7 +52393,7 @@ class LocalStorage {
|
|
|
52324
52393
|
}
|
|
52325
52394
|
}
|
|
52326
52395
|
|
|
52327
|
-
/*! @azure/msal-browser v4.
|
|
52396
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52328
52397
|
|
|
52329
52398
|
/*
|
|
52330
52399
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52366,7 +52435,7 @@ class SessionStorage {
|
|
|
52366
52435
|
}
|
|
52367
52436
|
}
|
|
52368
52437
|
|
|
52369
|
-
/*! @azure/msal-browser v4.
|
|
52438
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52370
52439
|
/*
|
|
52371
52440
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
52372
52441
|
* Licensed under the MIT License.
|
|
@@ -52401,7 +52470,7 @@ const EventType = {
|
|
|
52401
52470
|
BROKER_CONNECTION_ESTABLISHED: "msal:brokerConnectionEstablished",
|
|
52402
52471
|
};
|
|
52403
52472
|
|
|
52404
|
-
/*! @azure/msal-browser v4.
|
|
52473
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52405
52474
|
/*
|
|
52406
52475
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
52407
52476
|
* Licensed under the MIT License.
|
|
@@ -52418,7 +52487,7 @@ function removeElementFromArray(array, element) {
|
|
|
52418
52487
|
}
|
|
52419
52488
|
}
|
|
52420
52489
|
|
|
52421
|
-
/*! @azure/msal-browser v4.
|
|
52490
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
52422
52491
|
|
|
52423
52492
|
/*
|
|
52424
52493
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -52975,17 +53044,21 @@ class BrowserCacheManager extends CacheManager {
|
|
|
52975
53044
|
if (!parsedAccount || !AccountEntity.isAccountEntity(parsedAccount)) {
|
|
52976
53045
|
return null;
|
|
52977
53046
|
}
|
|
53047
|
+
this.performanceClient.addFields({
|
|
53048
|
+
accountCachedBy: apiIdToName(parsedAccount.cachedByApiId),
|
|
53049
|
+
}, correlationId);
|
|
52978
53050
|
return CacheManager.toObject(new AccountEntity(), parsedAccount);
|
|
52979
53051
|
}
|
|
52980
53052
|
/**
|
|
52981
53053
|
* set account entity in the platform cache
|
|
52982
53054
|
* @param account
|
|
52983
53055
|
*/
|
|
52984
|
-
async setAccount(account, correlationId, kmsi) {
|
|
53056
|
+
async setAccount(account, correlationId, kmsi, apiId) {
|
|
52985
53057
|
this.logger.trace("BrowserCacheManager.setAccount called");
|
|
52986
53058
|
const key = this.generateAccountKey(AccountEntity.getAccountInfo(account));
|
|
52987
53059
|
const timestamp = Date.now().toString();
|
|
52988
53060
|
account.lastUpdatedAt = timestamp;
|
|
53061
|
+
account.cachedByApiId = apiId;
|
|
52989
53062
|
await this.setUserData(key, JSON.stringify(account), correlationId, timestamp, kmsi);
|
|
52990
53063
|
const wasAdded = this.addAccountKeyToMap(key, correlationId);
|
|
52991
53064
|
this.performanceClient.addFields({ kmsi: kmsi }, correlationId);
|
|
@@ -53740,7 +53813,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53740
53813
|
* @param request
|
|
53741
53814
|
*/
|
|
53742
53815
|
async hydrateCache(result, request) {
|
|
53743
|
-
const idTokenEntity = createIdTokenEntity(result.account
|
|
53816
|
+
const idTokenEntity = createIdTokenEntity(result.account.homeAccountId, result.account.environment, result.idToken, this.clientId, result.tenantId);
|
|
53744
53817
|
let claimsHash;
|
|
53745
53818
|
if (request.claims) {
|
|
53746
53819
|
claimsHash = await this.cryptoImpl.hashString(request.claims);
|
|
@@ -53752,7 +53825,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53752
53825
|
*
|
|
53753
53826
|
* The next MSAL VFuture should map these both to same value if possible
|
|
53754
53827
|
*/
|
|
53755
|
-
const accessTokenEntity = createAccessTokenEntity(result.account
|
|
53828
|
+
const accessTokenEntity = createAccessTokenEntity(result.account.homeAccountId, result.account.environment, result.accessToken, this.clientId, result.tenantId, result.scopes.join(" "),
|
|
53756
53829
|
// Access token expiresOn stored in seconds, converting from AuthenticationResult expiresOn stored as Date
|
|
53757
53830
|
result.expiresOn
|
|
53758
53831
|
? toSecondsFromDate(result.expiresOn)
|
|
@@ -53765,7 +53838,7 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53765
53838
|
idToken: idTokenEntity,
|
|
53766
53839
|
accessToken: accessTokenEntity,
|
|
53767
53840
|
};
|
|
53768
|
-
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)));
|
|
53841
|
+
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)), ApiId.hydrateCache);
|
|
53769
53842
|
}
|
|
53770
53843
|
/**
|
|
53771
53844
|
* saves a cache record
|
|
@@ -53773,9 +53846,9 @@ class BrowserCacheManager extends CacheManager {
|
|
|
53773
53846
|
* @param storeInCache {?StoreInCache}
|
|
53774
53847
|
* @param correlationId {?string} correlation id
|
|
53775
53848
|
*/
|
|
53776
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
53849
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
53777
53850
|
try {
|
|
53778
|
-
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache);
|
|
53851
|
+
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache);
|
|
53779
53852
|
}
|
|
53780
53853
|
catch (e) {
|
|
53781
53854
|
if (e instanceof CacheError &&
|
|
@@ -53829,7 +53902,7 @@ const DEFAULT_BROWSER_CACHE_MANAGER = (clientId, logger, performanceClient, even
|
|
|
53829
53902
|
return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger, performanceClient, eventHandler);
|
|
53830
53903
|
};
|
|
53831
53904
|
|
|
53832
|
-
/*! @azure/msal-browser v4.
|
|
53905
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
53833
53906
|
/*
|
|
53834
53907
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
53835
53908
|
* Licensed under the MIT License.
|
|
@@ -53954,7 +54027,7 @@ function getActiveAccount(browserStorage, correlationId) {
|
|
|
53954
54027
|
return browserStorage.getActiveAccount(correlationId);
|
|
53955
54028
|
}
|
|
53956
54029
|
|
|
53957
|
-
/*! @azure/msal-browser v4.
|
|
54030
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
53958
54031
|
|
|
53959
54032
|
/*
|
|
53960
54033
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54060,7 +54133,7 @@ class EventHandler {
|
|
|
54060
54133
|
}
|
|
54061
54134
|
}
|
|
54062
54135
|
|
|
54063
|
-
/*! @azure/msal-browser v4.
|
|
54136
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54064
54137
|
|
|
54065
54138
|
/*
|
|
54066
54139
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54176,7 +54249,7 @@ class BaseInteractionClient {
|
|
|
54176
54249
|
}
|
|
54177
54250
|
}
|
|
54178
54251
|
|
|
54179
|
-
/*! @azure/msal-browser v4.
|
|
54252
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54180
54253
|
|
|
54181
54254
|
/*
|
|
54182
54255
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54261,7 +54334,7 @@ function validateRequestMethod(interactionRequest, protocolMode) {
|
|
|
54261
54334
|
return httpMethod;
|
|
54262
54335
|
}
|
|
54263
54336
|
|
|
54264
|
-
/*! @azure/msal-browser v4.
|
|
54337
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54265
54338
|
|
|
54266
54339
|
/*
|
|
54267
54340
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54465,7 +54538,7 @@ class StandardInteractionClient extends BaseInteractionClient {
|
|
|
54465
54538
|
}
|
|
54466
54539
|
}
|
|
54467
54540
|
|
|
54468
|
-
/*! @azure/msal-browser v4.
|
|
54541
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54469
54542
|
|
|
54470
54543
|
/*
|
|
54471
54544
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54489,7 +54562,7 @@ function extractBrowserRequestState(browserCrypto, state) {
|
|
|
54489
54562
|
}
|
|
54490
54563
|
}
|
|
54491
54564
|
|
|
54492
|
-
/*! @azure/msal-browser v4.
|
|
54565
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54493
54566
|
|
|
54494
54567
|
/*
|
|
54495
54568
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54528,7 +54601,7 @@ function validateInteractionType(response, browserCrypto, interactionType) {
|
|
|
54528
54601
|
}
|
|
54529
54602
|
}
|
|
54530
54603
|
|
|
54531
|
-
/*! @azure/msal-browser v4.
|
|
54604
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54532
54605
|
|
|
54533
54606
|
/*
|
|
54534
54607
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54549,7 +54622,7 @@ class InteractionHandler {
|
|
|
54549
54622
|
* Function to handle response parameters from hash.
|
|
54550
54623
|
* @param locationHash
|
|
54551
54624
|
*/
|
|
54552
|
-
async handleCodeResponse(response, request) {
|
|
54625
|
+
async handleCodeResponse(response, request, apiId) {
|
|
54553
54626
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponse, request.correlationId);
|
|
54554
54627
|
let authCodeResponse;
|
|
54555
54628
|
try {
|
|
@@ -54565,7 +54638,7 @@ class InteractionHandler {
|
|
|
54565
54638
|
throw e;
|
|
54566
54639
|
}
|
|
54567
54640
|
}
|
|
54568
|
-
return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request);
|
|
54641
|
+
return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request, apiId);
|
|
54569
54642
|
}
|
|
54570
54643
|
/**
|
|
54571
54644
|
* Process auth code response from AAD
|
|
@@ -54575,7 +54648,7 @@ class InteractionHandler {
|
|
|
54575
54648
|
* @param networkModule
|
|
54576
54649
|
* @returns
|
|
54577
54650
|
*/
|
|
54578
|
-
async handleCodeResponseFromServer(authCodeResponse, request, validateNonce = true) {
|
|
54651
|
+
async handleCodeResponseFromServer(authCodeResponse, request, apiId, validateNonce = true) {
|
|
54579
54652
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponseFromServer, request.correlationId);
|
|
54580
54653
|
this.logger.trace("InteractionHandler.handleCodeResponseFromServer called");
|
|
54581
54654
|
// Assign code to request
|
|
@@ -54601,7 +54674,7 @@ class InteractionHandler {
|
|
|
54601
54674
|
}
|
|
54602
54675
|
}
|
|
54603
54676
|
// Acquire token with retrieved code.
|
|
54604
|
-
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, authCodeResponse));
|
|
54677
|
+
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, apiId, authCodeResponse));
|
|
54605
54678
|
return tokenResponse;
|
|
54606
54679
|
}
|
|
54607
54680
|
/**
|
|
@@ -54624,7 +54697,7 @@ class InteractionHandler {
|
|
|
54624
54697
|
}
|
|
54625
54698
|
}
|
|
54626
54699
|
|
|
54627
|
-
/*! @azure/msal-browser v4.
|
|
54700
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54628
54701
|
/*
|
|
54629
54702
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
54630
54703
|
* Licensed under the MIT License.
|
|
@@ -54633,7 +54706,7 @@ const contentError = "ContentError";
|
|
|
54633
54706
|
const pageException = "PageException";
|
|
54634
54707
|
const userSwitch = "user_switch";
|
|
54635
54708
|
|
|
54636
|
-
/*! @azure/msal-browser v4.
|
|
54709
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54637
54710
|
/*
|
|
54638
54711
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
54639
54712
|
* Licensed under the MIT License.
|
|
@@ -54646,7 +54719,7 @@ const DISABLED = "DISABLED";
|
|
|
54646
54719
|
const ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE";
|
|
54647
54720
|
const UX_NOT_ALLOWED = "UX_NOT_ALLOWED";
|
|
54648
54721
|
|
|
54649
|
-
/*! @azure/msal-browser v4.
|
|
54722
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54650
54723
|
|
|
54651
54724
|
/*
|
|
54652
54725
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54711,7 +54784,7 @@ function createNativeAuthError(code, description, ext) {
|
|
|
54711
54784
|
return new NativeAuthError(code, NativeAuthErrorMessages[code] || description, ext);
|
|
54712
54785
|
}
|
|
54713
54786
|
|
|
54714
|
-
/*! @azure/msal-browser v4.
|
|
54787
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54715
54788
|
|
|
54716
54789
|
/*
|
|
54717
54790
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -54761,7 +54834,7 @@ class SilentCacheClient extends StandardInteractionClient {
|
|
|
54761
54834
|
}
|
|
54762
54835
|
}
|
|
54763
54836
|
|
|
54764
|
-
/*! @azure/msal-browser v4.
|
|
54837
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
54765
54838
|
|
|
54766
54839
|
/*
|
|
54767
54840
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55157,7 +55230,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
55157
55230
|
*/
|
|
55158
55231
|
async cacheAccount(accountEntity, correlationId, kmsi) {
|
|
55159
55232
|
// Store the account info and hence `nativeAccountId` in browser cache
|
|
55160
|
-
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi);
|
|
55233
|
+
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi, this.apiId);
|
|
55161
55234
|
// Remove any existing cached tokens for this account in browser storage
|
|
55162
55235
|
this.browserStorage.removeAccountContext(AccountEntity.getAccountInfo(accountEntity), correlationId);
|
|
55163
55236
|
}
|
|
@@ -55186,7 +55259,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
55186
55259
|
idToken: cachedIdToken,
|
|
55187
55260
|
accessToken: cachedAccessToken,
|
|
55188
55261
|
};
|
|
55189
|
-
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), request.storeInCache);
|
|
55262
|
+
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, request.storeInCache);
|
|
55190
55263
|
}
|
|
55191
55264
|
getExpiresInValue(tokenType, expiresIn) {
|
|
55192
55265
|
return tokenType === AuthenticationScheme.POP
|
|
@@ -55388,7 +55461,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
55388
55461
|
}
|
|
55389
55462
|
}
|
|
55390
55463
|
|
|
55391
|
-
/*! @azure/msal-browser v4.
|
|
55464
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55392
55465
|
|
|
55393
55466
|
/*
|
|
55394
55467
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55563,7 +55636,7 @@ async function handleResponseCode(request, response, codeVerifier, apiId, config
|
|
|
55563
55636
|
// Create popup interaction handler.
|
|
55564
55637
|
const interactionHandler = new InteractionHandler(authClient, browserStorage, authCodeRequest, logger, performanceClient);
|
|
55565
55638
|
// Handle response from hash string.
|
|
55566
|
-
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request);
|
|
55639
|
+
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request, apiId);
|
|
55567
55640
|
return result;
|
|
55568
55641
|
}
|
|
55569
55642
|
/**
|
|
@@ -55610,10 +55683,10 @@ async function handleResponseEAR(request, response, apiId, config, authority, br
|
|
|
55610
55683
|
cloud_instance_name: decryptedData.cloud_instance_name,
|
|
55611
55684
|
msgraph_host: decryptedData.msgraph_host,
|
|
55612
55685
|
};
|
|
55613
|
-
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, additionalData, undefined, undefined, undefined, undefined));
|
|
55686
|
+
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, apiId, additionalData, undefined, undefined, undefined, undefined));
|
|
55614
55687
|
}
|
|
55615
55688
|
|
|
55616
|
-
/*! @azure/msal-browser v4.
|
|
55689
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55617
55690
|
|
|
55618
55691
|
/*
|
|
55619
55692
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55670,7 +55743,7 @@ async function generateCodeChallengeFromVerifier(pkceCodeVerifier, performanceCl
|
|
|
55670
55743
|
}
|
|
55671
55744
|
}
|
|
55672
55745
|
|
|
55673
|
-
/*! @azure/msal-browser v4.
|
|
55746
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55674
55747
|
|
|
55675
55748
|
/*
|
|
55676
55749
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -55935,7 +56008,7 @@ class PlatformAuthExtensionHandler {
|
|
|
55935
56008
|
}
|
|
55936
56009
|
}
|
|
55937
56010
|
|
|
55938
|
-
/*! @azure/msal-browser v4.
|
|
56011
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
55939
56012
|
|
|
55940
56013
|
/*
|
|
55941
56014
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -56072,7 +56145,7 @@ class PlatformAuthDOMHandler {
|
|
|
56072
56145
|
}
|
|
56073
56146
|
}
|
|
56074
56147
|
|
|
56075
|
-
/*! @azure/msal-browser v4.
|
|
56148
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
56076
56149
|
async function getPlatformAuthProvider(logger, performanceClient, correlationId, nativeBrokerHandshakeTimeout, enablePlatformBrokerDOMSupport) {
|
|
56077
56150
|
logger.trace("getPlatformAuthProvider called", correlationId);
|
|
56078
56151
|
logger.trace("Has client allowed platform auth via DOM API: " +
|
|
@@ -56137,7 +56210,7 @@ function isPlatformAuthAllowed(config, logger, platformAuthProvider, authenticat
|
|
|
56137
56210
|
return true;
|
|
56138
56211
|
}
|
|
56139
56212
|
|
|
56140
|
-
/*! @azure/msal-browser v4.
|
|
56213
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
56141
56214
|
|
|
56142
56215
|
/*
|
|
56143
56216
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -56634,7 +56707,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
56634
56707
|
}
|
|
56635
56708
|
}
|
|
56636
56709
|
|
|
56637
|
-
/*! @azure/msal-browser v4.
|
|
56710
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
56638
56711
|
|
|
56639
56712
|
/*
|
|
56640
56713
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57074,7 +57147,7 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
57074
57147
|
}
|
|
57075
57148
|
}
|
|
57076
57149
|
|
|
57077
|
-
/*! @azure/msal-browser v4.
|
|
57150
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57078
57151
|
|
|
57079
57152
|
/*
|
|
57080
57153
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57230,7 +57303,7 @@ function removeHiddenIframe(iframe) {
|
|
|
57230
57303
|
}
|
|
57231
57304
|
}
|
|
57232
57305
|
|
|
57233
|
-
/*! @azure/msal-browser v4.
|
|
57306
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57234
57307
|
|
|
57235
57308
|
/*
|
|
57236
57309
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57391,7 +57464,7 @@ class SilentIframeClient extends StandardInteractionClient {
|
|
|
57391
57464
|
}
|
|
57392
57465
|
}
|
|
57393
57466
|
|
|
57394
|
-
/*! @azure/msal-browser v4.
|
|
57467
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57395
57468
|
|
|
57396
57469
|
/*
|
|
57397
57470
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57421,7 +57494,7 @@ class SilentRefreshClient extends StandardInteractionClient {
|
|
|
57421
57494
|
account: silentRequest.account,
|
|
57422
57495
|
});
|
|
57423
57496
|
// Send request to renew token. Auth module will throw errors if token cannot be renewed.
|
|
57424
|
-
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest).catch((e) => {
|
|
57497
|
+
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch((e) => {
|
|
57425
57498
|
e.setCorrelationId(this.correlationId);
|
|
57426
57499
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
57427
57500
|
throw e;
|
|
@@ -57457,7 +57530,7 @@ class SilentRefreshClient extends StandardInteractionClient {
|
|
|
57457
57530
|
}
|
|
57458
57531
|
}
|
|
57459
57532
|
|
|
57460
|
-
/*! @azure/msal-browser v4.
|
|
57533
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57461
57534
|
|
|
57462
57535
|
/*
|
|
57463
57536
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57467,12 +57540,13 @@ class SilentRefreshClient extends StandardInteractionClient {
|
|
|
57467
57540
|
* Token cache manager
|
|
57468
57541
|
*/
|
|
57469
57542
|
class TokenCache {
|
|
57470
|
-
constructor(configuration, storage, logger, cryptoObj) {
|
|
57543
|
+
constructor(configuration, storage, logger, cryptoObj, performanceClient) {
|
|
57471
57544
|
this.isBrowserEnvironment = typeof window !== "undefined";
|
|
57472
57545
|
this.config = configuration;
|
|
57473
57546
|
this.storage = storage;
|
|
57474
57547
|
this.logger = logger;
|
|
57475
57548
|
this.cryptoObj = cryptoObj;
|
|
57549
|
+
this.performanceClient = performanceClient;
|
|
57476
57550
|
}
|
|
57477
57551
|
// Move getAllAccounts here and cache utility APIs
|
|
57478
57552
|
/**
|
|
@@ -57487,30 +57561,37 @@ class TokenCache {
|
|
|
57487
57561
|
throw createBrowserAuthError(nonBrowserEnvironment);
|
|
57488
57562
|
}
|
|
57489
57563
|
const correlationId = request.correlationId || createNewGuid();
|
|
57490
|
-
const
|
|
57491
|
-
|
|
57492
|
-
|
|
57493
|
-
|
|
57494
|
-
|
|
57495
|
-
|
|
57496
|
-
|
|
57497
|
-
|
|
57498
|
-
|
|
57499
|
-
|
|
57500
|
-
|
|
57501
|
-
|
|
57502
|
-
|
|
57503
|
-
|
|
57504
|
-
|
|
57505
|
-
|
|
57506
|
-
|
|
57507
|
-
|
|
57508
|
-
|
|
57509
|
-
|
|
57510
|
-
|
|
57511
|
-
|
|
57512
|
-
|
|
57513
|
-
|
|
57564
|
+
const rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.LoadExternalTokens, correlationId);
|
|
57565
|
+
try {
|
|
57566
|
+
const idTokenClaims = response.id_token
|
|
57567
|
+
? extractTokenClaims(response.id_token, base64Decode)
|
|
57568
|
+
: undefined;
|
|
57569
|
+
const kmsi = isKmsi(idTokenClaims || {});
|
|
57570
|
+
const authorityOptions = {
|
|
57571
|
+
protocolMode: this.config.auth.protocolMode,
|
|
57572
|
+
knownAuthorities: this.config.auth.knownAuthorities,
|
|
57573
|
+
cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
|
|
57574
|
+
authorityMetadata: this.config.auth.authorityMetadata,
|
|
57575
|
+
skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
|
|
57576
|
+
};
|
|
57577
|
+
const authorityString = request.authority || this.config.auth.authority;
|
|
57578
|
+
const authority = await createDiscoveredInstance(Authority.generateAuthority(authorityString, request.azureCloudOptions), this.config.system.networkClient, this.storage, authorityOptions, this.logger, correlationId, this.performanceClient);
|
|
57579
|
+
const cacheRecordAccount = await invokeAsync(this.loadAccount.bind(this), PerformanceEvents.LoadAccount, this.logger, this.performanceClient, correlationId)(request, options.clientInfo || response.client_info || "", correlationId, authority, idTokenClaims);
|
|
57580
|
+
const idToken = await invokeAsync(this.loadIdToken.bind(this), PerformanceEvents.LoadIdToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, correlationId, kmsi);
|
|
57581
|
+
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);
|
|
57582
|
+
const refreshToken = await invokeAsync(this.loadRefreshToken.bind(this), PerformanceEvents.LoadRefreshToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, correlationId, kmsi);
|
|
57583
|
+
rootMeasurement.end({ success: true }, undefined, AccountEntity.getAccountInfo(cacheRecordAccount));
|
|
57584
|
+
return this.generateAuthenticationResult(request, {
|
|
57585
|
+
account: cacheRecordAccount,
|
|
57586
|
+
idToken,
|
|
57587
|
+
accessToken,
|
|
57588
|
+
refreshToken,
|
|
57589
|
+
}, authority, idTokenClaims);
|
|
57590
|
+
}
|
|
57591
|
+
catch (error) {
|
|
57592
|
+
rootMeasurement.end({ success: false }, error);
|
|
57593
|
+
throw error;
|
|
57594
|
+
}
|
|
57514
57595
|
}
|
|
57515
57596
|
/**
|
|
57516
57597
|
* Helper function to load account to msal-browser cache
|
|
@@ -57521,23 +57602,23 @@ class TokenCache {
|
|
|
57521
57602
|
* @param requestHomeAccountId
|
|
57522
57603
|
* @returns `AccountEntity`
|
|
57523
57604
|
*/
|
|
57524
|
-
async loadAccount(request, clientInfo, correlationId,
|
|
57605
|
+
async loadAccount(request, clientInfo, correlationId, authority, idTokenClaims) {
|
|
57525
57606
|
this.logger.verbose("TokenCache - loading account");
|
|
57526
57607
|
if (request.account) {
|
|
57527
57608
|
const accountEntity = AccountEntity.createFromAccountInfo(request.account);
|
|
57528
|
-
await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}));
|
|
57609
|
+
await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
57529
57610
|
return accountEntity;
|
|
57530
57611
|
}
|
|
57531
|
-
else if (!
|
|
57532
|
-
this.logger.error("TokenCache - if an account is not provided on the request,
|
|
57612
|
+
else if (!clientInfo && !idTokenClaims) {
|
|
57613
|
+
this.logger.error("TokenCache - if an account is not provided on the request, clientInfo or idToken must be provided instead.");
|
|
57533
57614
|
throw createBrowserAuthError(unableToLoadToken);
|
|
57534
57615
|
}
|
|
57535
57616
|
const homeAccountId = AccountEntity.generateHomeAccountId(clientInfo, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims);
|
|
57536
57617
|
const claimsTenantId = idTokenClaims?.tid;
|
|
57537
|
-
const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.
|
|
57618
|
+
const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.getPreferredCache(), claimsTenantId, undefined, // authCodePayload
|
|
57538
57619
|
undefined, // nativeAccountId
|
|
57539
57620
|
this.logger);
|
|
57540
|
-
await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}));
|
|
57621
|
+
await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
57541
57622
|
return cachedAccount;
|
|
57542
57623
|
}
|
|
57543
57624
|
/**
|
|
@@ -57606,9 +57687,15 @@ class TokenCache {
|
|
|
57606
57687
|
this.logger.verbose("TokenCache - no refresh token found in response");
|
|
57607
57688
|
return null;
|
|
57608
57689
|
}
|
|
57690
|
+
const expiresOn = response.refresh_token_expires_in
|
|
57691
|
+
? response.refresh_token_expires_in + nowSeconds()
|
|
57692
|
+
: undefined;
|
|
57693
|
+
this.performanceClient.addFields({
|
|
57694
|
+
extRtExpiresOnSeconds: expiresOn,
|
|
57695
|
+
}, correlationId);
|
|
57609
57696
|
this.logger.verbose("TokenCache - loading refresh token");
|
|
57610
57697
|
const refreshTokenEntity = createRefreshTokenEntity(homeAccountId, environment, response.refresh_token, this.config.auth.clientId, response.foci, undefined, // userAssertionHash
|
|
57611
|
-
|
|
57698
|
+
expiresOn);
|
|
57612
57699
|
await this.storage.setRefreshTokenCredential(refreshTokenEntity, correlationId, kmsi);
|
|
57613
57700
|
return refreshTokenEntity;
|
|
57614
57701
|
}
|
|
@@ -57620,7 +57707,7 @@ class TokenCache {
|
|
|
57620
57707
|
* @param authority
|
|
57621
57708
|
* @returns `AuthenticationResult`
|
|
57622
57709
|
*/
|
|
57623
|
-
generateAuthenticationResult(request, cacheRecord,
|
|
57710
|
+
generateAuthenticationResult(request, cacheRecord, authority, idTokenClaims) {
|
|
57624
57711
|
let accessToken = "";
|
|
57625
57712
|
let responseScopes = [];
|
|
57626
57713
|
let expiresOn = null;
|
|
@@ -57657,7 +57744,7 @@ class TokenCache {
|
|
|
57657
57744
|
}
|
|
57658
57745
|
}
|
|
57659
57746
|
|
|
57660
|
-
/*! @azure/msal-browser v4.
|
|
57747
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57661
57748
|
|
|
57662
57749
|
/*
|
|
57663
57750
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57670,7 +57757,7 @@ class HybridSpaAuthorizationCodeClient extends AuthorizationCodeClient {
|
|
|
57670
57757
|
}
|
|
57671
57758
|
}
|
|
57672
57759
|
|
|
57673
|
-
/*! @azure/msal-browser v4.
|
|
57760
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57674
57761
|
|
|
57675
57762
|
/*
|
|
57676
57763
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57717,7 +57804,7 @@ class SilentAuthCodeClient extends StandardInteractionClient {
|
|
|
57717
57804
|
msgraph_host: request.msGraphHost,
|
|
57718
57805
|
cloud_graph_host_name: request.cloudGraphHostName,
|
|
57719
57806
|
cloud_instance_host_name: request.cloudInstanceHostName,
|
|
57720
|
-
}, silentRequest, false);
|
|
57807
|
+
}, silentRequest, this.apiId, false);
|
|
57721
57808
|
}
|
|
57722
57809
|
catch (e) {
|
|
57723
57810
|
if (e instanceof AuthError) {
|
|
@@ -57736,7 +57823,7 @@ class SilentAuthCodeClient extends StandardInteractionClient {
|
|
|
57736
57823
|
}
|
|
57737
57824
|
}
|
|
57738
57825
|
|
|
57739
|
-
/*! @azure/msal-browser v4.
|
|
57826
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57740
57827
|
/*
|
|
57741
57828
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
57742
57829
|
* Licensed under the MIT License.
|
|
@@ -57756,7 +57843,7 @@ function collectInstanceStats(currentClientId, performanceEvent, logger) {
|
|
|
57756
57843
|
});
|
|
57757
57844
|
}
|
|
57758
57845
|
|
|
57759
|
-
/*! @azure/msal-browser v4.
|
|
57846
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
57760
57847
|
|
|
57761
57848
|
/*
|
|
57762
57849
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -57833,7 +57920,7 @@ class StandardController {
|
|
|
57833
57920
|
};
|
|
57834
57921
|
this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler);
|
|
57835
57922
|
// Initialize the token cache
|
|
57836
|
-
this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);
|
|
57923
|
+
this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto, this.performanceClient);
|
|
57837
57924
|
this.activeSilentTokenRequests = new Map();
|
|
57838
57925
|
// Register listener functions
|
|
57839
57926
|
this.trackPageVisibility = this.trackPageVisibility.bind(this);
|
|
@@ -58663,7 +58750,7 @@ class StandardController {
|
|
|
58663
58750
|
this.logger.verbose("hydrateCache called");
|
|
58664
58751
|
// Account gets saved to browser storage regardless of native or not
|
|
58665
58752
|
const accountEntity = AccountEntity.createFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
|
|
58666
|
-
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims));
|
|
58753
|
+
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims), ApiId.hydrateCache);
|
|
58667
58754
|
if (result.fromNativeBroker) {
|
|
58668
58755
|
this.logger.verbose("Response was from native broker, storing in-memory");
|
|
58669
58756
|
// Tokens from native broker are stored in-memory
|
|
@@ -59209,7 +59296,7 @@ function checkIfRefreshTokenErrorCanBeResolvedSilently(refreshTokenError, cacheL
|
|
|
59209
59296
|
return isSilentlyResolvable && tryIframeRenewal;
|
|
59210
59297
|
}
|
|
59211
59298
|
|
|
59212
|
-
/*! @azure/msal-browser v4.
|
|
59299
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
59213
59300
|
|
|
59214
59301
|
/*
|
|
59215
59302
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -59221,7 +59308,7 @@ async function createV3Controller(config, request) {
|
|
|
59221
59308
|
return StandardController.createController(standard, request);
|
|
59222
59309
|
}
|
|
59223
59310
|
|
|
59224
|
-
/*! @azure/msal-browser v4.
|
|
59311
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
59225
59312
|
|
|
59226
59313
|
/*
|
|
59227
59314
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|