@azure/msal-browser 3.27.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +2 -38
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +21 -115
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/BrowserStorage.d.ts +3 -1
- package/dist/cache/BrowserStorage.d.ts.map +1 -1
- package/dist/cache/BrowserStorage.mjs +13 -8
- package/dist/cache/BrowserStorage.mjs.map +1 -1
- package/dist/cache/CookieStorage.d.ts +14 -0
- package/dist/cache/CookieStorage.d.ts.map +1 -0
- package/dist/cache/CookieStorage.mjs +62 -0
- package/dist/cache/CookieStorage.mjs.map +1 -0
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.d.ts +10 -0
- package/dist/cache/LocalStorage.d.ts.map +1 -0
- package/dist/cache/LocalStorage.mjs +34 -0
- package/dist/cache/LocalStorage.mjs.map +1 -0
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.d.ts +10 -0
- package/dist/cache/SessionStorage.d.ts.map +1 -0
- package/dist/cache/SessionStorage.mjs +34 -0
- package/dist/cache/SessionStorage.mjs.map +1 -0
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +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.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +5 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +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 +216 -192
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +216 -192
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +64 -64
- package/lib/types/cache/BrowserCacheManager.d.ts +2 -38
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/cache/BrowserStorage.d.ts +3 -1
- package/lib/types/cache/BrowserStorage.d.ts.map +1 -1
- package/lib/types/cache/CookieStorage.d.ts +14 -0
- package/lib/types/cache/CookieStorage.d.ts.map +1 -0
- package/lib/types/cache/LocalStorage.d.ts +10 -0
- package/lib/types/cache/LocalStorage.d.ts.map +1 -0
- package/lib/types/cache/SessionStorage.d.ts +10 -0
- package/lib/types/cache/SessionStorage.d.ts.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/package.json +1 -1
- package/src/cache/BrowserCacheManager.ts +27 -141
- package/src/cache/BrowserStorage.ts +11 -11
- package/src/cache/CookieStorage.ts +80 -0
- package/src/cache/LocalStorage.ts +40 -0
- package/src/cache/SessionStorage.ts +40 -0
- package/src/index.ts +3 -0
- package/src/interaction_client/StandardInteractionClient.ts +5 -0
- package/src/packageMetadata.ts +1 -1
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.28.0 2024-12-12 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
9
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
// Token renewal offset default in seconds
|
|
317
317
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
318
318
|
|
|
319
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
319
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
320
320
|
/*
|
|
321
321
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
322
322
|
* Licensed under the MIT License.
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
unexpectedError: unexpectedError
|
|
334
334
|
});
|
|
335
335
|
|
|
336
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
336
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
337
337
|
|
|
338
338
|
/*
|
|
339
339
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
: AuthErrorMessages[code]);
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
385
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
386
386
|
/*
|
|
387
387
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
388
388
|
* Licensed under the MIT License.
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
userTimeoutReached: userTimeoutReached
|
|
481
481
|
});
|
|
482
482
|
|
|
483
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
483
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
484
484
|
|
|
485
485
|
/*
|
|
486
486
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
733
733
|
}
|
|
734
734
|
|
|
735
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
735
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
736
736
|
|
|
737
737
|
/*
|
|
738
738
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
},
|
|
772
772
|
};
|
|
773
773
|
|
|
774
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
774
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
775
775
|
|
|
776
776
|
/*
|
|
777
777
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -962,12 +962,12 @@
|
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
965
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
966
966
|
/* eslint-disable header/header */
|
|
967
967
|
const name$1 = "@azure/msal-common";
|
|
968
968
|
const version$1 = "14.16.0";
|
|
969
969
|
|
|
970
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
970
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
971
971
|
/*
|
|
972
972
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
973
973
|
* Licensed under the MIT License.
|
|
@@ -987,7 +987,7 @@
|
|
|
987
987
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
988
988
|
};
|
|
989
989
|
|
|
990
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
990
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
991
991
|
|
|
992
992
|
/*
|
|
993
993
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1048,7 +1048,7 @@
|
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1051
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1052
1052
|
/*
|
|
1053
1053
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1054
1054
|
* Licensed under the MIT License.
|
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
return cachedAtSec > nowSeconds();
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1088
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1089
1089
|
|
|
1090
1090
|
/*
|
|
1091
1091
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1412,7 +1412,7 @@
|
|
|
1412
1412
|
return metadata.expiresAt <= nowSeconds();
|
|
1413
1413
|
}
|
|
1414
1414
|
|
|
1415
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1415
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1416
1416
|
/*
|
|
1417
1417
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1418
1418
|
* Licensed under the MIT License.
|
|
@@ -1466,7 +1466,7 @@
|
|
|
1466
1466
|
urlParseError: urlParseError
|
|
1467
1467
|
});
|
|
1468
1468
|
|
|
1469
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1469
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1470
1470
|
|
|
1471
1471
|
/*
|
|
1472
1472
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1604,7 +1604,7 @@
|
|
|
1604
1604
|
return new ClientConfigurationError(errorCode);
|
|
1605
1605
|
}
|
|
1606
1606
|
|
|
1607
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1607
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1608
1608
|
/*
|
|
1609
1609
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1610
1610
|
* Licensed under the MIT License.
|
|
@@ -1701,7 +1701,7 @@
|
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
|
|
1704
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1704
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1705
1705
|
|
|
1706
1706
|
/*
|
|
1707
1707
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1901,7 +1901,7 @@
|
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
1903
|
|
|
1904
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1904
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1905
1905
|
|
|
1906
1906
|
/*
|
|
1907
1907
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1941,7 +1941,7 @@
|
|
|
1941
1941
|
};
|
|
1942
1942
|
}
|
|
1943
1943
|
|
|
1944
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
1944
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
1945
1945
|
/*
|
|
1946
1946
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1947
1947
|
* Licensed under the MIT License.
|
|
@@ -2020,7 +2020,7 @@
|
|
|
2020
2020
|
return updatedAccountInfo;
|
|
2021
2021
|
}
|
|
2022
2022
|
|
|
2023
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2023
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2024
2024
|
/*
|
|
2025
2025
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2026
2026
|
* Licensed under the MIT License.
|
|
@@ -2035,7 +2035,7 @@
|
|
|
2035
2035
|
Ciam: 3,
|
|
2036
2036
|
};
|
|
2037
2037
|
|
|
2038
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2038
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2039
2039
|
/*
|
|
2040
2040
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2041
2041
|
* Licensed under the MIT License.
|
|
@@ -2057,7 +2057,7 @@
|
|
|
2057
2057
|
return null;
|
|
2058
2058
|
}
|
|
2059
2059
|
|
|
2060
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2060
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2061
2061
|
/*
|
|
2062
2062
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2063
2063
|
* Licensed under the MIT License.
|
|
@@ -2070,7 +2070,7 @@
|
|
|
2070
2070
|
OIDC: "OIDC",
|
|
2071
2071
|
};
|
|
2072
2072
|
|
|
2073
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2073
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2074
2074
|
|
|
2075
2075
|
/*
|
|
2076
2076
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2313,7 +2313,7 @@
|
|
|
2313
2313
|
}
|
|
2314
2314
|
}
|
|
2315
2315
|
|
|
2316
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2316
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2317
2317
|
|
|
2318
2318
|
/*
|
|
2319
2319
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2360,7 +2360,7 @@
|
|
|
2360
2360
|
return null;
|
|
2361
2361
|
}
|
|
2362
2362
|
|
|
2363
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2363
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2364
2364
|
|
|
2365
2365
|
/*
|
|
2366
2366
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2524,7 +2524,7 @@
|
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
2526
2526
|
|
|
2527
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2527
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2528
2528
|
|
|
2529
2529
|
/*
|
|
2530
2530
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2664,7 +2664,7 @@
|
|
|
2664
2664
|
return null;
|
|
2665
2665
|
}
|
|
2666
2666
|
|
|
2667
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2667
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2668
2668
|
/*
|
|
2669
2669
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2670
2670
|
* Licensed under the MIT License.
|
|
@@ -2672,7 +2672,7 @@
|
|
|
2672
2672
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
2673
2673
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
2674
2674
|
|
|
2675
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2675
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2676
2676
|
|
|
2677
2677
|
/*
|
|
2678
2678
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2699,7 +2699,7 @@
|
|
|
2699
2699
|
}
|
|
2700
2700
|
}
|
|
2701
2701
|
|
|
2702
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
2702
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
2703
2703
|
|
|
2704
2704
|
/*
|
|
2705
2705
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3948,7 +3948,7 @@
|
|
|
3948
3948
|
}
|
|
3949
3949
|
}
|
|
3950
3950
|
|
|
3951
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
3951
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
3952
3952
|
|
|
3953
3953
|
/*
|
|
3954
3954
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4047,7 +4047,7 @@
|
|
|
4047
4047
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
4048
4048
|
}
|
|
4049
4049
|
|
|
4050
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4050
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4051
4051
|
/*
|
|
4052
4052
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4053
4053
|
* Licensed under the MIT License.
|
|
@@ -4057,7 +4057,7 @@
|
|
|
4057
4057
|
UPN: "UPN",
|
|
4058
4058
|
};
|
|
4059
4059
|
|
|
4060
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4060
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4061
4061
|
/*
|
|
4062
4062
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4063
4063
|
* Licensed under the MIT License.
|
|
@@ -4107,7 +4107,7 @@
|
|
|
4107
4107
|
const BROKER_CLIENT_ID = "brk_client_id";
|
|
4108
4108
|
const BROKER_REDIRECT_URI = "brk_redirect_uri";
|
|
4109
4109
|
|
|
4110
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4110
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4111
4111
|
|
|
4112
4112
|
/*
|
|
4113
4113
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4174,7 +4174,7 @@
|
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
4176
|
|
|
4177
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4177
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4178
4178
|
|
|
4179
4179
|
/*
|
|
4180
4180
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4582,7 +4582,7 @@
|
|
|
4582
4582
|
}
|
|
4583
4583
|
}
|
|
4584
4584
|
|
|
4585
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4585
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4586
4586
|
/*
|
|
4587
4587
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4588
4588
|
* Licensed under the MIT License.
|
|
@@ -4594,7 +4594,7 @@
|
|
|
4594
4594
|
response.hasOwnProperty("jwks_uri"));
|
|
4595
4595
|
}
|
|
4596
4596
|
|
|
4597
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4597
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4598
4598
|
/*
|
|
4599
4599
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4600
4600
|
* Licensed under the MIT License.
|
|
@@ -4604,7 +4604,7 @@
|
|
|
4604
4604
|
response.hasOwnProperty("metadata"));
|
|
4605
4605
|
}
|
|
4606
4606
|
|
|
4607
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4607
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4608
4608
|
/*
|
|
4609
4609
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4610
4610
|
* Licensed under the MIT License.
|
|
@@ -4614,7 +4614,7 @@
|
|
|
4614
4614
|
response.hasOwnProperty("error_description"));
|
|
4615
4615
|
}
|
|
4616
4616
|
|
|
4617
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
4617
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
4618
4618
|
/*
|
|
4619
4619
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4620
4620
|
* Licensed under the MIT License.
|
|
@@ -5101,7 +5101,7 @@
|
|
|
5101
5101
|
"multiMatchedRT",
|
|
5102
5102
|
]);
|
|
5103
5103
|
|
|
5104
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
5104
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
5105
5105
|
/*
|
|
5106
5106
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5107
5107
|
* Licensed under the MIT License.
|
|
@@ -5197,7 +5197,7 @@
|
|
|
5197
5197
|
};
|
|
5198
5198
|
};
|
|
5199
5199
|
|
|
5200
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
5200
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
5201
5201
|
|
|
5202
5202
|
/*
|
|
5203
5203
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5306,7 +5306,7 @@
|
|
|
5306
5306
|
},
|
|
5307
5307
|
};
|
|
5308
5308
|
|
|
5309
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
5309
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
5310
5310
|
|
|
5311
5311
|
/*
|
|
5312
5312
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6145,7 +6145,7 @@
|
|
|
6145
6145
|
};
|
|
6146
6146
|
}
|
|
6147
6147
|
|
|
6148
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6148
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6149
6149
|
|
|
6150
6150
|
/*
|
|
6151
6151
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6176,7 +6176,7 @@
|
|
|
6176
6176
|
}
|
|
6177
6177
|
}
|
|
6178
6178
|
|
|
6179
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6179
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6180
6180
|
|
|
6181
6181
|
/*
|
|
6182
6182
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6195,7 +6195,7 @@
|
|
|
6195
6195
|
}
|
|
6196
6196
|
}
|
|
6197
6197
|
|
|
6198
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6198
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6199
6199
|
|
|
6200
6200
|
/*
|
|
6201
6201
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6293,7 +6293,7 @@
|
|
|
6293
6293
|
}
|
|
6294
6294
|
}
|
|
6295
6295
|
|
|
6296
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6296
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6297
6297
|
|
|
6298
6298
|
/*
|
|
6299
6299
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6323,7 +6323,7 @@
|
|
|
6323
6323
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6324
6324
|
}
|
|
6325
6325
|
|
|
6326
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6326
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6327
6327
|
|
|
6328
6328
|
/*
|
|
6329
6329
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6473,7 +6473,7 @@
|
|
|
6473
6473
|
}
|
|
6474
6474
|
}
|
|
6475
6475
|
|
|
6476
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6476
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6477
6477
|
/*
|
|
6478
6478
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6479
6479
|
* Licensed under the MIT License.
|
|
@@ -6499,7 +6499,7 @@
|
|
|
6499
6499
|
refreshTokenExpired: refreshTokenExpired
|
|
6500
6500
|
});
|
|
6501
6501
|
|
|
6502
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6502
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6503
6503
|
|
|
6504
6504
|
/*
|
|
6505
6505
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6587,7 +6587,7 @@
|
|
|
6587
6587
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6588
6588
|
}
|
|
6589
6589
|
|
|
6590
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6590
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6591
6591
|
|
|
6592
6592
|
/*
|
|
6593
6593
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6659,7 +6659,7 @@
|
|
|
6659
6659
|
}
|
|
6660
6660
|
}
|
|
6661
6661
|
|
|
6662
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6662
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6663
6663
|
|
|
6664
6664
|
/*
|
|
6665
6665
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6743,7 +6743,7 @@
|
|
|
6743
6743
|
}
|
|
6744
6744
|
}
|
|
6745
6745
|
|
|
6746
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6746
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6747
6747
|
/*
|
|
6748
6748
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6749
6749
|
* Licensed under the MIT License.
|
|
@@ -6770,7 +6770,7 @@
|
|
|
6770
6770
|
}
|
|
6771
6771
|
}
|
|
6772
6772
|
|
|
6773
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
6773
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
6774
6774
|
|
|
6775
6775
|
/*
|
|
6776
6776
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7147,7 +7147,7 @@
|
|
|
7147
7147
|
return baseAccount;
|
|
7148
7148
|
}
|
|
7149
7149
|
|
|
7150
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
7150
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
7151
7151
|
/*
|
|
7152
7152
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7153
7153
|
* Licensed under the MIT License.
|
|
@@ -7165,7 +7165,7 @@
|
|
|
7165
7165
|
}
|
|
7166
7166
|
}
|
|
7167
7167
|
|
|
7168
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
7168
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
7169
7169
|
|
|
7170
7170
|
/*
|
|
7171
7171
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7607,7 +7607,7 @@
|
|
|
7607
7607
|
}
|
|
7608
7608
|
}
|
|
7609
7609
|
|
|
7610
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
7610
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
7611
7611
|
|
|
7612
7612
|
/*
|
|
7613
7613
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7827,7 +7827,7 @@
|
|
|
7827
7827
|
}
|
|
7828
7828
|
}
|
|
7829
7829
|
|
|
7830
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
7830
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
7831
7831
|
|
|
7832
7832
|
/*
|
|
7833
7833
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7963,7 +7963,7 @@
|
|
|
7963
7963
|
}
|
|
7964
7964
|
}
|
|
7965
7965
|
|
|
7966
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
7966
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
7967
7967
|
|
|
7968
7968
|
/*
|
|
7969
7969
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7978,7 +7978,7 @@
|
|
|
7978
7978
|
},
|
|
7979
7979
|
};
|
|
7980
7980
|
|
|
7981
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
7981
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
7982
7982
|
|
|
7983
7983
|
/*
|
|
7984
7984
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8036,7 +8036,7 @@
|
|
|
8036
8036
|
}
|
|
8037
8037
|
}
|
|
8038
8038
|
|
|
8039
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
8039
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
8040
8040
|
|
|
8041
8041
|
/*
|
|
8042
8042
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8299,7 +8299,7 @@
|
|
|
8299
8299
|
}
|
|
8300
8300
|
}
|
|
8301
8301
|
|
|
8302
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
8302
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
8303
8303
|
/*
|
|
8304
8304
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8305
8305
|
* Licensed under the MIT License.
|
|
@@ -8307,7 +8307,7 @@
|
|
|
8307
8307
|
const missingKidError = "missing_kid_error";
|
|
8308
8308
|
const missingAlgError = "missing_alg_error";
|
|
8309
8309
|
|
|
8310
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
8310
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
8311
8311
|
|
|
8312
8312
|
/*
|
|
8313
8313
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8332,7 +8332,7 @@
|
|
|
8332
8332
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
8333
8333
|
}
|
|
8334
8334
|
|
|
8335
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
8335
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
8336
8336
|
|
|
8337
8337
|
/*
|
|
8338
8338
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8372,7 +8372,7 @@
|
|
|
8372
8372
|
}
|
|
8373
8373
|
}
|
|
8374
8374
|
|
|
8375
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
8375
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
8376
8376
|
|
|
8377
8377
|
/*
|
|
8378
8378
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8451,7 +8451,7 @@
|
|
|
8451
8451
|
}
|
|
8452
8452
|
}
|
|
8453
8453
|
|
|
8454
|
-
/*! @azure/msal-common v14.16.0 2024-
|
|
8454
|
+
/*! @azure/msal-common v14.16.0 2024-12-12 */
|
|
8455
8455
|
|
|
8456
8456
|
/*
|
|
8457
8457
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10370,7 +10370,7 @@
|
|
|
10370
10370
|
|
|
10371
10371
|
/* eslint-disable header/header */
|
|
10372
10372
|
const name = "@azure/msal-browser";
|
|
10373
|
-
const version = "3.
|
|
10373
|
+
const version = "3.28.0";
|
|
10374
10374
|
|
|
10375
10375
|
/*
|
|
10376
10376
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -11329,32 +11329,53 @@
|
|
|
11329
11329
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11330
11330
|
* Licensed under the MIT License.
|
|
11331
11331
|
*/
|
|
11332
|
-
class
|
|
11333
|
-
constructor(
|
|
11334
|
-
|
|
11335
|
-
|
|
11332
|
+
class LocalStorage {
|
|
11333
|
+
constructor() {
|
|
11334
|
+
if (!window.localStorage) {
|
|
11335
|
+
throw createBrowserConfigurationAuthError(storageNotSupported);
|
|
11336
|
+
}
|
|
11337
|
+
}
|
|
11338
|
+
getItem(key) {
|
|
11339
|
+
return window.localStorage.getItem(key);
|
|
11340
|
+
}
|
|
11341
|
+
setItem(key, value) {
|
|
11342
|
+
window.localStorage.setItem(key, value);
|
|
11336
11343
|
}
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11344
|
+
removeItem(key) {
|
|
11345
|
+
window.localStorage.removeItem(key);
|
|
11346
|
+
}
|
|
11347
|
+
getKeys() {
|
|
11348
|
+
return Object.keys(window.localStorage);
|
|
11349
|
+
}
|
|
11350
|
+
containsKey(key) {
|
|
11351
|
+
return window.localStorage.hasOwnProperty(key);
|
|
11352
|
+
}
|
|
11353
|
+
}
|
|
11354
|
+
|
|
11355
|
+
/*
|
|
11356
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11357
|
+
* Licensed under the MIT License.
|
|
11358
|
+
*/
|
|
11359
|
+
class SessionStorage {
|
|
11360
|
+
constructor() {
|
|
11361
|
+
if (!window.sessionStorage) {
|
|
11341
11362
|
throw createBrowserConfigurationAuthError(storageNotSupported);
|
|
11342
11363
|
}
|
|
11343
11364
|
}
|
|
11344
11365
|
getItem(key) {
|
|
11345
|
-
return
|
|
11366
|
+
return window.sessionStorage.getItem(key);
|
|
11346
11367
|
}
|
|
11347
11368
|
setItem(key, value) {
|
|
11348
|
-
|
|
11369
|
+
window.sessionStorage.setItem(key, value);
|
|
11349
11370
|
}
|
|
11350
11371
|
removeItem(key) {
|
|
11351
|
-
|
|
11372
|
+
window.sessionStorage.removeItem(key);
|
|
11352
11373
|
}
|
|
11353
11374
|
getKeys() {
|
|
11354
|
-
return Object.keys(
|
|
11375
|
+
return Object.keys(window.sessionStorage);
|
|
11355
11376
|
}
|
|
11356
11377
|
containsKey(key) {
|
|
11357
|
-
return
|
|
11378
|
+
return window.sessionStorage.hasOwnProperty(key);
|
|
11358
11379
|
}
|
|
11359
11380
|
}
|
|
11360
11381
|
|
|
@@ -11380,6 +11401,64 @@
|
|
|
11380
11401
|
}
|
|
11381
11402
|
}
|
|
11382
11403
|
|
|
11404
|
+
/*
|
|
11405
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11406
|
+
* Licensed under the MIT License.
|
|
11407
|
+
*/
|
|
11408
|
+
// Cookie life calculation (hours * minutes * seconds * ms)
|
|
11409
|
+
const COOKIE_LIFE_MULTIPLIER = 24 * 60 * 60 * 1000;
|
|
11410
|
+
class CookieStorage {
|
|
11411
|
+
getItem(key) {
|
|
11412
|
+
const name = `${encodeURIComponent(key)}`;
|
|
11413
|
+
const cookieList = document.cookie.split(";");
|
|
11414
|
+
for (let i = 0; i < cookieList.length; i++) {
|
|
11415
|
+
const cookie = cookieList[i];
|
|
11416
|
+
const [key, ...rest] = decodeURIComponent(cookie).trim().split("=");
|
|
11417
|
+
const value = rest.join("=");
|
|
11418
|
+
if (key === name) {
|
|
11419
|
+
return value;
|
|
11420
|
+
}
|
|
11421
|
+
}
|
|
11422
|
+
return "";
|
|
11423
|
+
}
|
|
11424
|
+
setItem(key, value, cookieLifeDays, secure = true) {
|
|
11425
|
+
let cookieStr = `${encodeURIComponent(key)}=${encodeURIComponent(value)};path=/;SameSite=Lax;`;
|
|
11426
|
+
if (cookieLifeDays) {
|
|
11427
|
+
const expireTime = getCookieExpirationTime(cookieLifeDays);
|
|
11428
|
+
cookieStr += `expires=${expireTime};`;
|
|
11429
|
+
}
|
|
11430
|
+
if (secure) {
|
|
11431
|
+
cookieStr += "Secure;";
|
|
11432
|
+
}
|
|
11433
|
+
document.cookie = cookieStr;
|
|
11434
|
+
}
|
|
11435
|
+
removeItem(key) {
|
|
11436
|
+
// Setting expiration to -1 removes it
|
|
11437
|
+
this.setItem(key, "", -1);
|
|
11438
|
+
}
|
|
11439
|
+
getKeys() {
|
|
11440
|
+
const cookieList = document.cookie.split(";");
|
|
11441
|
+
const keys = [];
|
|
11442
|
+
cookieList.forEach((cookie) => {
|
|
11443
|
+
const cookieParts = decodeURIComponent(cookie).trim().split("=");
|
|
11444
|
+
keys.push(cookieParts[0]);
|
|
11445
|
+
});
|
|
11446
|
+
return keys;
|
|
11447
|
+
}
|
|
11448
|
+
containsKey(key) {
|
|
11449
|
+
return this.getKeys().includes(key);
|
|
11450
|
+
}
|
|
11451
|
+
}
|
|
11452
|
+
/**
|
|
11453
|
+
* Get cookie expiration time
|
|
11454
|
+
* @param cookieLifeDays
|
|
11455
|
+
*/
|
|
11456
|
+
function getCookieExpirationTime(cookieLifeDays) {
|
|
11457
|
+
const today = new Date();
|
|
11458
|
+
const expr = new Date(today.getTime() + cookieLifeDays * COOKIE_LIFE_MULTIPLIER);
|
|
11459
|
+
return expr.toUTCString();
|
|
11460
|
+
}
|
|
11461
|
+
|
|
11383
11462
|
/*
|
|
11384
11463
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11385
11464
|
* Licensed under the MIT License.
|
|
@@ -11392,13 +11471,12 @@
|
|
|
11392
11471
|
class BrowserCacheManager extends CacheManager {
|
|
11393
11472
|
constructor(clientId, cacheConfig, cryptoImpl, logger, staticAuthorityOptions, performanceClient) {
|
|
11394
11473
|
super(clientId, cryptoImpl, logger, staticAuthorityOptions);
|
|
11395
|
-
// Cookie life calculation (hours * minutes * seconds * ms)
|
|
11396
|
-
this.COOKIE_LIFE_MULTIPLIER = 24 * 60 * 60 * 1000;
|
|
11397
11474
|
this.cacheConfig = cacheConfig;
|
|
11398
11475
|
this.logger = logger;
|
|
11399
11476
|
this.internalStorage = new MemoryStorage();
|
|
11400
11477
|
this.browserStorage = this.setupBrowserStorage(this.cacheConfig.cacheLocation);
|
|
11401
|
-
this.temporaryCacheStorage = this.
|
|
11478
|
+
this.temporaryCacheStorage = this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation);
|
|
11479
|
+
this.cookieStorage = new CookieStorage();
|
|
11402
11480
|
// Migrate cache entries from older versions of MSAL.
|
|
11403
11481
|
if (cacheConfig.cacheMigrationEnabled) {
|
|
11404
11482
|
this.migrateCacheEntries();
|
|
@@ -11411,44 +11489,23 @@
|
|
|
11411
11489
|
* @param cacheLocation
|
|
11412
11490
|
*/
|
|
11413
11491
|
setupBrowserStorage(cacheLocation) {
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11492
|
+
try {
|
|
11493
|
+
switch (cacheLocation) {
|
|
11494
|
+
case BrowserCacheLocation.LocalStorage:
|
|
11495
|
+
return new LocalStorage();
|
|
11496
|
+
case BrowserCacheLocation.SessionStorage:
|
|
11497
|
+
return new SessionStorage();
|
|
11498
|
+
case BrowserCacheLocation.MemoryStorage:
|
|
11499
|
+
default:
|
|
11422
11500
|
break;
|
|
11423
|
-
|
|
11424
|
-
|
|
11501
|
+
}
|
|
11502
|
+
}
|
|
11503
|
+
catch (e) {
|
|
11504
|
+
this.logger.error(e);
|
|
11425
11505
|
}
|
|
11426
11506
|
this.cacheConfig.cacheLocation = BrowserCacheLocation.MemoryStorage;
|
|
11427
11507
|
return new MemoryStorage();
|
|
11428
11508
|
}
|
|
11429
|
-
/**
|
|
11430
|
-
* Returns a window storage class implementing the IWindowStorage interface that corresponds to the configured temporaryCacheLocation.
|
|
11431
|
-
* @param temporaryCacheLocation
|
|
11432
|
-
* @param cacheLocation
|
|
11433
|
-
*/
|
|
11434
|
-
setupTemporaryCacheStorage(temporaryCacheLocation, cacheLocation) {
|
|
11435
|
-
switch (cacheLocation) {
|
|
11436
|
-
case BrowserCacheLocation.LocalStorage:
|
|
11437
|
-
case BrowserCacheLocation.SessionStorage:
|
|
11438
|
-
try {
|
|
11439
|
-
// Temporary cache items will always be stored in session storage to mitigate problems caused by multiple tabs
|
|
11440
|
-
return new BrowserStorage(temporaryCacheLocation ||
|
|
11441
|
-
BrowserCacheLocation.SessionStorage);
|
|
11442
|
-
}
|
|
11443
|
-
catch (e) {
|
|
11444
|
-
this.logger.verbose(e);
|
|
11445
|
-
return this.internalStorage;
|
|
11446
|
-
}
|
|
11447
|
-
case BrowserCacheLocation.MemoryStorage:
|
|
11448
|
-
default:
|
|
11449
|
-
return this.internalStorage;
|
|
11450
|
-
}
|
|
11451
|
-
}
|
|
11452
11509
|
/**
|
|
11453
11510
|
* Migrate all old cache entries to new schema. No rollback supported.
|
|
11454
11511
|
* @param storeAuthStateInCookie
|
|
@@ -12136,7 +12193,7 @@
|
|
|
12136
12193
|
getTemporaryCache(cacheKey, generateKey) {
|
|
12137
12194
|
const key = generateKey ? this.generateCacheKey(cacheKey) : cacheKey;
|
|
12138
12195
|
if (this.cacheConfig.storeAuthStateInCookie) {
|
|
12139
|
-
const itemCookie = this.
|
|
12196
|
+
const itemCookie = this.cookieStorage.getItem(key);
|
|
12140
12197
|
if (itemCookie) {
|
|
12141
12198
|
this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies");
|
|
12142
12199
|
return itemCookie;
|
|
@@ -12171,7 +12228,7 @@
|
|
|
12171
12228
|
this.temporaryCacheStorage.setItem(key, value);
|
|
12172
12229
|
if (this.cacheConfig.storeAuthStateInCookie) {
|
|
12173
12230
|
this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie");
|
|
12174
|
-
this.
|
|
12231
|
+
this.cookieStorage.setItem(key, value, undefined, this.cacheConfig.secureCookies);
|
|
12175
12232
|
}
|
|
12176
12233
|
}
|
|
12177
12234
|
/**
|
|
@@ -12190,7 +12247,7 @@
|
|
|
12190
12247
|
this.temporaryCacheStorage.removeItem(key);
|
|
12191
12248
|
if (this.cacheConfig.storeAuthStateInCookie) {
|
|
12192
12249
|
this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie");
|
|
12193
|
-
this.
|
|
12250
|
+
this.cookieStorage.removeItem(key);
|
|
12194
12251
|
}
|
|
12195
12252
|
}
|
|
12196
12253
|
/**
|
|
@@ -12246,79 +12303,6 @@
|
|
|
12246
12303
|
this.logger.warning(`${removedAccessTokens.length} access tokens with claims in the cache keys have been removed from the cache.`);
|
|
12247
12304
|
}
|
|
12248
12305
|
}
|
|
12249
|
-
/**
|
|
12250
|
-
* Add value to cookies
|
|
12251
|
-
* @param cookieName
|
|
12252
|
-
* @param cookieValue
|
|
12253
|
-
* @param expires
|
|
12254
|
-
* @deprecated
|
|
12255
|
-
*/
|
|
12256
|
-
setItemCookie(cookieName, cookieValue, expires) {
|
|
12257
|
-
let cookieStr = `${encodeURIComponent(cookieName)}=${encodeURIComponent(cookieValue)};path=/;SameSite=Lax;`;
|
|
12258
|
-
if (expires) {
|
|
12259
|
-
const expireTime = this.getCookieExpirationTime(expires);
|
|
12260
|
-
cookieStr += `expires=${expireTime};`;
|
|
12261
|
-
}
|
|
12262
|
-
if (this.cacheConfig.secureCookies) {
|
|
12263
|
-
cookieStr += "Secure;";
|
|
12264
|
-
}
|
|
12265
|
-
document.cookie = cookieStr;
|
|
12266
|
-
}
|
|
12267
|
-
/**
|
|
12268
|
-
* Get one item by key from cookies
|
|
12269
|
-
* @param cookieName
|
|
12270
|
-
* @deprecated
|
|
12271
|
-
*/
|
|
12272
|
-
getItemCookie(cookieName) {
|
|
12273
|
-
const name = `${encodeURIComponent(cookieName)}=`;
|
|
12274
|
-
const cookieList = document.cookie.split(";");
|
|
12275
|
-
for (let i = 0; i < cookieList.length; i++) {
|
|
12276
|
-
let cookie = cookieList[i];
|
|
12277
|
-
while (cookie.charAt(0) === " ") {
|
|
12278
|
-
cookie = cookie.substring(1);
|
|
12279
|
-
}
|
|
12280
|
-
if (cookie.indexOf(name) === 0) {
|
|
12281
|
-
return decodeURIComponent(cookie.substring(name.length, cookie.length));
|
|
12282
|
-
}
|
|
12283
|
-
}
|
|
12284
|
-
return Constants.EMPTY_STRING;
|
|
12285
|
-
}
|
|
12286
|
-
/**
|
|
12287
|
-
* Clear all msal-related cookies currently set in the browser. Should only be used to clear temporary cache items.
|
|
12288
|
-
* @deprecated
|
|
12289
|
-
*/
|
|
12290
|
-
clearMsalCookies() {
|
|
12291
|
-
const cookiePrefix = `${Constants.CACHE_PREFIX}.${this.clientId}`;
|
|
12292
|
-
const cookieList = document.cookie.split(";");
|
|
12293
|
-
cookieList.forEach((cookie) => {
|
|
12294
|
-
while (cookie.charAt(0) === " ") {
|
|
12295
|
-
// eslint-disable-next-line no-param-reassign
|
|
12296
|
-
cookie = cookie.substring(1);
|
|
12297
|
-
}
|
|
12298
|
-
if (cookie.indexOf(cookiePrefix) === 0) {
|
|
12299
|
-
const cookieKey = cookie.split("=")[0];
|
|
12300
|
-
this.clearItemCookie(cookieKey);
|
|
12301
|
-
}
|
|
12302
|
-
});
|
|
12303
|
-
}
|
|
12304
|
-
/**
|
|
12305
|
-
* Clear an item in the cookies by key
|
|
12306
|
-
* @param cookieName
|
|
12307
|
-
* @deprecated
|
|
12308
|
-
*/
|
|
12309
|
-
clearItemCookie(cookieName) {
|
|
12310
|
-
this.setItemCookie(cookieName, Constants.EMPTY_STRING, -1);
|
|
12311
|
-
}
|
|
12312
|
-
/**
|
|
12313
|
-
* Get cookie expiration time
|
|
12314
|
-
* @param cookieLifeDays
|
|
12315
|
-
* @deprecated
|
|
12316
|
-
*/
|
|
12317
|
-
getCookieExpirationTime(cookieLifeDays) {
|
|
12318
|
-
const today = new Date();
|
|
12319
|
-
const expr = new Date(today.getTime() + cookieLifeDays * this.COOKIE_LIFE_MULTIPLIER);
|
|
12320
|
-
return expr.toUTCString();
|
|
12321
|
-
}
|
|
12322
12306
|
/**
|
|
12323
12307
|
* Prepend msal.<client-id> to each key; Skip for any JSON object as Key (defined schemas do not need the key appended: AccessToken Keys or the upcoming schema)
|
|
12324
12308
|
* @param key
|
|
@@ -12442,7 +12426,6 @@
|
|
|
12442
12426
|
this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${cachedState}`);
|
|
12443
12427
|
this.resetRequestCache(cachedState || Constants.EMPTY_STRING);
|
|
12444
12428
|
}
|
|
12445
|
-
this.clearMsalCookies();
|
|
12446
12429
|
}
|
|
12447
12430
|
/**
|
|
12448
12431
|
* Looks in temporary cache for any state values with the provided interactionType and removes all temporary cache items for that state
|
|
@@ -12470,7 +12453,6 @@
|
|
|
12470
12453
|
this.resetRequestCache(stateValue);
|
|
12471
12454
|
}
|
|
12472
12455
|
});
|
|
12473
|
-
this.clearMsalCookies();
|
|
12474
12456
|
this.setInteractionInProgress(false);
|
|
12475
12457
|
}
|
|
12476
12458
|
cacheCodeRequest(authCodeRequest) {
|
|
@@ -13325,6 +13307,10 @@
|
|
|
13325
13307
|
responseMode: this.config.auth.OIDCOptions
|
|
13326
13308
|
.serverResponseType,
|
|
13327
13309
|
};
|
|
13310
|
+
// Skip active account lookup if either login hint or session id is set
|
|
13311
|
+
if (request.loginHint || request.sid) {
|
|
13312
|
+
return validatedRequest;
|
|
13313
|
+
}
|
|
13328
13314
|
const account = request.account || this.browserStorage.getActiveAccount();
|
|
13329
13315
|
if (account) {
|
|
13330
13316
|
this.logger.verbose("Setting validated request account", this.correlationId);
|
|
@@ -19232,6 +19218,42 @@
|
|
|
19232
19218
|
},
|
|
19233
19219
|
};
|
|
19234
19220
|
|
|
19221
|
+
/*
|
|
19222
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19223
|
+
* Licensed under the MIT License.
|
|
19224
|
+
*/
|
|
19225
|
+
/**
|
|
19226
|
+
* @deprecated This class will be removed in a future major version
|
|
19227
|
+
*/
|
|
19228
|
+
class BrowserStorage {
|
|
19229
|
+
constructor(cacheLocation) {
|
|
19230
|
+
if (cacheLocation === BrowserCacheLocation.LocalStorage) {
|
|
19231
|
+
this.windowStorage = new LocalStorage();
|
|
19232
|
+
}
|
|
19233
|
+
else if (cacheLocation === BrowserCacheLocation.SessionStorage) {
|
|
19234
|
+
this.windowStorage = new SessionStorage();
|
|
19235
|
+
}
|
|
19236
|
+
else {
|
|
19237
|
+
throw createBrowserConfigurationAuthError(storageNotSupported);
|
|
19238
|
+
}
|
|
19239
|
+
}
|
|
19240
|
+
getItem(key) {
|
|
19241
|
+
return this.windowStorage.getItem(key);
|
|
19242
|
+
}
|
|
19243
|
+
setItem(key, value) {
|
|
19244
|
+
this.windowStorage.setItem(key, value);
|
|
19245
|
+
}
|
|
19246
|
+
removeItem(key) {
|
|
19247
|
+
this.windowStorage.removeItem(key);
|
|
19248
|
+
}
|
|
19249
|
+
getKeys() {
|
|
19250
|
+
return Object.keys(this.windowStorage);
|
|
19251
|
+
}
|
|
19252
|
+
containsKey(key) {
|
|
19253
|
+
return this.windowStorage.hasOwnProperty(key);
|
|
19254
|
+
}
|
|
19255
|
+
}
|
|
19256
|
+
|
|
19235
19257
|
/*
|
|
19236
19258
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19237
19259
|
* Licensed under the MIT License.
|
|
@@ -19637,6 +19659,7 @@
|
|
|
19637
19659
|
exports.InteractionRequiredAuthErrorMessage = InteractionRequiredAuthErrorMessage;
|
|
19638
19660
|
exports.InteractionStatus = InteractionStatus;
|
|
19639
19661
|
exports.JsonWebTokenTypes = JsonWebTokenTypes;
|
|
19662
|
+
exports.LocalStorage = LocalStorage;
|
|
19640
19663
|
exports.Logger = Logger;
|
|
19641
19664
|
exports.MemoryStorage = MemoryStorage;
|
|
19642
19665
|
exports.NavigationClient = NavigationClient;
|
|
@@ -19648,6 +19671,7 @@
|
|
|
19648
19671
|
exports.PublicClientNext = PublicClientNext;
|
|
19649
19672
|
exports.ServerError = ServerError;
|
|
19650
19673
|
exports.ServerResponseType = ServerResponseType;
|
|
19674
|
+
exports.SessionStorage = SessionStorage;
|
|
19651
19675
|
exports.SignedHttpRequest = SignedHttpRequest;
|
|
19652
19676
|
exports.StringUtils = StringUtils;
|
|
19653
19677
|
exports.StubPerformanceClient = StubPerformanceClient;
|