@azure/msal-browser 3.26.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +22 -8
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +22 -8
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +22 -8
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +19 -19
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/package.json +1 -1
- package/src/controllers/NestedAppAuthController.ts +25 -12
- package/src/packageMetadata.ts +1 -1
package/lib/msal-browser.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.26.
|
|
1
|
+
/*! @azure/msal-browser v3.26.1 2024-10-08 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -10234,7 +10234,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
10234
10234
|
|
|
10235
10235
|
/* eslint-disable header/header */
|
|
10236
10236
|
const name = "@azure/msal-browser";
|
|
10237
|
-
const version = "3.26.
|
|
10237
|
+
const version = "3.26.1";
|
|
10238
10238
|
|
|
10239
10239
|
/*
|
|
10240
10240
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -17544,7 +17544,9 @@ class NestedAppAuthController {
|
|
|
17544
17544
|
const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(validRequest);
|
|
17545
17545
|
const reqTimestamp = nowSeconds();
|
|
17546
17546
|
const response = await this.bridgeProxy.getTokenInteractive(naaRequest);
|
|
17547
|
-
const result =
|
|
17547
|
+
const result = {
|
|
17548
|
+
...this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp),
|
|
17549
|
+
};
|
|
17548
17550
|
// cache the tokens in the response
|
|
17549
17551
|
await this.hydrateCache(result, request);
|
|
17550
17552
|
this.browserStorage.setActiveAccount(result.account);
|
|
@@ -17628,7 +17630,22 @@ class NestedAppAuthController {
|
|
|
17628
17630
|
atsMeasurement?.add({
|
|
17629
17631
|
nestedAppAuthRequest: true,
|
|
17630
17632
|
});
|
|
17631
|
-
|
|
17633
|
+
// if the request has claims, we cannot look up in the cache
|
|
17634
|
+
if (request.claims) {
|
|
17635
|
+
this.logger.verbose("Claims are present in the request, skipping cache lookup");
|
|
17636
|
+
return null;
|
|
17637
|
+
}
|
|
17638
|
+
// respect cache lookup policy
|
|
17639
|
+
let result = null;
|
|
17640
|
+
switch (request.cacheLookupPolicy) {
|
|
17641
|
+
case CacheLookupPolicy.Default:
|
|
17642
|
+
case CacheLookupPolicy.AccessToken:
|
|
17643
|
+
case CacheLookupPolicy.AccessTokenAndRefreshToken:
|
|
17644
|
+
result = await this.acquireTokenFromCacheInternal(request);
|
|
17645
|
+
break;
|
|
17646
|
+
default:
|
|
17647
|
+
return null;
|
|
17648
|
+
}
|
|
17632
17649
|
if (result) {
|
|
17633
17650
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, result);
|
|
17634
17651
|
atsMeasurement?.add({
|
|
@@ -17681,13 +17698,10 @@ class NestedAppAuthController {
|
|
|
17681
17698
|
if (!cachedAccessToken) {
|
|
17682
17699
|
this.logger.verbose("No cached access token found");
|
|
17683
17700
|
return Promise.resolve(null);
|
|
17684
|
-
// If access token has expired, remove the token from cache and return null
|
|
17685
17701
|
}
|
|
17686
17702
|
else if (wasClockTurnedBack(cachedAccessToken.cachedAt) ||
|
|
17687
17703
|
isTokenExpired(cachedAccessToken.expiresOn, this.config.system.tokenRenewalOffsetSeconds)) {
|
|
17688
|
-
this.logger.verbose("Cached access token has expired
|
|
17689
|
-
const accountEntity = AccountEntity.createFromAccountInfo(currentAccount);
|
|
17690
|
-
await this.browserStorage.removeAccountContext(accountEntity);
|
|
17704
|
+
this.logger.verbose("Cached access token has expired");
|
|
17691
17705
|
return Promise.resolve(null);
|
|
17692
17706
|
}
|
|
17693
17707
|
const cachedIdToken = this.browserStorage.getIdToken(currentAccount, tokenKeys, currentAccount.tenantId, this.performanceClient, authRequest.correlationId);
|