@azure/msal-browser 3.28.0 → 3.30.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.d.ts +7 -7
- package/dist/cache/AccountManager.d.ts.map +1 -1
- package/dist/cache/AccountManager.mjs +17 -15
- package/dist/cache/AccountManager.mjs.map +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +35 -27
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +187 -91
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +16 -15
- package/dist/cache/TokenCache.mjs.map +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 +29 -19
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +16 -9
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.d.ts +1 -1
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +3 -3
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.d.ts +1 -1
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.mjs +3 -3
- package/dist/crypto/CryptoOps.mjs.map +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.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +5 -5
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +9 -7
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +2 -2
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +2 -2
- package/dist/interaction_client/RedirectClient.mjs.map +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 +3 -2
- 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.d.ts +1 -0
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +2 -1
- package/dist/utils/BrowserConstants.mjs.map +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/utils/BrowserUtils.mjs +4 -2
- package/dist/utils/BrowserUtils.mjs.map +1 -1
- package/lib/msal-browser.cjs +472 -349
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +472 -349
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +65 -66
- package/lib/types/cache/AccountManager.d.ts +7 -7
- package/lib/types/cache/AccountManager.d.ts.map +1 -1
- package/lib/types/cache/BrowserCacheManager.d.ts +35 -27
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/cache/TokenCache.d.ts.map +1 -1
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/crypto/BrowserCrypto.d.ts +1 -1
- package/lib/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/lib/types/crypto/CryptoOps.d.ts +1 -1
- package/lib/types/crypto/CryptoOps.d.ts.map +1 -1
- package/lib/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.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/lib/types/utils/BrowserConstants.d.ts +1 -0
- package/lib/types/utils/BrowserConstants.d.ts.map +1 -1
- package/lib/types/utils/BrowserUtils.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/cache/AccountManager.ts +40 -20
- package/src/cache/BrowserCacheManager.ts +332 -109
- package/src/cache/TokenCache.ts +25 -11
- package/src/controllers/NestedAppAuthController.ts +52 -19
- package/src/controllers/StandardController.ts +26 -7
- package/src/crypto/BrowserCrypto.ts +4 -2
- package/src/crypto/CryptoOps.ts +8 -2
- package/src/interaction_client/BaseInteractionClient.ts +5 -4
- package/src/interaction_client/NativeInteractionClient.ts +22 -12
- package/src/interaction_client/PopupClient.ts +2 -1
- package/src/interaction_client/RedirectClient.ts +2 -1
- package/src/interaction_client/StandardInteractionClient.ts +2 -1
- package/src/packageMetadata.ts +1 -1
- package/src/utils/BrowserConstants.ts +1 -0
- package/src/utils/BrowserUtils.ts +3 -1
|
@@ -15,10 +15,13 @@ export function getAllAccounts(
|
|
|
15
15
|
logger: Logger,
|
|
16
16
|
browserStorage: BrowserCacheManager,
|
|
17
17
|
isInBrowser: boolean,
|
|
18
|
+
correlationId: string,
|
|
18
19
|
accountFilter?: AccountFilter
|
|
19
20
|
): AccountInfo[] {
|
|
20
21
|
logger.verbose("getAllAccounts called");
|
|
21
|
-
return isInBrowser
|
|
22
|
+
return isInBrowser
|
|
23
|
+
? browserStorage.getAllAccounts(correlationId, accountFilter)
|
|
24
|
+
: [];
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
/**
|
|
@@ -29,7 +32,8 @@ export function getAllAccounts(
|
|
|
29
32
|
export function getAccount(
|
|
30
33
|
accountFilter: AccountFilter,
|
|
31
34
|
logger: Logger,
|
|
32
|
-
browserStorage: BrowserCacheManager
|
|
35
|
+
browserStorage: BrowserCacheManager,
|
|
36
|
+
correlationId: string
|
|
33
37
|
): AccountInfo | null {
|
|
34
38
|
logger.trace("getAccount called");
|
|
35
39
|
if (Object.keys(accountFilter).length === 0) {
|
|
@@ -37,8 +41,10 @@ export function getAccount(
|
|
|
37
41
|
return null;
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
const account: AccountInfo | null =
|
|
41
|
-
|
|
44
|
+
const account: AccountInfo | null = browserStorage.getAccountInfoFilteredBy(
|
|
45
|
+
accountFilter,
|
|
46
|
+
correlationId
|
|
47
|
+
);
|
|
42
48
|
|
|
43
49
|
if (account) {
|
|
44
50
|
logger.verbose(
|
|
@@ -62,7 +68,8 @@ export function getAccount(
|
|
|
62
68
|
export function getAccountByUsername(
|
|
63
69
|
username: string,
|
|
64
70
|
logger: Logger,
|
|
65
|
-
browserStorage: BrowserCacheManager
|
|
71
|
+
browserStorage: BrowserCacheManager,
|
|
72
|
+
correlationId: string
|
|
66
73
|
): AccountInfo | null {
|
|
67
74
|
logger.trace("getAccountByUsername called");
|
|
68
75
|
if (!username) {
|
|
@@ -70,9 +77,12 @@ export function getAccountByUsername(
|
|
|
70
77
|
return null;
|
|
71
78
|
}
|
|
72
79
|
|
|
73
|
-
const account = browserStorage.getAccountInfoFilteredBy(
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
const account = browserStorage.getAccountInfoFilteredBy(
|
|
81
|
+
{
|
|
82
|
+
username,
|
|
83
|
+
},
|
|
84
|
+
correlationId
|
|
85
|
+
);
|
|
76
86
|
if (account) {
|
|
77
87
|
logger.verbose(
|
|
78
88
|
"getAccountByUsername: Account matching username found, returning"
|
|
@@ -99,7 +109,8 @@ export function getAccountByUsername(
|
|
|
99
109
|
export function getAccountByHomeId(
|
|
100
110
|
homeAccountId: string,
|
|
101
111
|
logger: Logger,
|
|
102
|
-
browserStorage: BrowserCacheManager
|
|
112
|
+
browserStorage: BrowserCacheManager,
|
|
113
|
+
correlationId: string
|
|
103
114
|
): AccountInfo | null {
|
|
104
115
|
logger.trace("getAccountByHomeId called");
|
|
105
116
|
if (!homeAccountId) {
|
|
@@ -107,9 +118,12 @@ export function getAccountByHomeId(
|
|
|
107
118
|
return null;
|
|
108
119
|
}
|
|
109
120
|
|
|
110
|
-
const account = browserStorage.getAccountInfoFilteredBy(
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
const account = browserStorage.getAccountInfoFilteredBy(
|
|
122
|
+
{
|
|
123
|
+
homeAccountId,
|
|
124
|
+
},
|
|
125
|
+
correlationId
|
|
126
|
+
);
|
|
113
127
|
if (account) {
|
|
114
128
|
logger.verbose(
|
|
115
129
|
"getAccountByHomeId: Account matching homeAccountId found, returning"
|
|
@@ -136,7 +150,8 @@ export function getAccountByHomeId(
|
|
|
136
150
|
export function getAccountByLocalId(
|
|
137
151
|
localAccountId: string,
|
|
138
152
|
logger: Logger,
|
|
139
|
-
browserStorage: BrowserCacheManager
|
|
153
|
+
browserStorage: BrowserCacheManager,
|
|
154
|
+
correlationId: string
|
|
140
155
|
): AccountInfo | null {
|
|
141
156
|
logger.trace("getAccountByLocalId called");
|
|
142
157
|
if (!localAccountId) {
|
|
@@ -144,9 +159,12 @@ export function getAccountByLocalId(
|
|
|
144
159
|
return null;
|
|
145
160
|
}
|
|
146
161
|
|
|
147
|
-
const account = browserStorage.getAccountInfoFilteredBy(
|
|
148
|
-
|
|
149
|
-
|
|
162
|
+
const account = browserStorage.getAccountInfoFilteredBy(
|
|
163
|
+
{
|
|
164
|
+
localAccountId,
|
|
165
|
+
},
|
|
166
|
+
correlationId
|
|
167
|
+
);
|
|
150
168
|
if (account) {
|
|
151
169
|
logger.verbose(
|
|
152
170
|
"getAccountByLocalId: Account matching localAccountId found, returning"
|
|
@@ -169,16 +187,18 @@ export function getAccountByLocalId(
|
|
|
169
187
|
*/
|
|
170
188
|
export function setActiveAccount(
|
|
171
189
|
account: AccountInfo | null,
|
|
172
|
-
browserStorage: BrowserCacheManager
|
|
190
|
+
browserStorage: BrowserCacheManager,
|
|
191
|
+
correlationId: string
|
|
173
192
|
): void {
|
|
174
|
-
browserStorage.setActiveAccount(account);
|
|
193
|
+
browserStorage.setActiveAccount(account, correlationId);
|
|
175
194
|
}
|
|
176
195
|
|
|
177
196
|
/**
|
|
178
197
|
* Gets the currently active account
|
|
179
198
|
*/
|
|
180
199
|
export function getActiveAccount(
|
|
181
|
-
browserStorage: BrowserCacheManager
|
|
200
|
+
browserStorage: BrowserCacheManager,
|
|
201
|
+
correlationId: string
|
|
182
202
|
): AccountInfo | null {
|
|
183
|
-
return browserStorage.getActiveAccount();
|
|
203
|
+
return browserStorage.getActiveAccount(correlationId);
|
|
184
204
|
}
|