@azure/msal-browser 4.9.1 → 4.11.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 +7 -3
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +8 -7
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +2 -2
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.d.ts +5 -0
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +4 -3
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +2 -2
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +32 -20
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.d.ts +6 -0
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +2 -2
- package/dist/crypto/BrowserCrypto.mjs.map +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 +2 -2
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +2 -2
- 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.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +4 -4
- 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.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +3 -3
- 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 +2 -2
- 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.d.ts.map +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +3 -3
- package/dist/protocol/Authorize.mjs.map +1 -1
- 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 +5 -0
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +10 -2
- package/dist/utils/BrowserConstants.mjs.map +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +172 -106
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +172 -106
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +62 -62
- package/lib/types/cache/BrowserCacheManager.d.ts +7 -3
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/config/Configuration.d.ts +5 -0
- package/lib/types/config/Configuration.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/crypto/BrowserCrypto.d.ts +6 -0
- package/lib/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.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/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/utils/BrowserConstants.d.ts +5 -0
- package/lib/types/utils/BrowserConstants.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/cache/BrowserCacheManager.ts +43 -31
- package/src/config/Configuration.ts +6 -0
- package/src/controllers/NestedAppAuthController.ts +1 -1
- package/src/controllers/StandardController.ts +82 -54
- package/src/crypto/BrowserCrypto.ts +1 -1
- package/src/interaction_client/RedirectClient.ts +9 -2
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +12 -2
- package/src/utils/BrowserConstants.ts +7 -0
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v4.
|
|
1
|
+
/*! @azure/msal-browser v4.11.0 2025-04-16 */
|
|
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 v15.
|
|
9
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -66,10 +66,26 @@
|
|
|
66
66
|
INVALID_INSTANCE: "invalid_instance",
|
|
67
67
|
};
|
|
68
68
|
const HttpStatus = {
|
|
69
|
+
SUCCESS: 200,
|
|
70
|
+
SUCCESS_RANGE_START: 200,
|
|
71
|
+
SUCCESS_RANGE_END: 299,
|
|
72
|
+
REDIRECT: 302,
|
|
73
|
+
CLIENT_ERROR: 400,
|
|
69
74
|
CLIENT_ERROR_RANGE_START: 400,
|
|
75
|
+
BAD_REQUEST: 400,
|
|
76
|
+
UNAUTHORIZED: 401,
|
|
77
|
+
NOT_FOUND: 404,
|
|
78
|
+
REQUEST_TIMEOUT: 408,
|
|
79
|
+
GONE: 410,
|
|
80
|
+
TOO_MANY_REQUESTS: 429,
|
|
70
81
|
CLIENT_ERROR_RANGE_END: 499,
|
|
82
|
+
SERVER_ERROR: 500,
|
|
71
83
|
SERVER_ERROR_RANGE_START: 500,
|
|
72
|
-
|
|
84
|
+
SERVICE_UNAVAILABLE: 503,
|
|
85
|
+
GATEWAY_TIMEOUT: 504,
|
|
86
|
+
SERVER_ERROR_RANGE_END: 599,
|
|
87
|
+
MULTI_SIDED_ERROR: 600,
|
|
88
|
+
};
|
|
73
89
|
const OIDC_DEFAULT_SCOPES = [
|
|
74
90
|
Constants.OPENID_SCOPE,
|
|
75
91
|
Constants.PROFILE_SCOPE,
|
|
@@ -135,6 +151,7 @@
|
|
|
135
151
|
*/
|
|
136
152
|
const OAuthResponseType = {
|
|
137
153
|
CODE: "code",
|
|
154
|
+
IDTOKEN_TOKEN: "id_token token",
|
|
138
155
|
IDTOKEN_TOKEN_REFRESHTOKEN: "id_token token refresh_token",
|
|
139
156
|
};
|
|
140
157
|
/**
|
|
@@ -149,19 +166,29 @@
|
|
|
149
166
|
* allowed values for response_mode
|
|
150
167
|
*/
|
|
151
168
|
const ResponseMode = {
|
|
152
|
-
QUERY: "query"
|
|
169
|
+
QUERY: "query",
|
|
170
|
+
FRAGMENT: "fragment",
|
|
171
|
+
FORM_POST: "form_post",
|
|
172
|
+
};
|
|
153
173
|
/**
|
|
154
174
|
* allowed grant_type
|
|
155
175
|
*/
|
|
156
176
|
const GrantType = {
|
|
177
|
+
IMPLICIT_GRANT: "implicit",
|
|
157
178
|
AUTHORIZATION_CODE_GRANT: "authorization_code",
|
|
158
|
-
|
|
179
|
+
CLIENT_CREDENTIALS_GRANT: "client_credentials",
|
|
180
|
+
RESOURCE_OWNER_PASSWORD_GRANT: "password",
|
|
181
|
+
REFRESH_TOKEN_GRANT: "refresh_token",
|
|
182
|
+
DEVICE_CODE_GRANT: "device_code",
|
|
183
|
+
JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
184
|
+
};
|
|
159
185
|
/**
|
|
160
186
|
* Account types in Cache
|
|
161
187
|
*/
|
|
162
188
|
const CacheAccountType = {
|
|
163
189
|
MSSTS_ACCOUNT_TYPE: "MSSTS",
|
|
164
190
|
ADFS_ACCOUNT_TYPE: "ADFS",
|
|
191
|
+
MSAV1_ACCOUNT_TYPE: "MSA",
|
|
165
192
|
GENERIC_ACCOUNT_TYPE: "Generic", // NTLM, Kerberos, FBA, Basic etc
|
|
166
193
|
};
|
|
167
194
|
/**
|
|
@@ -198,6 +225,7 @@
|
|
|
198
225
|
};
|
|
199
226
|
const SERVER_TELEM_CONSTANTS = {
|
|
200
227
|
SCHEMA_VERSION: 5,
|
|
228
|
+
MAX_CUR_HEADER_BYTES: 80,
|
|
201
229
|
MAX_LAST_HEADER_BYTES: 330,
|
|
202
230
|
MAX_CACHED_ERRORS: 50,
|
|
203
231
|
CACHE_KEY: "server-telemetry",
|
|
@@ -252,7 +280,9 @@
|
|
|
252
280
|
* Region Discovery Outcomes
|
|
253
281
|
*/
|
|
254
282
|
const RegionDiscoveryOutcomes = {
|
|
283
|
+
CONFIGURED_MATCHES_DETECTED: "1",
|
|
255
284
|
CONFIGURED_NO_AUTO_DETECTION: "2",
|
|
285
|
+
CONFIGURED_NOT_DETECTED: "3",
|
|
256
286
|
AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4",
|
|
257
287
|
AUTO_DETECTION_REQUESTED_FAILED: "5",
|
|
258
288
|
};
|
|
@@ -279,7 +309,7 @@
|
|
|
279
309
|
// Token renewal offset default in seconds
|
|
280
310
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
281
311
|
|
|
282
|
-
/*! @azure/msal-common v15.
|
|
312
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
283
313
|
/*
|
|
284
314
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
285
315
|
* Licensed under the MIT License.
|
|
@@ -296,7 +326,7 @@
|
|
|
296
326
|
unexpectedError: unexpectedError
|
|
297
327
|
});
|
|
298
328
|
|
|
299
|
-
/*! @azure/msal-common v15.
|
|
329
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
300
330
|
|
|
301
331
|
/*
|
|
302
332
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -345,7 +375,7 @@
|
|
|
345
375
|
: AuthErrorMessages[code]);
|
|
346
376
|
}
|
|
347
377
|
|
|
348
|
-
/*! @azure/msal-common v15.
|
|
378
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
349
379
|
/*
|
|
350
380
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
351
381
|
* Licensed under the MIT License.
|
|
@@ -443,7 +473,7 @@
|
|
|
443
473
|
userTimeoutReached: userTimeoutReached
|
|
444
474
|
});
|
|
445
475
|
|
|
446
|
-
/*! @azure/msal-common v15.
|
|
476
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
447
477
|
|
|
448
478
|
/*
|
|
449
479
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -695,7 +725,7 @@
|
|
|
695
725
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
696
726
|
}
|
|
697
727
|
|
|
698
|
-
/*! @azure/msal-common v15.
|
|
728
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
699
729
|
|
|
700
730
|
/*
|
|
701
731
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -734,7 +764,7 @@
|
|
|
734
764
|
},
|
|
735
765
|
};
|
|
736
766
|
|
|
737
|
-
/*! @azure/msal-common v15.
|
|
767
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
738
768
|
|
|
739
769
|
/*
|
|
740
770
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -925,12 +955,12 @@
|
|
|
925
955
|
}
|
|
926
956
|
}
|
|
927
957
|
|
|
928
|
-
/*! @azure/msal-common v15.
|
|
958
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
929
959
|
/* eslint-disable header/header */
|
|
930
960
|
const name$1 = "@azure/msal-common";
|
|
931
|
-
const version$1 = "15.
|
|
961
|
+
const version$1 = "15.5.1";
|
|
932
962
|
|
|
933
|
-
/*! @azure/msal-common v15.
|
|
963
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
934
964
|
/*
|
|
935
965
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
936
966
|
* Licensed under the MIT License.
|
|
@@ -950,7 +980,7 @@
|
|
|
950
980
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
951
981
|
};
|
|
952
982
|
|
|
953
|
-
/*! @azure/msal-common v15.
|
|
983
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
954
984
|
|
|
955
985
|
/*
|
|
956
986
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1011,7 +1041,7 @@
|
|
|
1011
1041
|
}
|
|
1012
1042
|
}
|
|
1013
1043
|
|
|
1014
|
-
/*! @azure/msal-common v15.
|
|
1044
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1015
1045
|
/*
|
|
1016
1046
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1017
1047
|
* Licensed under the MIT License.
|
|
@@ -1066,7 +1096,7 @@
|
|
|
1066
1096
|
return cachedAtSec > nowSeconds();
|
|
1067
1097
|
}
|
|
1068
1098
|
|
|
1069
|
-
/*! @azure/msal-common v15.
|
|
1099
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1070
1100
|
|
|
1071
1101
|
/*
|
|
1072
1102
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1393,7 +1423,7 @@
|
|
|
1393
1423
|
return metadata.expiresAt <= nowSeconds();
|
|
1394
1424
|
}
|
|
1395
1425
|
|
|
1396
|
-
/*! @azure/msal-common v15.
|
|
1426
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1397
1427
|
/*
|
|
1398
1428
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1399
1429
|
* Licensed under the MIT License.
|
|
@@ -1447,7 +1477,7 @@
|
|
|
1447
1477
|
urlParseError: urlParseError
|
|
1448
1478
|
});
|
|
1449
1479
|
|
|
1450
|
-
/*! @azure/msal-common v15.
|
|
1480
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1451
1481
|
|
|
1452
1482
|
/*
|
|
1453
1483
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1585,7 +1615,7 @@
|
|
|
1585
1615
|
return new ClientConfigurationError(errorCode);
|
|
1586
1616
|
}
|
|
1587
1617
|
|
|
1588
|
-
/*! @azure/msal-common v15.
|
|
1618
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1589
1619
|
/*
|
|
1590
1620
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1591
1621
|
* Licensed under the MIT License.
|
|
@@ -1682,7 +1712,7 @@
|
|
|
1682
1712
|
}
|
|
1683
1713
|
}
|
|
1684
1714
|
|
|
1685
|
-
/*! @azure/msal-common v15.
|
|
1715
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1686
1716
|
|
|
1687
1717
|
/*
|
|
1688
1718
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1873,7 +1903,7 @@
|
|
|
1873
1903
|
}
|
|
1874
1904
|
}
|
|
1875
1905
|
|
|
1876
|
-
/*! @azure/msal-common v15.
|
|
1906
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1877
1907
|
|
|
1878
1908
|
/*
|
|
1879
1909
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1913,7 +1943,7 @@
|
|
|
1913
1943
|
};
|
|
1914
1944
|
}
|
|
1915
1945
|
|
|
1916
|
-
/*! @azure/msal-common v15.
|
|
1946
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1917
1947
|
/*
|
|
1918
1948
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1919
1949
|
* Licensed under the MIT License.
|
|
@@ -1992,7 +2022,7 @@
|
|
|
1992
2022
|
return updatedAccountInfo;
|
|
1993
2023
|
}
|
|
1994
2024
|
|
|
1995
|
-
/*! @azure/msal-common v15.
|
|
2025
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
1996
2026
|
/*
|
|
1997
2027
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1998
2028
|
* Licensed under the MIT License.
|
|
@@ -2007,7 +2037,7 @@
|
|
|
2007
2037
|
Ciam: 3,
|
|
2008
2038
|
};
|
|
2009
2039
|
|
|
2010
|
-
/*! @azure/msal-common v15.
|
|
2040
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2011
2041
|
/*
|
|
2012
2042
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2013
2043
|
* Licensed under the MIT License.
|
|
@@ -2029,7 +2059,7 @@
|
|
|
2029
2059
|
return null;
|
|
2030
2060
|
}
|
|
2031
2061
|
|
|
2032
|
-
/*! @azure/msal-common v15.
|
|
2062
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2033
2063
|
/*
|
|
2034
2064
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2035
2065
|
* Licensed under the MIT License.
|
|
@@ -2053,7 +2083,7 @@
|
|
|
2053
2083
|
EAR: "EAR",
|
|
2054
2084
|
};
|
|
2055
2085
|
|
|
2056
|
-
/*! @azure/msal-common v15.
|
|
2086
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2057
2087
|
|
|
2058
2088
|
/*
|
|
2059
2089
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2296,7 +2326,7 @@
|
|
|
2296
2326
|
}
|
|
2297
2327
|
}
|
|
2298
2328
|
|
|
2299
|
-
/*! @azure/msal-common v15.
|
|
2329
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2300
2330
|
|
|
2301
2331
|
/*
|
|
2302
2332
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2346,15 +2376,22 @@
|
|
|
2346
2376
|
/**
|
|
2347
2377
|
* Utility to create a URL from the params map
|
|
2348
2378
|
*/
|
|
2349
|
-
function mapToQueryString(parameters) {
|
|
2379
|
+
function mapToQueryString(parameters, encodeExtraParams = true, extraQueryParameters) {
|
|
2350
2380
|
const queryParameterArray = new Array();
|
|
2351
2381
|
parameters.forEach((value, key) => {
|
|
2352
|
-
|
|
2382
|
+
if (!encodeExtraParams &&
|
|
2383
|
+
extraQueryParameters &&
|
|
2384
|
+
key in extraQueryParameters) {
|
|
2385
|
+
queryParameterArray.push(`${key}=${value}`);
|
|
2386
|
+
}
|
|
2387
|
+
else {
|
|
2388
|
+
queryParameterArray.push(`${key}=${encodeURIComponent(value)}`);
|
|
2389
|
+
}
|
|
2353
2390
|
});
|
|
2354
2391
|
return queryParameterArray.join("&");
|
|
2355
2392
|
}
|
|
2356
2393
|
|
|
2357
|
-
/*! @azure/msal-common v15.
|
|
2394
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2358
2395
|
|
|
2359
2396
|
/*
|
|
2360
2397
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2518,7 +2555,7 @@
|
|
|
2518
2555
|
}
|
|
2519
2556
|
}
|
|
2520
2557
|
|
|
2521
|
-
/*! @azure/msal-common v15.
|
|
2558
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2522
2559
|
|
|
2523
2560
|
/*
|
|
2524
2561
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2549,6 +2586,7 @@
|
|
|
2549
2586
|
},
|
|
2550
2587
|
},
|
|
2551
2588
|
instanceDiscoveryMetadata: {
|
|
2589
|
+
tenant_discovery_endpoint: "https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",
|
|
2552
2590
|
metadata: [
|
|
2553
2591
|
{
|
|
2554
2592
|
preferred_network: "login.microsoftonline.com",
|
|
@@ -2657,7 +2695,7 @@
|
|
|
2657
2695
|
return null;
|
|
2658
2696
|
}
|
|
2659
2697
|
|
|
2660
|
-
/*! @azure/msal-common v15.
|
|
2698
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2661
2699
|
/*
|
|
2662
2700
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2663
2701
|
* Licensed under the MIT License.
|
|
@@ -2665,7 +2703,7 @@
|
|
|
2665
2703
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
2666
2704
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
2667
2705
|
|
|
2668
|
-
/*! @azure/msal-common v15.
|
|
2706
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2669
2707
|
|
|
2670
2708
|
/*
|
|
2671
2709
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2692,7 +2730,7 @@
|
|
|
2692
2730
|
}
|
|
2693
2731
|
}
|
|
2694
2732
|
|
|
2695
|
-
/*! @azure/msal-common v15.
|
|
2733
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
2696
2734
|
|
|
2697
2735
|
/*
|
|
2698
2736
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3877,7 +3915,7 @@
|
|
|
3877
3915
|
}
|
|
3878
3916
|
}
|
|
3879
3917
|
|
|
3880
|
-
/*! @azure/msal-common v15.
|
|
3918
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
3881
3919
|
|
|
3882
3920
|
/*
|
|
3883
3921
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3965,6 +4003,7 @@
|
|
|
3965
4003
|
azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
|
|
3966
4004
|
skipAuthorityMetadataCache: false,
|
|
3967
4005
|
instanceAware: false,
|
|
4006
|
+
encodeExtraQueryParams: false,
|
|
3968
4007
|
...authOptions,
|
|
3969
4008
|
};
|
|
3970
4009
|
}
|
|
@@ -3976,7 +4015,7 @@
|
|
|
3976
4015
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
3977
4016
|
}
|
|
3978
4017
|
|
|
3979
|
-
/*! @azure/msal-common v15.
|
|
4018
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
3980
4019
|
/*
|
|
3981
4020
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3982
4021
|
* Licensed under the MIT License.
|
|
@@ -3986,7 +4025,7 @@
|
|
|
3986
4025
|
UPN: "UPN",
|
|
3987
4026
|
};
|
|
3988
4027
|
|
|
3989
|
-
/*! @azure/msal-common v15.
|
|
4028
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
3990
4029
|
/*
|
|
3991
4030
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3992
4031
|
* Licensed under the MIT License.
|
|
@@ -4036,7 +4075,7 @@
|
|
|
4036
4075
|
const EAR_JWK = "ear_jwk";
|
|
4037
4076
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
4038
4077
|
|
|
4039
|
-
/*! @azure/msal-common v15.
|
|
4078
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
4040
4079
|
|
|
4041
4080
|
/*
|
|
4042
4081
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4404,7 +4443,7 @@
|
|
|
4404
4443
|
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
4405
4444
|
}
|
|
4406
4445
|
|
|
4407
|
-
/*! @azure/msal-common v15.
|
|
4446
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
4408
4447
|
/*
|
|
4409
4448
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4410
4449
|
* Licensed under the MIT License.
|
|
@@ -4416,7 +4455,7 @@
|
|
|
4416
4455
|
response.hasOwnProperty("jwks_uri"));
|
|
4417
4456
|
}
|
|
4418
4457
|
|
|
4419
|
-
/*! @azure/msal-common v15.
|
|
4458
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
4420
4459
|
/*
|
|
4421
4460
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4422
4461
|
* Licensed under the MIT License.
|
|
@@ -4426,7 +4465,7 @@
|
|
|
4426
4465
|
response.hasOwnProperty("metadata"));
|
|
4427
4466
|
}
|
|
4428
4467
|
|
|
4429
|
-
/*! @azure/msal-common v15.
|
|
4468
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
4430
4469
|
/*
|
|
4431
4470
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4432
4471
|
* Licensed under the MIT License.
|
|
@@ -4436,7 +4475,7 @@
|
|
|
4436
4475
|
response.hasOwnProperty("error_description"));
|
|
4437
4476
|
}
|
|
4438
4477
|
|
|
4439
|
-
/*! @azure/msal-common v15.
|
|
4478
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
4440
4479
|
/*
|
|
4441
4480
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4442
4481
|
* Licensed under the MIT License.
|
|
@@ -4928,6 +4967,7 @@
|
|
|
4928
4967
|
* @enum {number}
|
|
4929
4968
|
*/
|
|
4930
4969
|
const PerformanceEventStatus = {
|
|
4970
|
+
NotStarted: 0,
|
|
4931
4971
|
InProgress: 1,
|
|
4932
4972
|
Completed: 2,
|
|
4933
4973
|
};
|
|
@@ -4948,7 +4988,7 @@
|
|
|
4948
4988
|
"encryptedCacheExpiredCount",
|
|
4949
4989
|
]);
|
|
4950
4990
|
|
|
4951
|
-
/*! @azure/msal-common v15.
|
|
4991
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
4952
4992
|
/*
|
|
4953
4993
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4954
4994
|
* Licensed under the MIT License.
|
|
@@ -5044,7 +5084,7 @@
|
|
|
5044
5084
|
};
|
|
5045
5085
|
};
|
|
5046
5086
|
|
|
5047
|
-
/*! @azure/msal-common v15.
|
|
5087
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
5048
5088
|
|
|
5049
5089
|
/*
|
|
5050
5090
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5153,7 +5193,7 @@
|
|
|
5153
5193
|
},
|
|
5154
5194
|
};
|
|
5155
5195
|
|
|
5156
|
-
/*! @azure/msal-common v15.
|
|
5196
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
5157
5197
|
|
|
5158
5198
|
/*
|
|
5159
5199
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5992,7 +6032,7 @@
|
|
|
5992
6032
|
};
|
|
5993
6033
|
}
|
|
5994
6034
|
|
|
5995
|
-
/*! @azure/msal-common v15.
|
|
6035
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
5996
6036
|
|
|
5997
6037
|
/*
|
|
5998
6038
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6023,7 +6063,7 @@
|
|
|
6023
6063
|
}
|
|
6024
6064
|
}
|
|
6025
6065
|
|
|
6026
|
-
/*! @azure/msal-common v15.
|
|
6066
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6027
6067
|
|
|
6028
6068
|
/*
|
|
6029
6069
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6042,7 +6082,7 @@
|
|
|
6042
6082
|
}
|
|
6043
6083
|
}
|
|
6044
6084
|
|
|
6045
|
-
/*! @azure/msal-common v15.
|
|
6085
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6046
6086
|
/*
|
|
6047
6087
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6048
6088
|
* Licensed under the MIT License.
|
|
@@ -6063,7 +6103,7 @@
|
|
|
6063
6103
|
};
|
|
6064
6104
|
}
|
|
6065
6105
|
|
|
6066
|
-
/*! @azure/msal-common v15.
|
|
6106
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6067
6107
|
|
|
6068
6108
|
/*
|
|
6069
6109
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6150,7 +6190,7 @@
|
|
|
6150
6190
|
}
|
|
6151
6191
|
}
|
|
6152
6192
|
|
|
6153
|
-
/*! @azure/msal-common v15.
|
|
6193
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6154
6194
|
|
|
6155
6195
|
/*
|
|
6156
6196
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6180,7 +6220,7 @@
|
|
|
6180
6220
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6181
6221
|
}
|
|
6182
6222
|
|
|
6183
|
-
/*! @azure/msal-common v15.
|
|
6223
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6184
6224
|
|
|
6185
6225
|
/*
|
|
6186
6226
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6328,7 +6368,7 @@
|
|
|
6328
6368
|
}
|
|
6329
6369
|
}
|
|
6330
6370
|
|
|
6331
|
-
/*! @azure/msal-common v15.
|
|
6371
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6332
6372
|
/*
|
|
6333
6373
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6334
6374
|
* Licensed under the MIT License.
|
|
@@ -6354,7 +6394,7 @@
|
|
|
6354
6394
|
refreshTokenExpired: refreshTokenExpired
|
|
6355
6395
|
});
|
|
6356
6396
|
|
|
6357
|
-
/*! @azure/msal-common v15.
|
|
6397
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6358
6398
|
|
|
6359
6399
|
/*
|
|
6360
6400
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6442,7 +6482,7 @@
|
|
|
6442
6482
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6443
6483
|
}
|
|
6444
6484
|
|
|
6445
|
-
/*! @azure/msal-common v15.
|
|
6485
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6446
6486
|
|
|
6447
6487
|
/*
|
|
6448
6488
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6514,14 +6554,16 @@
|
|
|
6514
6554
|
}
|
|
6515
6555
|
}
|
|
6516
6556
|
|
|
6517
|
-
/*! @azure/msal-common v15.
|
|
6557
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6518
6558
|
|
|
6519
6559
|
/*
|
|
6520
6560
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6521
6561
|
* Licensed under the MIT License.
|
|
6522
6562
|
*/
|
|
6523
6563
|
const KeyLocation = {
|
|
6524
|
-
SW: "sw"
|
|
6564
|
+
SW: "sw",
|
|
6565
|
+
UHW: "uhw",
|
|
6566
|
+
};
|
|
6525
6567
|
/** @internal */
|
|
6526
6568
|
class PopTokenGenerator {
|
|
6527
6569
|
constructor(cryptoUtils, performanceClient) {
|
|
@@ -6596,7 +6638,7 @@
|
|
|
6596
6638
|
}
|
|
6597
6639
|
}
|
|
6598
6640
|
|
|
6599
|
-
/*! @azure/msal-common v15.
|
|
6641
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6600
6642
|
/*
|
|
6601
6643
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6602
6644
|
* Licensed under the MIT License.
|
|
@@ -6623,7 +6665,7 @@
|
|
|
6623
6665
|
}
|
|
6624
6666
|
}
|
|
6625
6667
|
|
|
6626
|
-
/*! @azure/msal-common v15.
|
|
6668
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6627
6669
|
|
|
6628
6670
|
/*
|
|
6629
6671
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6954,7 +6996,7 @@
|
|
|
6954
6996
|
return baseAccount;
|
|
6955
6997
|
}
|
|
6956
6998
|
|
|
6957
|
-
/*! @azure/msal-common v15.
|
|
6999
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
6958
7000
|
|
|
6959
7001
|
/*
|
|
6960
7002
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7021,7 +7063,7 @@
|
|
|
7021
7063
|
}
|
|
7022
7064
|
}
|
|
7023
7065
|
|
|
7024
|
-
/*! @azure/msal-common v15.
|
|
7066
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7025
7067
|
/*
|
|
7026
7068
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7027
7069
|
* Licensed under the MIT License.
|
|
@@ -7039,7 +7081,7 @@
|
|
|
7039
7081
|
}
|
|
7040
7082
|
}
|
|
7041
7083
|
|
|
7042
|
-
/*! @azure/msal-common v15.
|
|
7084
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7043
7085
|
|
|
7044
7086
|
/*
|
|
7045
7087
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7268,11 +7310,11 @@
|
|
|
7268
7310
|
if (this.config.authOptions.instanceAware) {
|
|
7269
7311
|
addInstanceAware(parameters);
|
|
7270
7312
|
}
|
|
7271
|
-
return mapToQueryString(parameters);
|
|
7313
|
+
return mapToQueryString(parameters, this.config.authOptions.encodeExtraQueryParams, request.extraQueryParameters);
|
|
7272
7314
|
}
|
|
7273
7315
|
}
|
|
7274
7316
|
|
|
7275
|
-
/*! @azure/msal-common v15.
|
|
7317
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7276
7318
|
|
|
7277
7319
|
/*
|
|
7278
7320
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7481,7 +7523,7 @@
|
|
|
7481
7523
|
}
|
|
7482
7524
|
}
|
|
7483
7525
|
|
|
7484
|
-
/*! @azure/msal-common v15.
|
|
7526
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7485
7527
|
|
|
7486
7528
|
/*
|
|
7487
7529
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7579,7 +7621,7 @@
|
|
|
7579
7621
|
}
|
|
7580
7622
|
}
|
|
7581
7623
|
|
|
7582
|
-
/*! @azure/msal-common v15.
|
|
7624
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7583
7625
|
|
|
7584
7626
|
/*
|
|
7585
7627
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7594,7 +7636,7 @@
|
|
|
7594
7636
|
},
|
|
7595
7637
|
};
|
|
7596
7638
|
|
|
7597
|
-
/*! @azure/msal-common v15.
|
|
7639
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7598
7640
|
|
|
7599
7641
|
/*
|
|
7600
7642
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7737,8 +7779,8 @@
|
|
|
7737
7779
|
* @param requestParameters
|
|
7738
7780
|
* @returns
|
|
7739
7781
|
*/
|
|
7740
|
-
function getAuthorizeUrl(authority, requestParameters) {
|
|
7741
|
-
const queryString = mapToQueryString(requestParameters);
|
|
7782
|
+
function getAuthorizeUrl(authority, requestParameters, encodeParams, extraQueryParameters) {
|
|
7783
|
+
const queryString = mapToQueryString(requestParameters, encodeParams, extraQueryParameters);
|
|
7742
7784
|
return UrlString.appendQueryString(authority.authorizationEndpoint, queryString);
|
|
7743
7785
|
}
|
|
7744
7786
|
/**
|
|
@@ -7818,7 +7860,7 @@
|
|
|
7818
7860
|
return account.idTokenClaims?.login_hint || null;
|
|
7819
7861
|
}
|
|
7820
7862
|
|
|
7821
|
-
/*! @azure/msal-common v15.
|
|
7863
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7822
7864
|
|
|
7823
7865
|
/*
|
|
7824
7866
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7876,7 +7918,7 @@
|
|
|
7876
7918
|
}
|
|
7877
7919
|
}
|
|
7878
7920
|
|
|
7879
|
-
/*! @azure/msal-common v15.
|
|
7921
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
7880
7922
|
|
|
7881
7923
|
/*
|
|
7882
7924
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8139,7 +8181,7 @@
|
|
|
8139
8181
|
}
|
|
8140
8182
|
}
|
|
8141
8183
|
|
|
8142
|
-
/*! @azure/msal-common v15.
|
|
8184
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
8143
8185
|
/*
|
|
8144
8186
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8145
8187
|
* Licensed under the MIT License.
|
|
@@ -8147,7 +8189,7 @@
|
|
|
8147
8189
|
const missingKidError = "missing_kid_error";
|
|
8148
8190
|
const missingAlgError = "missing_alg_error";
|
|
8149
8191
|
|
|
8150
|
-
/*! @azure/msal-common v15.
|
|
8192
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
8151
8193
|
|
|
8152
8194
|
/*
|
|
8153
8195
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8172,7 +8214,7 @@
|
|
|
8172
8214
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
8173
8215
|
}
|
|
8174
8216
|
|
|
8175
|
-
/*! @azure/msal-common v15.
|
|
8217
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
8176
8218
|
|
|
8177
8219
|
/*
|
|
8178
8220
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8212,7 +8254,7 @@
|
|
|
8212
8254
|
}
|
|
8213
8255
|
}
|
|
8214
8256
|
|
|
8215
|
-
/*! @azure/msal-common v15.
|
|
8257
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
8216
8258
|
|
|
8217
8259
|
/*
|
|
8218
8260
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8291,7 +8333,7 @@
|
|
|
8291
8333
|
}
|
|
8292
8334
|
}
|
|
8293
8335
|
|
|
8294
|
-
/*! @azure/msal-common v15.
|
|
8336
|
+
/*! @azure/msal-common v15.5.1 2025-04-16 */
|
|
8295
8337
|
|
|
8296
8338
|
/*
|
|
8297
8339
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9281,6 +9323,10 @@
|
|
|
9281
9323
|
* Constants
|
|
9282
9324
|
*/
|
|
9283
9325
|
const BrowserConstants = {
|
|
9326
|
+
/**
|
|
9327
|
+
* Interaction in progress cache value
|
|
9328
|
+
*/
|
|
9329
|
+
INTERACTION_IN_PROGRESS_VALUE: "interaction_in_progress",
|
|
9284
9330
|
/**
|
|
9285
9331
|
* Invalid grant error code
|
|
9286
9332
|
*/
|
|
@@ -9329,6 +9375,10 @@
|
|
|
9329
9375
|
GET: "GET",
|
|
9330
9376
|
POST: "POST",
|
|
9331
9377
|
};
|
|
9378
|
+
const INTERACTION_TYPE = {
|
|
9379
|
+
SIGNIN: "signin",
|
|
9380
|
+
SIGNOUT: "signout",
|
|
9381
|
+
};
|
|
9332
9382
|
/**
|
|
9333
9383
|
* Temporary cache keys for MSAL, deleted after any request.
|
|
9334
9384
|
*/
|
|
@@ -10294,6 +10344,7 @@
|
|
|
10294
10344
|
skipAuthorityMetadataCache: false,
|
|
10295
10345
|
supportsNestedAppAuth: false,
|
|
10296
10346
|
instanceAware: false,
|
|
10347
|
+
encodeExtraQueryParams: false,
|
|
10297
10348
|
};
|
|
10298
10349
|
// Default cache options for browser
|
|
10299
10350
|
const DEFAULT_CACHE_OPTIONS = {
|
|
@@ -10380,7 +10431,7 @@
|
|
|
10380
10431
|
|
|
10381
10432
|
/* eslint-disable header/header */
|
|
10382
10433
|
const name = "@azure/msal-browser";
|
|
10383
|
-
const version = "4.
|
|
10434
|
+
const version = "4.11.0";
|
|
10384
10435
|
|
|
10385
10436
|
/*
|
|
10386
10437
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -12466,7 +12517,7 @@
|
|
|
12466
12517
|
return parsedRequest;
|
|
12467
12518
|
}
|
|
12468
12519
|
isInteractionInProgress(matchClientId) {
|
|
12469
|
-
const clientId = this.getInteractionInProgress();
|
|
12520
|
+
const clientId = this.getInteractionInProgress()?.clientId;
|
|
12470
12521
|
if (matchClientId) {
|
|
12471
12522
|
return clientId === this.clientId;
|
|
12472
12523
|
}
|
|
@@ -12476,9 +12527,10 @@
|
|
|
12476
12527
|
}
|
|
12477
12528
|
getInteractionInProgress() {
|
|
12478
12529
|
const key = `${Constants.CACHE_PREFIX}.${TemporaryCacheKeys.INTERACTION_STATUS_KEY}`;
|
|
12479
|
-
|
|
12530
|
+
const value = this.getTemporaryCache(key, false);
|
|
12531
|
+
return value ? JSON.parse(value) : null;
|
|
12480
12532
|
}
|
|
12481
|
-
setInteractionInProgress(inProgress) {
|
|
12533
|
+
setInteractionInProgress(inProgress, type = INTERACTION_TYPE.SIGNIN) {
|
|
12482
12534
|
// Ensure we don't overwrite interaction in progress for a different clientId
|
|
12483
12535
|
const key = `${Constants.CACHE_PREFIX}.${TemporaryCacheKeys.INTERACTION_STATUS_KEY}`;
|
|
12484
12536
|
if (inProgress) {
|
|
@@ -12487,11 +12539,11 @@
|
|
|
12487
12539
|
}
|
|
12488
12540
|
else {
|
|
12489
12541
|
// No interaction is in progress
|
|
12490
|
-
this.setTemporaryCache(key, this.clientId, false);
|
|
12542
|
+
this.setTemporaryCache(key, JSON.stringify({ clientId: this.clientId, type }), false);
|
|
12491
12543
|
}
|
|
12492
12544
|
}
|
|
12493
12545
|
else if (!inProgress &&
|
|
12494
|
-
this.getInteractionInProgress() === this.clientId) {
|
|
12546
|
+
this.getInteractionInProgress()?.clientId === this.clientId) {
|
|
12495
12547
|
this.removeTemporaryItem(key);
|
|
12496
12548
|
}
|
|
12497
12549
|
}
|
|
@@ -14435,7 +14487,7 @@
|
|
|
14435
14487
|
addResponseType(parameters, OAuthResponseType.CODE);
|
|
14436
14488
|
addCodeChallengeParams(parameters, request.codeChallenge, Constants.S256_CODE_CHALLENGE_METHOD);
|
|
14437
14489
|
addExtraQueryParameters(parameters, request.extraQueryParameters || {});
|
|
14438
|
-
return getAuthorizeUrl(authority, parameters);
|
|
14490
|
+
return getAuthorizeUrl(authority, parameters, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
|
|
14439
14491
|
}
|
|
14440
14492
|
/**
|
|
14441
14493
|
* Gets the form that will be posted to /authorize with request parameters when using EAR
|
|
@@ -14449,7 +14501,7 @@
|
|
|
14449
14501
|
addEARParameters(parameters, request.earJwk);
|
|
14450
14502
|
const queryParams = new Map();
|
|
14451
14503
|
addExtraQueryParameters(queryParams, request.extraQueryParameters || {});
|
|
14452
|
-
const url = getAuthorizeUrl(authority, queryParams);
|
|
14504
|
+
const url = getAuthorizeUrl(authority, queryParams, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
|
|
14453
14505
|
return createForm(frame, url, parameters);
|
|
14454
14506
|
}
|
|
14455
14507
|
/**
|
|
@@ -15447,7 +15499,7 @@
|
|
|
15447
15499
|
this.logger.verbose("Logout onRedirectNavigate did not return false, navigating");
|
|
15448
15500
|
// Ensure interaction is in progress
|
|
15449
15501
|
if (!this.browserStorage.getInteractionInProgress()) {
|
|
15450
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
15502
|
+
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNOUT);
|
|
15451
15503
|
}
|
|
15452
15504
|
await this.navigationClient.navigateExternal(logoutUri, navigationOptions);
|
|
15453
15505
|
return;
|
|
@@ -15461,7 +15513,7 @@
|
|
|
15461
15513
|
else {
|
|
15462
15514
|
// Ensure interaction is in progress
|
|
15463
15515
|
if (!this.browserStorage.getInteractionInProgress()) {
|
|
15464
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
15516
|
+
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNOUT);
|
|
15465
15517
|
}
|
|
15466
15518
|
await this.navigationClient.navigateExternal(logoutUri, navigationOptions);
|
|
15467
15519
|
return;
|
|
@@ -16299,29 +16351,41 @@
|
|
|
16299
16351
|
this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null.");
|
|
16300
16352
|
return null;
|
|
16301
16353
|
}
|
|
16354
|
+
const interactionType = this.browserStorage.getInteractionInProgress()?.type;
|
|
16355
|
+
if (interactionType === INTERACTION_TYPE.SIGNOUT) {
|
|
16356
|
+
this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out");
|
|
16357
|
+
this.browserStorage.setInteractionInProgress(false);
|
|
16358
|
+
return Promise.resolve(null);
|
|
16359
|
+
}
|
|
16302
16360
|
const loggedInAccounts = this.getAllAccounts();
|
|
16303
16361
|
const platformBrokerRequest = this.browserStorage.getCachedNativeRequest();
|
|
16304
16362
|
const useNative = platformBrokerRequest &&
|
|
16305
16363
|
NativeMessageHandler.isPlatformBrokerAvailable(this.config, this.logger, this.nativeExtensionProvider) &&
|
|
16306
16364
|
this.nativeExtensionProvider &&
|
|
16307
16365
|
!hash;
|
|
16308
|
-
let rootMeasurement
|
|
16366
|
+
let rootMeasurement;
|
|
16309
16367
|
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, exports.InteractionType.Redirect);
|
|
16310
16368
|
let redirectResponse;
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
|
|
16369
|
+
try {
|
|
16370
|
+
if (useNative && this.nativeExtensionProvider) {
|
|
16371
|
+
rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenRedirect, platformBrokerRequest?.correlationId || "");
|
|
16372
|
+
this.logger.trace("handleRedirectPromise - acquiring token from native platform");
|
|
16373
|
+
const nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.handleRedirectPromise, this.performanceClient, this.nativeExtensionProvider, platformBrokerRequest.accountId, this.nativeInternalStorage, platformBrokerRequest.correlationId);
|
|
16374
|
+
redirectResponse = invokeAsync(nativeClient.handleRedirectPromise.bind(nativeClient), PerformanceEvents.HandleNativeRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(this.performanceClient, rootMeasurement.event.correlationId);
|
|
16375
|
+
}
|
|
16376
|
+
else {
|
|
16377
|
+
const [standardRequest, codeVerifier] = this.browserStorage.getCachedRequest();
|
|
16378
|
+
const correlationId = standardRequest.correlationId;
|
|
16379
|
+
// Reset rootMeasurement now that we have correlationId
|
|
16380
|
+
rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenRedirect, correlationId);
|
|
16381
|
+
this.logger.trace("handleRedirectPromise - acquiring token from web flow");
|
|
16382
|
+
const redirectClient = this.createRedirectClient(correlationId);
|
|
16383
|
+
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), PerformanceEvents.HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(hash, standardRequest, codeVerifier, rootMeasurement);
|
|
16384
|
+
}
|
|
16315
16385
|
}
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
// Reset rootMeasurement now that we have correlationId
|
|
16320
|
-
rootMeasurement.discard();
|
|
16321
|
-
rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenRedirect, correlationId);
|
|
16322
|
-
this.logger.trace("handleRedirectPromise - acquiring token from web flow");
|
|
16323
|
-
const redirectClient = this.createRedirectClient(correlationId);
|
|
16324
|
-
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), PerformanceEvents.HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(hash, standardRequest, codeVerifier, rootMeasurement);
|
|
16386
|
+
catch (e) {
|
|
16387
|
+
this.browserStorage.resetRequestCache();
|
|
16388
|
+
throw e;
|
|
16325
16389
|
}
|
|
16326
16390
|
return redirectResponse
|
|
16327
16391
|
.then((result) => {
|
|
@@ -16427,7 +16491,7 @@
|
|
|
16427
16491
|
const isLoggedIn = this.getAllAccounts().length > 0;
|
|
16428
16492
|
try {
|
|
16429
16493
|
redirectPreflightCheck(this.initialized, this.config);
|
|
16430
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
16494
|
+
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN);
|
|
16431
16495
|
if (isLoggedIn) {
|
|
16432
16496
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Redirect, request);
|
|
16433
16497
|
}
|
|
@@ -16492,7 +16556,7 @@
|
|
|
16492
16556
|
try {
|
|
16493
16557
|
this.logger.verbose("acquireTokenPopup called", correlationId);
|
|
16494
16558
|
preflightCheck(this.initialized, atPopupMeasurement);
|
|
16495
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
16559
|
+
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN);
|
|
16496
16560
|
}
|
|
16497
16561
|
catch (e) {
|
|
16498
16562
|
// Since this function is syncronous we need to reject
|
|
@@ -16867,7 +16931,7 @@
|
|
|
16867
16931
|
async logoutRedirect(logoutRequest) {
|
|
16868
16932
|
const correlationId = this.getRequestCorrelationId(logoutRequest);
|
|
16869
16933
|
redirectPreflightCheck(this.initialized, this.config);
|
|
16870
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
16934
|
+
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNOUT);
|
|
16871
16935
|
const redirectClient = this.createRedirectClient(correlationId);
|
|
16872
16936
|
return redirectClient.logout(logoutRequest);
|
|
16873
16937
|
}
|
|
@@ -16879,7 +16943,7 @@
|
|
|
16879
16943
|
try {
|
|
16880
16944
|
const correlationId = this.getRequestCorrelationId(logoutRequest);
|
|
16881
16945
|
preflightCheck$1(this.initialized);
|
|
16882
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
16946
|
+
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNOUT);
|
|
16883
16947
|
const popupClient = this.createPopupClient(correlationId);
|
|
16884
16948
|
return popupClient.logout(logoutRequest).finally(() => {
|
|
16885
16949
|
this.browserStorage.setInteractionInProgress(false);
|
|
@@ -17299,7 +17363,9 @@
|
|
|
17299
17363
|
async acquireTokenSilentDeduped(request, account, correlationId) {
|
|
17300
17364
|
const thumbprint = getRequestThumbprint(this.config.auth.clientId, {
|
|
17301
17365
|
...request,
|
|
17302
|
-
authority: request.authority || this.config.auth.authority
|
|
17366
|
+
authority: request.authority || this.config.auth.authority,
|
|
17367
|
+
correlationId: correlationId,
|
|
17368
|
+
}, account.homeAccountId);
|
|
17303
17369
|
const silentRequestKey = JSON.stringify(thumbprint);
|
|
17304
17370
|
const inProgressRequest = this.activeSilentTokenRequests.get(silentRequestKey);
|
|
17305
17371
|
if (typeof inProgressRequest === "undefined") {
|
|
@@ -17926,7 +17992,7 @@
|
|
|
17926
17992
|
});
|
|
17927
17993
|
return result;
|
|
17928
17994
|
}
|
|
17929
|
-
this.logger.
|
|
17995
|
+
this.logger.warning("Cached tokens are not found for the account, proceeding with silent token request.");
|
|
17930
17996
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null);
|
|
17931
17997
|
atsMeasurement?.end({
|
|
17932
17998
|
success: false,
|