@azure/msal-common 14.16.0 → 15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/AccountInfo.mjs +1 -1
- package/dist/account/AuthToken.mjs +1 -1
- package/dist/account/CcsCredential.mjs +1 -1
- package/dist/account/ClientInfo.mjs +1 -1
- package/dist/account/TokenClaims.mjs +1 -1
- package/dist/authority/Authority.mjs +1 -1
- package/dist/authority/Authority.mjs.map +1 -1
- package/dist/authority/AuthorityFactory.mjs +1 -1
- package/dist/authority/AuthorityMetadata.mjs +1 -1
- package/dist/authority/AuthorityOptions.mjs +1 -1
- package/dist/authority/AuthorityType.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
- package/dist/authority/OpenIdConfigResponse.mjs +1 -1
- package/dist/authority/ProtocolMode.mjs +1 -1
- package/dist/authority/RegionDiscovery.mjs +1 -1
- package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +1 -0
- package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -1
- package/dist/cache/CacheManager.d.ts +15 -35
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.mjs +13 -77
- package/dist/cache/CacheManager.mjs.map +1 -1
- package/dist/cache/entities/AccountEntity.mjs +1 -1
- package/dist/cache/interface/ICacheManager.d.ts +5 -5
- package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/CacheHelpers.mjs +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +2 -2
- package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
- package/dist/client/BaseClient.mjs +1 -1
- package/dist/client/RefreshTokenClient.mjs +1 -1
- package/dist/client/SilentFlowClient.mjs +1 -1
- package/dist/config/ClientConfiguration.mjs +1 -1
- package/dist/constants/AADServerParamKeys.mjs +1 -1
- package/dist/crypto/ICrypto.mjs +1 -1
- package/dist/crypto/JoseHeader.mjs +1 -1
- package/dist/crypto/PopTokenGenerator.mjs +1 -1
- package/dist/error/AuthError.mjs +1 -1
- package/dist/error/AuthErrorCodes.mjs +1 -1
- package/dist/error/CacheError.mjs +1 -1
- package/dist/error/CacheErrorCodes.mjs +1 -1
- package/dist/error/ClientAuthError.mjs +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +1 -1
- package/dist/error/ClientConfigurationError.d.ts +2 -2
- package/dist/error/ClientConfigurationError.mjs +6 -6
- package/dist/error/ClientConfigurationError.mjs.map +1 -1
- package/dist/error/ClientConfigurationErrorCodes.d.ts +1 -1
- package/dist/error/ClientConfigurationErrorCodes.d.ts.map +1 -1
- package/dist/error/ClientConfigurationErrorCodes.mjs +3 -3
- package/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
- package/dist/error/JoseHeaderError.mjs +1 -1
- package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
- package/dist/error/NetworkError.mjs +1 -1
- package/dist/error/ServerError.mjs +1 -1
- package/dist/index-browser.mjs +1 -1
- package/dist/index-node.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/logger/Logger.mjs +1 -1
- package/dist/network/INetworkModule.mjs +1 -1
- package/dist/network/ThrottlingUtils.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.d.ts.map +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/AuthenticationHeaderParser.mjs +1 -1
- package/dist/request/CommonAuthorizationUrlRequest.d.ts +1 -1
- package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.mjs +1 -1
- package/dist/request/RequestValidator.mjs +1 -1
- package/dist/request/ScopeSet.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +4 -4
- package/dist/response/ResponseHandler.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
- package/dist/telemetry/performance/PerformanceEvent.d.ts +11 -2
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +21 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
- package/dist/url/UrlString.mjs +1 -1
- package/dist/url/UrlString.mjs.map +1 -1
- package/dist/utils/ClientAssertionUtils.mjs +1 -1
- package/dist/utils/Constants.d.ts +0 -6
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +1 -7
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/FunctionWrappers.mjs +1 -1
- package/dist/utils/ProtocolUtils.mjs +1 -1
- package/dist/utils/StringUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/UrlUtils.mjs +1 -1
- package/lib/index-browser.cjs +2 -2
- package/lib/{index-node-C9XsExml.js → index-node-uiuRUOAe.js} +44 -94
- package/lib/index-node-uiuRUOAe.js.map +1 -0
- package/lib/index-node.cjs +2 -2
- package/lib/index.cjs +2 -2
- package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts +1 -0
- package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -1
- package/lib/types/cache/CacheManager.d.ts +15 -35
- package/lib/types/cache/CacheManager.d.ts.map +1 -1
- package/lib/types/cache/interface/ICacheManager.d.ts +5 -5
- package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -1
- package/lib/types/error/ClientConfigurationError.d.ts +2 -2
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts +1 -1
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/packageMetadata.d.ts.map +1 -1
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +1 -1
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts +11 -2
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/lib/types/utils/Constants.d.ts +0 -6
- package/lib/types/utils/Constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cache/CacheManager.ts +44 -128
- package/src/cache/interface/ICacheManager.ts +14 -4
- package/src/client/AuthorizationCodeClient.ts +1 -1
- package/src/error/ClientConfigurationError.ts +5 -5
- package/src/error/ClientConfigurationErrorCodes.ts +1 -1
- package/src/packageMetadata.ts +1 -1
- package/src/request/CommonAuthorizationUrlRequest.ts +1 -1
- package/src/response/ResponseHandler.ts +4 -4
- package/src/telemetry/performance/PerformanceEvent.ts +23 -2
- package/src/utils/Constants.ts +0 -6
- package/lib/index-node-C9XsExml.js.map +0 -1
package/lib/index-browser.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v15.0.1 2025-01-15 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
var indexNode = require('./index-node-
|
|
5
|
+
var indexNode = require('./index-node-uiuRUOAe.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v15.0.1 2025-01-15 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -108,12 +108,6 @@ const HeaderNames = {
|
|
|
108
108
|
* Persistent cache keys MSAL which stay while user is logged in.
|
|
109
109
|
*/
|
|
110
110
|
const PersistentCacheKeys = {
|
|
111
|
-
ID_TOKEN: "idtoken",
|
|
112
|
-
CLIENT_INFO: "client.info",
|
|
113
|
-
ADAL_ID_TOKEN: "adal.idtoken",
|
|
114
|
-
ERROR: "error",
|
|
115
|
-
ERROR_DESC: "error.description",
|
|
116
|
-
ACTIVE_ACCOUNT: "active-account",
|
|
117
111
|
ACTIVE_ACCOUNT_FILTERS: "active-account-filters", // new cache entry for active_account for a more robust version for browser
|
|
118
112
|
};
|
|
119
113
|
/**
|
|
@@ -851,14 +845,14 @@ const missingSshKid = "missing_ssh_kid";
|
|
|
851
845
|
const missingNonceAuthenticationHeader = "missing_nonce_authentication_header";
|
|
852
846
|
const invalidAuthenticationHeader = "invalid_authentication_header";
|
|
853
847
|
const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
|
|
854
|
-
const
|
|
848
|
+
const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
|
|
855
849
|
const authorityMismatch = "authority_mismatch";
|
|
856
850
|
|
|
857
851
|
var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
858
852
|
__proto__: null,
|
|
859
853
|
authorityMismatch: authorityMismatch,
|
|
860
854
|
authorityUriInsecure: authorityUriInsecure,
|
|
861
|
-
|
|
855
|
+
cannotAllowPlatformBroker: cannotAllowPlatformBroker,
|
|
862
856
|
cannotSetOIDCOptions: cannotSetOIDCOptions,
|
|
863
857
|
claimsRequestParsingError: claimsRequestParsingError,
|
|
864
858
|
emptyInputScopesError: emptyInputScopesError,
|
|
@@ -905,7 +899,7 @@ const ClientConfigurationErrorMessages = {
|
|
|
905
899
|
[missingNonceAuthenticationHeader]: "Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",
|
|
906
900
|
[invalidAuthenticationHeader]: "Invalid authentication header provided",
|
|
907
901
|
[cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",
|
|
908
|
-
[
|
|
902
|
+
[cannotAllowPlatformBroker]: "Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",
|
|
909
903
|
[authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",
|
|
910
904
|
};
|
|
911
905
|
/**
|
|
@@ -993,9 +987,9 @@ const ClientConfigurationErrorMessage = {
|
|
|
993
987
|
code: cannotSetOIDCOptions,
|
|
994
988
|
desc: ClientConfigurationErrorMessages[cannotSetOIDCOptions],
|
|
995
989
|
},
|
|
996
|
-
|
|
997
|
-
code:
|
|
998
|
-
desc: ClientConfigurationErrorMessages[
|
|
990
|
+
cannotAllowPlatformBroker: {
|
|
991
|
+
code: cannotAllowPlatformBroker,
|
|
992
|
+
desc: ClientConfigurationErrorMessages[cannotAllowPlatformBroker],
|
|
999
993
|
},
|
|
1000
994
|
authorityMismatch: {
|
|
1001
995
|
code: authorityMismatch,
|
|
@@ -1669,6 +1663,7 @@ const PerformanceEvents = {
|
|
|
1669
1663
|
*/
|
|
1670
1664
|
InitializeSilentRequest: "initializeSilentRequest",
|
|
1671
1665
|
InitializeClientApplication: "initializeClientApplication",
|
|
1666
|
+
InitializeCache: "initializeCache",
|
|
1672
1667
|
/**
|
|
1673
1668
|
* Helper function in SilentIframeClient class (msal-browser).
|
|
1674
1669
|
*/
|
|
@@ -1746,6 +1741,8 @@ const PerformanceEvents = {
|
|
|
1746
1741
|
*/
|
|
1747
1742
|
ClearTokensAndKeysWithClaims: "clearTokensAndKeysWithClaims",
|
|
1748
1743
|
CacheManagerGetRefreshToken: "cacheManagerGetRefreshToken",
|
|
1744
|
+
ImportExistingCache: "importExistingCache",
|
|
1745
|
+
SetUserData: "setUserData",
|
|
1749
1746
|
/**
|
|
1750
1747
|
* Crypto Operations
|
|
1751
1748
|
*/
|
|
@@ -1754,6 +1751,12 @@ const PerformanceEvents = {
|
|
|
1754
1751
|
GenerateCodeChallengeFromVerifier: "generateCodeChallengeFromVerifier",
|
|
1755
1752
|
Sha256Digest: "sha256Digest",
|
|
1756
1753
|
GetRandomValues: "getRandomValues",
|
|
1754
|
+
GenerateHKDF: "generateHKDF",
|
|
1755
|
+
GenerateBaseKey: "generateBaseKey",
|
|
1756
|
+
Base64Decode: "base64Decode",
|
|
1757
|
+
UrlEncodeArr: "urlEncodeArr",
|
|
1758
|
+
Encrypt: "encrypt",
|
|
1759
|
+
Decrypt: "decrypt",
|
|
1757
1760
|
};
|
|
1758
1761
|
const PerformanceEventAbbreviations = new Map([
|
|
1759
1762
|
[PerformanceEvents.AcquireTokenByCode, "ATByCode"],
|
|
@@ -1838,6 +1841,9 @@ const PerformanceEventAbbreviations = new Map([
|
|
|
1838
1841
|
PerformanceEvents.InitializeClientApplication,
|
|
1839
1842
|
"InitClientApplication",
|
|
1840
1843
|
],
|
|
1844
|
+
[PerformanceEvents.InitializeCache, "InitCache"],
|
|
1845
|
+
[PerformanceEvents.ImportExistingCache, "importCache"],
|
|
1846
|
+
[PerformanceEvents.SetUserData, "setUserData"],
|
|
1841
1847
|
[PerformanceEvents.SilentIframeClientTokenHelper, "SIClientTHelper"],
|
|
1842
1848
|
[
|
|
1843
1849
|
PerformanceEvents.SilentHandlerInitiateAuthRequest,
|
|
@@ -1971,6 +1977,12 @@ const PerformanceEventAbbreviations = new Map([
|
|
|
1971
1977
|
],
|
|
1972
1978
|
[PerformanceEvents.Sha256Digest, "Sha256Digest"],
|
|
1973
1979
|
[PerformanceEvents.GetRandomValues, "GetRandomValues"],
|
|
1980
|
+
[PerformanceEvents.GenerateHKDF, "genHKDF"],
|
|
1981
|
+
[PerformanceEvents.GenerateBaseKey, "genBaseKey"],
|
|
1982
|
+
[PerformanceEvents.Base64Decode, "b64Decode"],
|
|
1983
|
+
[PerformanceEvents.UrlEncodeArr, "urlEncArr"],
|
|
1984
|
+
[PerformanceEvents.Encrypt, "encrypt"],
|
|
1985
|
+
[PerformanceEvents.Decrypt, "decrypt"],
|
|
1974
1986
|
]);
|
|
1975
1987
|
/**
|
|
1976
1988
|
* State of the performance event.
|
|
@@ -1996,6 +2008,8 @@ const IntFields = new Set([
|
|
|
1996
2008
|
"multiMatchedAT",
|
|
1997
2009
|
"multiMatchedID",
|
|
1998
2010
|
"multiMatchedRT",
|
|
2011
|
+
"unencryptedCacheCount",
|
|
2012
|
+
"encryptedCacheExpiredCount",
|
|
1999
2013
|
]);
|
|
2000
2014
|
|
|
2001
2015
|
/*
|
|
@@ -3816,7 +3830,7 @@ class Logger {
|
|
|
3816
3830
|
|
|
3817
3831
|
/* eslint-disable header/header */
|
|
3818
3832
|
const name = "@azure/msal-common";
|
|
3819
|
-
const version = "
|
|
3833
|
+
const version = "15.0.1";
|
|
3820
3834
|
|
|
3821
3835
|
/*
|
|
3822
3836
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4595,24 +4609,24 @@ class CacheManager {
|
|
|
4595
4609
|
* @param storeInCache {?StoreInCache}
|
|
4596
4610
|
* @param correlationId {?string} correlation id
|
|
4597
4611
|
*/
|
|
4598
|
-
async saveCacheRecord(cacheRecord,
|
|
4612
|
+
async saveCacheRecord(cacheRecord, correlationId, storeInCache) {
|
|
4599
4613
|
if (!cacheRecord) {
|
|
4600
4614
|
throw createClientAuthError(invalidCacheRecord);
|
|
4601
4615
|
}
|
|
4602
4616
|
try {
|
|
4603
4617
|
if (!!cacheRecord.account) {
|
|
4604
|
-
this.setAccount(cacheRecord.account);
|
|
4618
|
+
await this.setAccount(cacheRecord.account, correlationId);
|
|
4605
4619
|
}
|
|
4606
4620
|
if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
|
|
4607
|
-
this.setIdTokenCredential(cacheRecord.idToken);
|
|
4621
|
+
await this.setIdTokenCredential(cacheRecord.idToken, correlationId);
|
|
4608
4622
|
}
|
|
4609
4623
|
if (!!cacheRecord.accessToken &&
|
|
4610
4624
|
storeInCache?.accessToken !== false) {
|
|
4611
|
-
await this.saveAccessToken(cacheRecord.accessToken);
|
|
4625
|
+
await this.saveAccessToken(cacheRecord.accessToken, correlationId);
|
|
4612
4626
|
}
|
|
4613
4627
|
if (!!cacheRecord.refreshToken &&
|
|
4614
4628
|
storeInCache?.refreshToken !== false) {
|
|
4615
|
-
this.setRefreshTokenCredential(cacheRecord.refreshToken);
|
|
4629
|
+
await this.setRefreshTokenCredential(cacheRecord.refreshToken, correlationId);
|
|
4616
4630
|
}
|
|
4617
4631
|
if (!!cacheRecord.appMetadata) {
|
|
4618
4632
|
this.setAppMetadata(cacheRecord.appMetadata);
|
|
@@ -4642,7 +4656,7 @@ class CacheManager {
|
|
|
4642
4656
|
* saves access token credential
|
|
4643
4657
|
* @param credential
|
|
4644
4658
|
*/
|
|
4645
|
-
async saveAccessToken(credential) {
|
|
4659
|
+
async saveAccessToken(credential, correlationId) {
|
|
4646
4660
|
const accessTokenFilter = {
|
|
4647
4661
|
clientId: credential.clientId,
|
|
4648
4662
|
credentialType: credential.credentialType,
|
|
@@ -4669,7 +4683,7 @@ class CacheManager {
|
|
|
4669
4683
|
}
|
|
4670
4684
|
});
|
|
4671
4685
|
await Promise.all(removedAccessTokens);
|
|
4672
|
-
this.setAccessTokenCredential(credential);
|
|
4686
|
+
await this.setAccessTokenCredential(credential, correlationId);
|
|
4673
4687
|
}
|
|
4674
4688
|
/**
|
|
4675
4689
|
* Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache
|
|
@@ -4955,61 +4969,6 @@ class CacheManager {
|
|
|
4955
4969
|
});
|
|
4956
4970
|
await Promise.all(removedCredentials);
|
|
4957
4971
|
}
|
|
4958
|
-
/**
|
|
4959
|
-
* Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the
|
|
4960
|
-
* cache into a condensed multi-tenant account object with tenant profiles.
|
|
4961
|
-
* @param accountKey
|
|
4962
|
-
* @param accountEntity
|
|
4963
|
-
* @param logger
|
|
4964
|
-
* @returns
|
|
4965
|
-
*/
|
|
4966
|
-
updateOutdatedCachedAccount(accountKey, accountEntity, logger) {
|
|
4967
|
-
// Only update if account entity is defined and has no tenantProfiles object (is outdated)
|
|
4968
|
-
if (accountEntity && accountEntity.isSingleTenant()) {
|
|
4969
|
-
this.commonLogger?.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");
|
|
4970
|
-
// Get keys of all accounts belonging to user
|
|
4971
|
-
const matchingAccountKeys = this.getAccountKeys().filter((key) => {
|
|
4972
|
-
return key.startsWith(accountEntity.homeAccountId);
|
|
4973
|
-
});
|
|
4974
|
-
// Get all account entities belonging to user
|
|
4975
|
-
const accountsToMerge = [];
|
|
4976
|
-
matchingAccountKeys.forEach((key) => {
|
|
4977
|
-
const account = this.getCachedAccountEntity(key);
|
|
4978
|
-
if (account) {
|
|
4979
|
-
accountsToMerge.push(account);
|
|
4980
|
-
}
|
|
4981
|
-
});
|
|
4982
|
-
// Set base account to home account if available, any account if not
|
|
4983
|
-
const baseAccount = accountsToMerge.find((account) => {
|
|
4984
|
-
return tenantIdMatchesHomeTenant(account.realm, account.homeAccountId);
|
|
4985
|
-
}) || accountsToMerge[0];
|
|
4986
|
-
// Populate tenant profiles built from each account entity belonging to the user
|
|
4987
|
-
baseAccount.tenantProfiles = accountsToMerge.map((account) => {
|
|
4988
|
-
return {
|
|
4989
|
-
tenantId: account.realm,
|
|
4990
|
-
localAccountId: account.localAccountId,
|
|
4991
|
-
name: account.name,
|
|
4992
|
-
isHomeTenant: tenantIdMatchesHomeTenant(account.realm, account.homeAccountId),
|
|
4993
|
-
};
|
|
4994
|
-
});
|
|
4995
|
-
const updatedAccount = CacheManager.toObject(new AccountEntity(), {
|
|
4996
|
-
...baseAccount,
|
|
4997
|
-
});
|
|
4998
|
-
const newAccountKey = updatedAccount.generateAccountKey();
|
|
4999
|
-
// Clear cache of legacy account objects that have been collpsed into tenant profiles
|
|
5000
|
-
matchingAccountKeys.forEach((key) => {
|
|
5001
|
-
if (key !== newAccountKey) {
|
|
5002
|
-
this.removeOutdatedAccount(accountKey);
|
|
5003
|
-
}
|
|
5004
|
-
});
|
|
5005
|
-
// Cache updated account object
|
|
5006
|
-
this.setAccount(updatedAccount);
|
|
5007
|
-
logger?.verbose("Updated an outdated account entity in the cache");
|
|
5008
|
-
return updatedAccount;
|
|
5009
|
-
}
|
|
5010
|
-
// No update is necessary
|
|
5011
|
-
return accountEntity;
|
|
5012
|
-
}
|
|
5013
4972
|
/**
|
|
5014
4973
|
* returns a boolean if the given credential is removed
|
|
5015
4974
|
* @param credential
|
|
@@ -5605,28 +5564,25 @@ class CacheManager {
|
|
|
5605
5564
|
}
|
|
5606
5565
|
/** @internal */
|
|
5607
5566
|
class DefaultStorageClass extends CacheManager {
|
|
5608
|
-
setAccount() {
|
|
5567
|
+
async setAccount() {
|
|
5609
5568
|
throw createClientAuthError(methodNotImplemented);
|
|
5610
5569
|
}
|
|
5611
5570
|
getAccount() {
|
|
5612
5571
|
throw createClientAuthError(methodNotImplemented);
|
|
5613
5572
|
}
|
|
5614
|
-
|
|
5615
|
-
throw createClientAuthError(methodNotImplemented);
|
|
5616
|
-
}
|
|
5617
|
-
setIdTokenCredential() {
|
|
5573
|
+
async setIdTokenCredential() {
|
|
5618
5574
|
throw createClientAuthError(methodNotImplemented);
|
|
5619
5575
|
}
|
|
5620
5576
|
getIdTokenCredential() {
|
|
5621
5577
|
throw createClientAuthError(methodNotImplemented);
|
|
5622
5578
|
}
|
|
5623
|
-
setAccessTokenCredential() {
|
|
5579
|
+
async setAccessTokenCredential() {
|
|
5624
5580
|
throw createClientAuthError(methodNotImplemented);
|
|
5625
5581
|
}
|
|
5626
5582
|
getAccessTokenCredential() {
|
|
5627
5583
|
throw createClientAuthError(methodNotImplemented);
|
|
5628
5584
|
}
|
|
5629
|
-
setRefreshTokenCredential() {
|
|
5585
|
+
async setRefreshTokenCredential() {
|
|
5630
5586
|
throw createClientAuthError(methodNotImplemented);
|
|
5631
5587
|
}
|
|
5632
5588
|
getRefreshTokenCredential() {
|
|
@@ -5671,12 +5627,6 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5671
5627
|
getTokenKeys() {
|
|
5672
5628
|
throw createClientAuthError(methodNotImplemented);
|
|
5673
5629
|
}
|
|
5674
|
-
updateCredentialCacheKey() {
|
|
5675
|
-
throw createClientAuthError(methodNotImplemented);
|
|
5676
|
-
}
|
|
5677
|
-
removeOutdatedAccount() {
|
|
5678
|
-
throw createClientAuthError(methodNotImplemented);
|
|
5679
|
-
}
|
|
5680
5630
|
}
|
|
5681
5631
|
|
|
5682
5632
|
/*
|
|
@@ -6992,13 +6942,13 @@ class ResponseHandler {
|
|
|
6992
6942
|
!forceCacheRefreshTokenResponse &&
|
|
6993
6943
|
cacheRecord.account) {
|
|
6994
6944
|
const key = cacheRecord.account.generateAccountKey();
|
|
6995
|
-
const account = this.cacheStorage.getAccount(key
|
|
6945
|
+
const account = this.cacheStorage.getAccount(key);
|
|
6996
6946
|
if (!account) {
|
|
6997
6947
|
this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache");
|
|
6998
6948
|
return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId);
|
|
6999
6949
|
}
|
|
7000
6950
|
}
|
|
7001
|
-
await this.cacheStorage.saveCacheRecord(cacheRecord, request.
|
|
6951
|
+
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, request.storeInCache);
|
|
7002
6952
|
}
|
|
7003
6953
|
finally {
|
|
7004
6954
|
if (this.persistencePlugin &&
|
|
@@ -7184,7 +7134,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
7184
7134
|
});
|
|
7185
7135
|
let cachedAccount = null;
|
|
7186
7136
|
if (baseAccountKey) {
|
|
7187
|
-
cachedAccount = cacheStorage.getAccount(baseAccountKey
|
|
7137
|
+
cachedAccount = cacheStorage.getAccount(baseAccountKey);
|
|
7188
7138
|
}
|
|
7189
7139
|
const baseAccount = cachedAccount ||
|
|
7190
7140
|
AccountEntity.createAccount({
|
|
@@ -7603,7 +7553,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7603
7553
|
});
|
|
7604
7554
|
}
|
|
7605
7555
|
this.addExtraQueryParams(request, parameterBuilder);
|
|
7606
|
-
if (request.
|
|
7556
|
+
if (request.platformBroker) {
|
|
7607
7557
|
// signal ests that this is a WAM call
|
|
7608
7558
|
parameterBuilder.addNativeBroker();
|
|
7609
7559
|
// pass the req_cnf for POP
|
|
@@ -8449,4 +8399,4 @@ exports.invokeAsync = invokeAsync;
|
|
|
8449
8399
|
exports.tenantIdMatchesHomeTenant = tenantIdMatchesHomeTenant;
|
|
8450
8400
|
exports.updateAccountTenantProfileData = updateAccountTenantProfileData;
|
|
8451
8401
|
exports.version = version;
|
|
8452
|
-
//# sourceMappingURL=index-node-
|
|
8402
|
+
//# sourceMappingURL=index-node-uiuRUOAe.js.map
|