@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
BrowserConfigurationAuthErrorCodes,
|
|
8
|
+
createBrowserConfigurationAuthError,
|
|
9
|
+
} from "../error/BrowserConfigurationAuthError.js";
|
|
10
|
+
import { IWindowStorage } from "./IWindowStorage.js";
|
|
11
|
+
|
|
12
|
+
export class SessionStorage implements IWindowStorage<string> {
|
|
13
|
+
constructor() {
|
|
14
|
+
if (!window.sessionStorage) {
|
|
15
|
+
throw createBrowserConfigurationAuthError(
|
|
16
|
+
BrowserConfigurationAuthErrorCodes.storageNotSupported
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
getItem(key: string): string | null {
|
|
22
|
+
return window.sessionStorage.getItem(key);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
setItem(key: string, value: string): void {
|
|
26
|
+
window.sessionStorage.setItem(key, value);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
removeItem(key: string): void {
|
|
30
|
+
window.sessionStorage.removeItem(key);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
getKeys(): string[] {
|
|
34
|
+
return Object.keys(window.sessionStorage);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
containsKey(key: string): boolean {
|
|
38
|
+
return window.sessionStorage.hasOwnProperty(key);
|
|
39
|
+
}
|
|
40
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -75,6 +75,9 @@ export { ITokenCache } from "./cache/ITokenCache.js";
|
|
|
75
75
|
// Storage
|
|
76
76
|
export { MemoryStorage } from "./cache/MemoryStorage.js";
|
|
77
77
|
export { BrowserStorage } from "./cache/BrowserStorage.js";
|
|
78
|
+
export { LocalStorage } from "./cache/LocalStorage.js";
|
|
79
|
+
export { SessionStorage } from "./cache/SessionStorage.js";
|
|
80
|
+
export { IWindowStorage } from "./cache/IWindowStorage.js";
|
|
78
81
|
|
|
79
82
|
// Events
|
|
80
83
|
export {
|
|
@@ -362,6 +362,11 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
362
362
|
.serverResponseType as ResponseMode,
|
|
363
363
|
};
|
|
364
364
|
|
|
365
|
+
// Skip active account lookup if either login hint or session id is set
|
|
366
|
+
if (request.loginHint || request.sid) {
|
|
367
|
+
return validatedRequest;
|
|
368
|
+
}
|
|
369
|
+
|
|
365
370
|
const account =
|
|
366
371
|
request.account || this.browserStorage.getActiveAccount();
|
|
367
372
|
if (account) {
|
package/src/packageMetadata.ts
CHANGED