@azure/msal-browser 3.0.2 → 3.2.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.d.ts +2 -0
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.mjs +22 -18
- package/dist/app/IPublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientApplication.d.ts +20 -6
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.mjs +24 -7
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +3 -4
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +17 -16
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.d.ts +8 -0
- package/dist/broker/nativeBroker/NativeStatusCodes.d.ts.map +1 -0
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +16 -0
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs.map +1 -0
- package/dist/cache/AsyncMemoryStorage.mjs +4 -3
- package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +10 -3
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +58 -29
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/BrowserStorage.d.ts.map +1 -1
- package/dist/cache/BrowserStorage.mjs +7 -9
- package/dist/cache/BrowserStorage.mjs.map +1 -1
- package/dist/cache/CryptoKeyStore.mjs +1 -1
- package/dist/cache/CryptoKeyStore.mjs.map +1 -1
- package/dist/cache/DatabaseStorage.d.ts.map +1 -1
- package/dist/cache/DatabaseStorage.mjs +9 -8
- package/dist/cache/DatabaseStorage.mjs.map +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs.map +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +30 -30
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.d.ts +1 -0
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +12 -16
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs.map +1 -1
- package/dist/controllers/IController.d.ts +5 -28
- package/dist/controllers/IController.d.ts.map +1 -1
- package/dist/controllers/StandardController.d.ts +17 -31
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +78 -83
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.d.ts +44 -49
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +78 -77
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.d.ts +1 -10
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.mjs +23 -34
- package/dist/crypto/CryptoOps.mjs.map +1 -1
- package/dist/crypto/PkceGenerator.d.ts +6 -22
- package/dist/crypto/PkceGenerator.d.ts.map +1 -1
- package/dist/crypto/PkceGenerator.mjs +48 -49
- package/dist/crypto/PkceGenerator.mjs.map +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs.map +1 -1
- package/dist/encode/Base64Decode.d.ts +6 -19
- package/dist/encode/Base64Decode.d.ts.map +1 -1
- package/dist/encode/Base64Decode.mjs +31 -68
- package/dist/encode/Base64Decode.mjs.map +1 -1
- package/dist/encode/Base64Encode.d.ts +15 -27
- package/dist/encode/Base64Encode.d.ts.map +1 -1
- package/dist/encode/Base64Encode.mjs +36 -75
- package/dist/encode/Base64Encode.mjs.map +1 -1
- package/dist/error/BrowserAuthError.d.ts +63 -195
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.mjs +159 -381
- package/dist/error/BrowserAuthError.mjs.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts +46 -0
- package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -0
- package/dist/error/BrowserAuthErrorCodes.mjs +54 -0
- package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -0
- package/dist/error/BrowserConfigurationAuthError.d.ts +9 -46
- package/dist/error/BrowserConfigurationAuthError.d.ts.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +20 -73
- package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts +4 -0
- package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts.map +1 -0
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +12 -0
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs.map +1 -0
- package/dist/error/NativeAuthError.d.ts +17 -45
- package/dist/error/NativeAuthError.d.ts.map +1 -1
- package/dist/error/NativeAuthError.mjs +49 -79
- package/dist/error/NativeAuthError.mjs.map +1 -1
- package/dist/error/NativeAuthErrorCodes.d.ts +3 -0
- package/dist/error/NativeAuthErrorCodes.d.ts.map +1 -0
- package/dist/error/NativeAuthErrorCodes.mjs +11 -0
- package/dist/error/NativeAuthErrorCodes.mjs.map +1 -0
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.mjs +3 -2
- package/dist/event/EventHandler.mjs.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventMessage.mjs.map +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/event/EventType.mjs.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +2 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +7 -8
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +4 -10
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +32 -38
- 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 +16 -15
- 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 +7 -6
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +9 -11
- package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentCacheClient.d.ts +4 -2
- package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +19 -25
- package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +20 -47
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +11 -20
- package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +18 -38
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +13 -16
- package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +12 -11
- package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +11 -11
- package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs.map +1 -1
- package/dist/network/FetchClient.d.ts.map +1 -1
- package/dist/network/FetchClient.mjs +9 -8
- package/dist/network/FetchClient.mjs.map +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs.map +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs.map +1 -1
- package/dist/operatingcontext/TeamsAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/TeamsAppOperatingContext.mjs.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/packageMetadata.mjs.map +1 -1
- package/dist/request/ClearCacheRequest.d.ts +11 -0
- package/dist/request/ClearCacheRequest.d.ts.map +1 -0
- package/dist/telemetry/BrowserPerformanceClient.d.ts +2 -4
- package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +2 -6
- package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs.map +1 -1
- package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +4 -4
- package/dist/utils/BrowserProtocolUtils.mjs.map +1 -1
- package/dist/utils/BrowserStringUtils.mjs +1 -1
- package/dist/utils/BrowserStringUtils.mjs.map +1 -1
- package/dist/utils/BrowserUtils.d.ts +0 -9
- package/dist/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/utils/BrowserUtils.mjs +8 -33
- package/dist/utils/BrowserUtils.mjs.map +1 -1
- package/lib/msal-browser.cjs +8729 -9566
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +8729 -9566
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +68 -62
- package/package.json +7 -5
- package/src/app/IPublicClientApplication.ts +236 -0
- package/src/app/PublicClientApplication.ts +417 -0
- package/src/broker/nativeBroker/NativeMessageHandler.ts +416 -0
- package/src/broker/nativeBroker/NativeRequest.ts +52 -0
- package/src/broker/nativeBroker/NativeResponse.ts +56 -0
- package/src/broker/nativeBroker/NativeStatusCodes.ts +13 -0
- package/src/cache/AsyncMemoryStorage.ts +158 -0
- package/src/cache/BrowserCacheManager.ts +2009 -0
- package/src/cache/BrowserStorage.ts +52 -0
- package/src/cache/CryptoKeyStore.ts +63 -0
- package/src/cache/DatabaseStorage.ts +287 -0
- package/src/cache/IAsyncMemoryStorage.ts +36 -0
- package/src/cache/ITokenCache.ts +21 -0
- package/src/cache/IWindowStorage.ts +36 -0
- package/src/cache/MemoryStorage.ts +42 -0
- package/src/cache/TokenCache.ts +484 -0
- package/src/config/Configuration.ts +383 -0
- package/src/controllers/ControllerFactory.ts +55 -0
- package/src/controllers/IController.ts +134 -0
- package/src/controllers/StandardController.ts +2170 -0
- package/src/crypto/BrowserCrypto.ts +151 -0
- package/src/crypto/CryptoOps.ts +235 -0
- package/src/crypto/PkceGenerator.ts +115 -0
- package/src/crypto/SignedHttpRequest.ts +76 -0
- package/src/encode/Base64Decode.ts +46 -0
- package/src/encode/Base64Encode.ts +52 -0
- package/src/error/BrowserAuthError.ts +352 -0
- package/src/error/BrowserAuthErrorCodes.ts +57 -0
- package/src/error/BrowserConfigurationAuthError.ts +64 -0
- package/src/error/BrowserConfigurationAuthErrorCodes.ts +9 -0
- package/src/error/NativeAuthError.ts +113 -0
- package/src/error/NativeAuthErrorCodes.ts +7 -0
- package/src/event/EventHandler.ts +177 -0
- package/src/event/EventMessage.ts +125 -0
- package/src/event/EventType.ts +33 -0
- package/src/index.ts +157 -0
- package/src/interaction_client/BaseInteractionClient.ts +307 -0
- package/src/interaction_client/HybridSpaAuthorizationCodeClient.ts +16 -0
- package/src/interaction_client/NativeInteractionClient.ts +925 -0
- package/src/interaction_client/PopupClient.ts +926 -0
- package/src/interaction_client/RedirectClient.ts +616 -0
- package/src/interaction_client/SilentAuthCodeClient.ts +165 -0
- package/src/interaction_client/SilentCacheClient.ts +125 -0
- package/src/interaction_client/SilentIframeClient.ts +301 -0
- package/src/interaction_client/SilentRefreshClient.ts +118 -0
- package/src/interaction_client/StandardInteractionClient.ts +450 -0
- package/src/interaction_handler/InteractionHandler.ts +251 -0
- package/src/interaction_handler/RedirectHandler.ts +229 -0
- package/src/interaction_handler/SilentHandler.ts +269 -0
- package/src/navigation/INavigationClient.ts +23 -0
- package/src/navigation/NavigationClient.ts +55 -0
- package/src/navigation/NavigationOptions.ts +18 -0
- package/src/network/FetchClient.ts +130 -0
- package/src/operatingcontext/BaseOperatingContext.ts +82 -0
- package/src/operatingcontext/StandardOperatingContext.ts +49 -0
- package/src/operatingcontext/TeamsAppOperatingContext.ts +48 -0
- package/src/packageMetadata.ts +3 -0
- package/src/request/AuthorizationCodeRequest.ts +19 -0
- package/src/request/AuthorizationUrlRequest.ts +17 -0
- package/src/request/ClearCacheRequest.ts +16 -0
- package/src/request/EndSessionPopupRequest.ts +26 -0
- package/src/request/EndSessionRequest.ts +23 -0
- package/src/request/PopupRequest.ts +51 -0
- package/src/request/PopupWindowAttributes.ts +22 -0
- package/src/request/RedirectRequest.ts +51 -0
- package/src/request/SilentRequest.ts +49 -0
- package/src/request/SsoSilentRequest.ts +44 -0
- package/src/response/AuthenticationResult.ts +13 -0
- package/src/telemetry/BrowserPerformanceClient.ts +226 -0
- package/src/telemetry/BrowserPerformanceMeasurement.ts +144 -0
- package/src/utils/BrowserConstants.ts +241 -0
- package/src/utils/BrowserProtocolUtils.ts +58 -0
- package/src/utils/BrowserStringUtils.ts +143 -0
- package/src/utils/BrowserUtils.ts +156 -0
- package/dist/crypto/GuidGenerator.d.ts +0 -13
- package/dist/crypto/GuidGenerator.d.ts.map +0 -1
- package/dist/crypto/GuidGenerator.mjs +0 -104
- package/dist/crypto/GuidGenerator.mjs.map +0 -1
- package/dist/crypto/ISubtleCrypto.d.ts +0 -10
- package/dist/crypto/ISubtleCrypto.d.ts.map +0 -1
- package/dist/crypto/ModernBrowserCrypto.d.ts +0 -10
- package/dist/crypto/ModernBrowserCrypto.d.ts.map +0 -1
- package/dist/crypto/ModernBrowserCrypto.mjs +0 -31
- package/dist/crypto/ModernBrowserCrypto.mjs.map +0 -1
- package/dist/internals.d.ts +0 -23
- package/dist/internals.d.ts.map +0 -1
- package/dist/internals.mjs +0 -28
- package/dist/internals.mjs.map +0 -1
- package/dist/network/XhrClient.d.ts +0 -41
- package/dist/network/XhrClient.d.ts.map +0 -1
- package/dist/network/XhrClient.mjs +0 -125
- package/dist/network/XhrClient.mjs.map +0 -1
- package/dist/utils/MathUtils.d.ts +0 -12
- package/dist/utils/MathUtils.d.ts.map +0 -1
- package/dist/utils/MathUtils.mjs +0 -26
- package/dist/utils/MathUtils.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAuthError.mjs","sources":["../../src/error/NativeAuthError.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NativeAuthError.mjs","sources":["../../src/error/NativeAuthError.ts"],"sourcesContent":[null],"names":["NativeStatusCodes.PERSISTENT_ERROR"],"mappings":";;;;;;;;AAKA;AAWA;AAEA;AAEA;MAME,oBAAA,GAAA,CAAA,UAAA,CAAA;AAIF,MAAA,uBAAoC,GAAA;;EAGlC;AAEW,MAAA,eAAA,kBAAiC,CAAA;AAC1C,IAAA,WAAK,CAAO,SAAG,EAAA,WAAU,EAAA,GAAA,EAAA;uBAEJ,EAAA,WAAqB,CAAA,CAAA;AAO7C,QAAA,MAAA,CAAA,cAAA,CAAA,IAAA,EAAA,eAAA,CAAA,SAAA,CAAA,CAAA;AAED,QAAA,IAAA,CAAA,IAAA,GAAA,iBAAA,CAAA;;AAEG,KAAA;AACH,CAAA;AA0BA;;;;;;AAMG,SAAA,KAAA,CAAA,GAAA,CAAA,MAAA,KAAAA,gBAAA;AACH,YAAA,KAAA,CAAA,GAAA,CAAA,oBAEI,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/NativeAuthErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,UAAU,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*! @azure/msal-browser v3.2.0 2023-10-05 */
|
|
2
|
+
'use strict';
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
* Licensed under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
const contentError = "ContentError";
|
|
8
|
+
const userSwitch = "user_switch";
|
|
9
|
+
|
|
10
|
+
export { contentError, userSwitch };
|
|
11
|
+
//# sourceMappingURL=NativeAuthErrorCodes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeAuthErrorCodes.mjs","sources":["../../src/error/NativeAuthErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKA;AACA;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../src/event/EventHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,MAAM,EAGT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACH,qBAAqB,EACrB,UAAU,EAEV,YAAY,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../src/event/EventHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,MAAM,EAGT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACH,qBAAqB,EACrB,UAAU,EAEV,YAAY,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,qBAAa,YAAY;IAErB,OAAO,CAAC,cAAc,CAAqC;IAC3D,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,wBAAwB,CAAU;gBAE9B,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO;IASlD;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,GAAG,IAAI;IAchE;;;OAGG;IACH,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK7C;;OAEG;IACH,0BAA0B,IAAI,IAAI;IAclC;;OAEG;IACH,2BAA2B,IAAI,IAAI;IAiBnC;;;;;;OAMG;IACH,SAAS,CACL,SAAS,EAAE,SAAS,EACpB,eAAe,CAAC,EAAE,eAAe,EACjC,OAAO,CAAC,EAAE,YAAY,EACtB,KAAK,CAAC,EAAE,UAAU,GACnB,IAAI;IAuBP;;OAEG;IACH,OAAO,CAAC,wBAAwB;CAqCnC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.0
|
|
1
|
+
/*! @azure/msal-browser v3.2.0 2023-10-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { AccountEntity, CacheManager } from '@azure/msal-common';
|
|
4
4
|
import { EventType } from './EventType.mjs';
|
|
5
|
+
import { createNewGuid } from '../crypto/BrowserCrypto.mjs';
|
|
5
6
|
|
|
6
7
|
/*
|
|
7
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -22,7 +23,7 @@ class EventHandler {
|
|
|
22
23
|
*/
|
|
23
24
|
addEventCallback(callback) {
|
|
24
25
|
if (typeof window !== "undefined") {
|
|
25
|
-
const callbackId =
|
|
26
|
+
const callbackId = createNewGuid();
|
|
26
27
|
this.eventCallbacks.set(callbackId, callback);
|
|
27
28
|
this.logger.verbose(`Event callback registered with id: ${callbackId}`);
|
|
28
29
|
return callbackId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventHandler.mjs","sources":["../../src/event/EventHandler.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EventHandler.mjs","sources":["../../src/event/EventHandler.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAKA;AAMA;AACA;AAMA;AAOW,kBAAc,CAAU;IAC/B,iCAA0C,EAAA;AAE9B,QAAA,IAAA,CAAA,cAAQ,GAAM,IAAE,GAAA,EAAA,CAAA;AAS5B,QAAA,IAAA,CAAA,MAAA,GAAA,MAAA,CAAA;;;AAGG,QAAA,IAAA,CAAA,wBAAA;AACH,YAAA,IAAA,CAAA,mCAAgD,CAAG;AAcnD,KAAA;;;AAGG;AACH;AAKA,IAAA,gBAAA,CAAA,QAAA,EAAA;;AAEG,YAAA,MAAA,UAAA,GAAA,aAAA,EAAA,CAAA;AACH,YAAA,IAAA,CAAA,kBAAkC,CAAA,UAAA,EAAA,QAAA,CAAA,CAAA;AAclC,YAAA,IAAA,CAAA,MAAA,CAAA,OAAA,CAAA,CAAA,mCAAA,EAAA,UAAA,CAAA,CAAA,CAAA,CAAA;;AAEG,SAAA;AACH,QAAA,OAAA,IAAA,CAAA;AAiBA,KAAA;;;;;;AAMG,QAAA,IAAA,CAAA,cAAA,CAAA,MAAA,CAAA,UAAA,CAAA,CAAA;QACM,IAAA,CAAA,cACM,CAAA,CAAA,eACI,EAAA,UAAkB,CAAA,SAAA,CAAA,CAAA,CAAA;AA0BrC,KAAA;;AAEG;AACH;AAqCH,IAAA,0BAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventMessage.mjs","sources":["../../src/event/EventMessage.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"EventMessage.mjs","sources":["../../src/event/EventMessage.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAKA;AACA;AACA;AACA;AAWI,MAAA,iBAAiB,CAAA;;;;;AAMrB;IACI,OAAW,6BAAS,CAAA,OAAA,EAAA,aAAA,EAAA;QACtB,QAAA,OAAA,CAAA,SAAA;AAEF,YAAY,cACN,CAAA,WAAW;AAUjB,uBAAyB,iBAAiB,CAAA;AAE1C,YAAY;AAEZ,gBAAA,OAA8B,iBAAA,CAAA,SAAA,CAAA;AAC1B,YAAA,KAAA,SAAA,CAAA,mBAAA;;;;AAIG,iBAAA;AACH,gBAAO,MAAA;AA0EV,YAAA,KAAA,SAAA,CAAA,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/event/EventType.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventType.mjs","sources":["../../src/event/EventType.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"EventType.mjs","sources":["../../src/event/EventType.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BW,cAAA,EAAA,oBAAA;AACX,IAAA,cAAY,EAAA,oBAAoB;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,13 @@
|
|
|
6
6
|
* Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk.
|
|
7
7
|
* Breaking changes to these APIs will be shipped under a minor version, instead of a major version.
|
|
8
8
|
*/
|
|
9
|
-
import * as internals from "./internals";
|
|
10
|
-
/** @internal */
|
|
11
|
-
export { internals };
|
|
12
9
|
export { PublicClientApplication } from "./app/PublicClientApplication";
|
|
13
10
|
export { IController } from "./controllers/IController";
|
|
14
11
|
export { Configuration, BrowserAuthOptions, CacheOptions, BrowserSystemOptions, BrowserTelemetryOptions, BrowserConfiguration, DEFAULT_IFRAME_TIMEOUT_MS, } from "./config/Configuration";
|
|
15
12
|
export { InteractionType, InteractionStatus, BrowserCacheLocation, WrapperSKU, ApiId, CacheLookupPolicy, } from "./utils/BrowserConstants";
|
|
16
13
|
export { BrowserUtils } from "./utils/BrowserUtils";
|
|
17
|
-
export { BrowserAuthError, BrowserAuthErrorMessage, } from "./error/BrowserAuthError";
|
|
18
|
-
export { BrowserConfigurationAuthError, BrowserConfigurationAuthErrorMessage, } from "./error/BrowserConfigurationAuthError";
|
|
14
|
+
export { BrowserAuthError, BrowserAuthErrorMessage, BrowserAuthErrorCodes, } from "./error/BrowserAuthError";
|
|
15
|
+
export { BrowserConfigurationAuthError, BrowserConfigurationAuthErrorCodes, BrowserConfigurationAuthErrorMessage, } from "./error/BrowserConfigurationAuthError";
|
|
19
16
|
export { IPublicClientApplication, stubbedPublicClientApplication, } from "./app/IPublicClientApplication";
|
|
20
17
|
export { INavigationClient } from "./navigation/INavigationClient";
|
|
21
18
|
export { NavigationClient } from "./navigation/NavigationClient";
|
|
@@ -29,14 +26,17 @@ export { EndSessionPopupRequest } from "./request/EndSessionPopupRequest";
|
|
|
29
26
|
export { AuthorizationUrlRequest } from "./request/AuthorizationUrlRequest";
|
|
30
27
|
export { AuthorizationCodeRequest } from "./request/AuthorizationCodeRequest";
|
|
31
28
|
export { AuthenticationResult } from "./response/AuthenticationResult";
|
|
29
|
+
export { ClearCacheRequest } from "./request/ClearCacheRequest";
|
|
32
30
|
export { LoadTokenOptions } from "./cache/TokenCache";
|
|
33
31
|
export { ITokenCache } from "./cache/ITokenCache";
|
|
32
|
+
export { MemoryStorage } from "./cache/MemoryStorage";
|
|
33
|
+
export { BrowserStorage } from "./cache/BrowserStorage";
|
|
34
34
|
export { EventMessage, EventPayload, EventError, EventCallbackFunction, EventMessageUtils, PopupEvent, } from "./event/EventMessage";
|
|
35
35
|
export { EventType } from "./event/EventType";
|
|
36
36
|
export { SignedHttpRequest, SignedHttpRequestOptions, } from "./crypto/SignedHttpRequest";
|
|
37
37
|
export { PopupWindowAttributes, PopupSize, PopupPosition, } from "./request/PopupWindowAttributes";
|
|
38
38
|
export { BrowserPerformanceClient } from "./telemetry/BrowserPerformanceClient";
|
|
39
39
|
export { BrowserPerformanceMeasurement } from "./telemetry/BrowserPerformanceMeasurement";
|
|
40
|
-
export { AuthenticationScheme, AccountInfo, AccountEntity, IdTokenClaims, AuthError, AuthErrorMessage, ClientAuthError, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, ServerError, INetworkModule, NetworkResponse, NetworkRequestOptions, ILoggerCallback, Logger, LogLevel, ProtocolMode, ServerResponseType, PromptValue, ExternalTokenResponse, StringUtils, UrlString, AzureCloudInstance, AzureCloudOptions, AuthenticationHeaderParser, OIDC_DEFAULT_SCOPES, PerformanceCallbackFunction, PerformanceEvent, PerformanceEvents, } from "@azure/msal-common";
|
|
40
|
+
export { AuthenticationScheme, AccountInfo, AccountEntity, IdTokenClaims, AuthError, AuthErrorCodes, AuthErrorMessage, ClientAuthError, ClientAuthErrorCodes, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorCodes, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, ServerError, INetworkModule, NetworkResponse, NetworkRequestOptions, ILoggerCallback, Logger, LogLevel, ProtocolMode, ServerResponseType, PromptValue, ExternalTokenResponse, StringUtils, UrlString, AzureCloudInstance, AzureCloudOptions, AuthenticationHeaderParser, OIDC_DEFAULT_SCOPES, PerformanceCallbackFunction, PerformanceEvent, PerformanceEvents, InProgressPerformanceEvent, } from "@azure/msal-common";
|
|
41
41
|
export { version } from "./packageMetadata";
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,EACV,KAAK,EACL,iBAAiB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAQpD,OAAO,EACH,gBAAgB,EACh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,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EACH,iBAAiB,EACjB,wBAAwB,GAC3B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACH,qBAAqB,EACrB,SAAS,EACT,aAAa,GAChB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAG1F,OAAO,EACH,oBAAoB,EAEpB,WAAW,EACX,aAAa,EACb,aAAa,EAEb,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,+BAA+B,EAC/B,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,WAAW,EAEX,cAAc,EACd,eAAe,EACf,qBAAqB,EAErB,eAAe,EACf,MAAM,EACN,QAAQ,EAER,YAAY,EACZ,kBAAkB,EAClB,WAAW,EAEX,qBAAqB,EAErB,WAAW,EACX,SAAS,EAET,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,iBAAiB,EAEjB,0BAA0B,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.0
|
|
1
|
+
/*! @azure/msal-browser v3.2.0 2023-10-05 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import * as internals from './internals.mjs';
|
|
4
|
-
export { internals };
|
|
5
3
|
export { PublicClientApplication } from './app/PublicClientApplication.mjs';
|
|
6
4
|
export { DEFAULT_IFRAME_TIMEOUT_MS } from './config/Configuration.mjs';
|
|
7
5
|
export { ApiId, BrowserCacheLocation, CacheLookupPolicy, InteractionStatus, InteractionType, WrapperSKU } from './utils/BrowserConstants.mjs';
|
|
@@ -10,11 +8,17 @@ export { BrowserAuthError, BrowserAuthErrorMessage } from './error/BrowserAuthEr
|
|
|
10
8
|
export { BrowserConfigurationAuthError, BrowserConfigurationAuthErrorMessage } from './error/BrowserConfigurationAuthError.mjs';
|
|
11
9
|
export { stubbedPublicClientApplication } from './app/IPublicClientApplication.mjs';
|
|
12
10
|
export { NavigationClient } from './navigation/NavigationClient.mjs';
|
|
11
|
+
export { MemoryStorage } from './cache/MemoryStorage.mjs';
|
|
12
|
+
export { BrowserStorage } from './cache/BrowserStorage.mjs';
|
|
13
13
|
export { EventMessageUtils } from './event/EventMessage.mjs';
|
|
14
14
|
export { EventType } from './event/EventType.mjs';
|
|
15
15
|
export { SignedHttpRequest } from './crypto/SignedHttpRequest.mjs';
|
|
16
16
|
export { BrowserPerformanceClient } from './telemetry/BrowserPerformanceClient.mjs';
|
|
17
17
|
export { BrowserPerformanceMeasurement } from './telemetry/BrowserPerformanceMeasurement.mjs';
|
|
18
|
-
export { AccountEntity, AuthError, AuthErrorMessage, AuthenticationHeaderParser, AuthenticationScheme, AzureCloudInstance, ClientAuthError, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, LogLevel, Logger, OIDC_DEFAULT_SCOPES, PerformanceEvents, PromptValue, ProtocolMode, ServerError, ServerResponseType, StringUtils, UrlString } from '@azure/msal-common';
|
|
18
|
+
export { AccountEntity, AuthError, AuthErrorCodes, AuthErrorMessage, AuthenticationHeaderParser, AuthenticationScheme, AzureCloudInstance, ClientAuthError, ClientAuthErrorCodes, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorCodes, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, LogLevel, Logger, OIDC_DEFAULT_SCOPES, PerformanceEvents, PromptValue, ProtocolMode, ServerError, ServerResponseType, StringUtils, UrlString } from '@azure/msal-common';
|
|
19
19
|
export { version } from './packageMetadata.mjs';
|
|
20
|
+
import * as BrowserAuthErrorCodes from './error/BrowserAuthErrorCodes.mjs';
|
|
21
|
+
export { BrowserAuthErrorCodes };
|
|
22
|
+
import * as BrowserConfigurationAuthErrorCodes from './error/BrowserConfigurationAuthErrorCodes.mjs';
|
|
23
|
+
export { BrowserConfigurationAuthErrorCodes };
|
|
20
24
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,6 +9,7 @@ import { SsoSilentRequest } from "../request/SsoSilentRequest";
|
|
|
9
9
|
import { INavigationClient } from "../navigation/INavigationClient";
|
|
10
10
|
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
|
|
11
11
|
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
12
|
+
import { ClearCacheRequest } from "../request/ClearCacheRequest";
|
|
12
13
|
export declare abstract class BaseInteractionClient {
|
|
13
14
|
protected config: BrowserConfiguration;
|
|
14
15
|
protected browserStorage: BrowserCacheManager;
|
|
@@ -22,7 +23,7 @@ export declare abstract class BaseInteractionClient {
|
|
|
22
23
|
protected performanceClient: IPerformanceClient;
|
|
23
24
|
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeMessageHandler?: NativeMessageHandler, correlationId?: string);
|
|
24
25
|
abstract acquireToken(request: RedirectRequest | PopupRequest | SsoSilentRequest): Promise<AuthenticationResult | void>;
|
|
25
|
-
abstract logout(request: EndSessionRequest): Promise<void>;
|
|
26
|
+
abstract logout(request: EndSessionRequest | ClearCacheRequest | undefined): Promise<void>;
|
|
26
27
|
protected clearCacheOnLogout(account?: AccountInfo | null): Promise<void>;
|
|
27
28
|
/**
|
|
28
29
|
* Initializer function for all request APIs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInteractionClient.d.ts","sourceRoot":"","sources":["../../src/interaction_client/BaseInteractionClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,cAAc,EACd,MAAM,EACN,WAAW,EAEX,eAAe,EAGf,sBAAsB,EAItB,SAAS,EAGT,kBAAkB,
|
|
1
|
+
{"version":3,"file":"BaseInteractionClient.d.ts","sourceRoot":"","sources":["../../src/interaction_client/BaseInteractionClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,cAAc,EACd,MAAM,EACN,WAAW,EAEX,eAAe,EAGf,sBAAsB,EAItB,SAAS,EAGT,kBAAkB,EAGrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAI/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,8BAAsB,qBAAqB;IACvC,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACvC,S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B,OAAO,EAAE,WAAW,GACrB,OAAO,CAAC,IAAI,CAAC;IAYhB;;;;;OAKG;IACH,SAAS,CAAC,gCAAgC,CACtC,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,OAAO,GACvB,sBAAsB;IAiBzB;;;;OAIG;cACa,sBAAsB,CAClC,gBAAgB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,SAAS,CAAC;CAkCxB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.0
|
|
1
|
+
/*! @azure/msal-browser v3.2.0 2023-10-05 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import { AccountEntity, PerformanceEvents, AuthenticationScheme,
|
|
3
|
+
import { AccountEntity, PerformanceEvents, AuthenticationScheme, createClientConfigurationError, ClientConfigurationErrorCodes, StringUtils, UrlString, ServerTelemetryManager, AuthorityFactory } from '@azure/msal-common';
|
|
4
4
|
import { version } from '../packageMetadata.mjs';
|
|
5
5
|
import { BrowserConstants } from '../utils/BrowserConstants.mjs';
|
|
6
6
|
import { BrowserUtils } from '../utils/BrowserUtils.mjs';
|
|
7
|
+
import { createNewGuid } from '../crypto/BrowserCrypto.mjs';
|
|
7
8
|
|
|
8
9
|
/*
|
|
9
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -18,8 +19,7 @@ class BaseInteractionClient {
|
|
|
18
19
|
this.eventHandler = eventHandler;
|
|
19
20
|
this.navigationClient = navigationClient;
|
|
20
21
|
this.nativeMessageHandler = nativeMessageHandler;
|
|
21
|
-
this.correlationId =
|
|
22
|
-
correlationId || this.browserCrypto.createNewGuid();
|
|
22
|
+
this.correlationId = correlationId || createNewGuid();
|
|
23
23
|
this.logger = logger.clone(BrowserConstants.MSAL_SKU, version, this.correlationId);
|
|
24
24
|
this.performanceClient = performanceClient;
|
|
25
25
|
}
|
|
@@ -57,7 +57,6 @@ class BaseInteractionClient {
|
|
|
57
57
|
*/
|
|
58
58
|
async initializeBaseRequest(request, account) {
|
|
59
59
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.InitializeBaseRequest, request.correlationId);
|
|
60
|
-
this.logger.verbose("Initializing BaseAuthRequest");
|
|
61
60
|
const authority = request.authority || this.config.auth.authority;
|
|
62
61
|
if (account) {
|
|
63
62
|
await this.validateRequestAuthority(authority, account);
|
|
@@ -78,10 +77,10 @@ class BaseInteractionClient {
|
|
|
78
77
|
if (validatedRequest.authenticationScheme ===
|
|
79
78
|
AuthenticationScheme.SSH) {
|
|
80
79
|
if (!request.sshJwk) {
|
|
81
|
-
throw
|
|
80
|
+
throw createClientConfigurationError(ClientConfigurationErrorCodes.missingSshJwk);
|
|
82
81
|
}
|
|
83
82
|
if (!request.sshKid) {
|
|
84
|
-
throw
|
|
83
|
+
throw createClientConfigurationError(ClientConfigurationErrorCodes.missingSshKid);
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
this.logger.verbose(`Authentication Scheme set to "${validatedRequest.authenticationScheme}" as configured in Auth request`);
|
|
@@ -117,7 +116,7 @@ class BaseInteractionClient {
|
|
|
117
116
|
async validateRequestAuthority(authority, account) {
|
|
118
117
|
const discoveredAuthority = await this.getDiscoveredAuthority(authority);
|
|
119
118
|
if (!discoveredAuthority.isAlias(account.environment)) {
|
|
120
|
-
throw
|
|
119
|
+
throw createClientConfigurationError(ClientConfigurationErrorCodes.authorityMismatch);
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
122
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInteractionClient.mjs","sources":["../../src/interaction_client/BaseInteractionClient.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseInteractionClient.mjs","sources":["../../src/interaction_client/BaseInteractionClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAKA;AAoBA;AACA;AACA;AASO,MAAE,qBAAsB,CAAA;AAC/B,IAAA,WAAS,CAAA,MAAA,EAAA,WAAsB,EA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,YAAA,IAAA;AACH,gBAAA,IAAiC,CAAA,MAAA,CAAA,OAAA,CAAA,kEAAkB,EAAA,IAAA,CAAA,aAAA,CAAA,CAAA;AAgB7C;AAeN,gBAAA,MAAA,IAAA,CAAA,cAAA,CAAA,KAAA,EAAA,CAAA;;;;;AAKG,gBAAA,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA,4EAAA,CAAA,CAAA;AACH,aAAS;AAoBT,SAAA;;;;AAIG;;AAqCN,IAAA,MAAA,qBAAA,CAAA,OAAA,EAAA,OAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HybridSpaAuthorizationCodeClient.mjs","sources":["../../src/interaction_client/HybridSpaAuthorizationCodeClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"HybridSpaAuthorizationCodeClient.mjs","sources":["../../src/interaction_client/HybridSpaAuthorizationCodeClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA;AAKA;AACgB;AAIf;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Logger, ICrypto,
|
|
1
|
+
import { Logger, ICrypto, AccountEntity, ScopeSet, IPerformanceClient, TokenClaims } from "@azure/msal-common";
|
|
2
2
|
import { BaseInteractionClient } from "./BaseInteractionClient";
|
|
3
3
|
import { BrowserConfiguration } from "../config/Configuration";
|
|
4
4
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
@@ -61,19 +61,13 @@ export declare class NativeInteractionClient extends BaseInteractionClient {
|
|
|
61
61
|
* @param reqTimestamp
|
|
62
62
|
*/
|
|
63
63
|
protected handleNativeResponse(response: NativeResponse, request: NativeTokenRequest, reqTimestamp: number): Promise<AuthenticationResult>;
|
|
64
|
-
/**
|
|
65
|
-
* Create an idToken Object (not entity)
|
|
66
|
-
* @param response
|
|
67
|
-
* @returns
|
|
68
|
-
*/
|
|
69
|
-
protected createIdTokenObj(response: NativeResponse): AuthToken;
|
|
70
64
|
/**
|
|
71
65
|
* creates an homeAccountIdentifier for the account
|
|
72
66
|
* @param response
|
|
73
67
|
* @param idTokenObj
|
|
74
68
|
* @returns
|
|
75
69
|
*/
|
|
76
|
-
protected createHomeAccountIdentifier(response: NativeResponse,
|
|
70
|
+
protected createHomeAccountIdentifier(response: NativeResponse, idTokenClaims: TokenClaims): string;
|
|
77
71
|
/**
|
|
78
72
|
* Helper to generate scopes
|
|
79
73
|
* @param response
|
|
@@ -97,7 +91,7 @@ export declare class NativeInteractionClient extends BaseInteractionClient {
|
|
|
97
91
|
* @param reqTimestamp
|
|
98
92
|
* @returns
|
|
99
93
|
*/
|
|
100
|
-
protected generateAuthenticationResult(response: NativeResponse, request: NativeTokenRequest,
|
|
94
|
+
protected generateAuthenticationResult(response: NativeResponse, request: NativeTokenRequest, idTokenClaims: TokenClaims, accountEntity: AccountEntity, authority: string, reqTimestamp: number): Promise<AuthenticationResult>;
|
|
101
95
|
/**
|
|
102
96
|
* cache the account entity in browser storage
|
|
103
97
|
* @param accountEntity
|
|
@@ -113,7 +107,7 @@ export declare class NativeInteractionClient extends BaseInteractionClient {
|
|
|
113
107
|
* @param tenantId
|
|
114
108
|
* @param reqTimestamp
|
|
115
109
|
*/
|
|
116
|
-
cacheNativeTokens(response: NativeResponse, request: NativeTokenRequest, homeAccountIdentifier: string,
|
|
110
|
+
cacheNativeTokens(response: NativeResponse, request: NativeTokenRequest, homeAccountIdentifier: string, idTokenClaims: TokenClaims, responseAccessToken: string, tenantId: string, reqTimestamp: number): void;
|
|
117
111
|
protected addTelemetryFromNativeResponse(response: NativeResponse): MATS | null;
|
|
118
112
|
/**
|
|
119
113
|
* Validates native platform response before processing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeInteractionClient.d.ts","sourceRoot":"","sources":["../../src/interaction_client/NativeInteractionClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,MAAM,EACN,OAAO,
|
|
1
|
+
{"version":3,"file":"NativeInteractionClient.d.ts","sourceRoot":"","sources":["../../src/interaction_client/NativeInteractionClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,MAAM,EACN,OAAO,EAIP,aAAa,EAEb,QAAQ,EAOR,kBAAkB,EASlB,WAAW,EAMd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAEH,KAAK,EAGR,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEH,kBAAkB,EACrB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAO7E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAQxE,qBAAa,uBAAwB,SAAQ,qBAAqB;IAC9D,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IACvB,SAAS,CAAC,SAAS,EAAE,MAA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TimeUtils, ScopeSet,
|
|
3
|
+
import { PerformanceEvents, TimeUtils, ScopeSet, createClientAuthError, ClientAuthErrorCodes, AuthToken, AccountEntity, Constants, AuthorityType, AuthenticationScheme, PopTokenGenerator, IdTokenEntity, AccessTokenEntity, CacheRecord, createAuthError, AuthErrorCodes, UrlString, OIDC_DEFAULT_SCOPES, invokeAsync, AADServerParamKeys, PromptValue } from '@azure/msal-common';
|
|
4
4
|
import { BaseInteractionClient } from './BaseInteractionClient.mjs';
|
|
5
5
|
import { TemporaryCacheKeys, NativeConstants, NativeExtensionMethod, ApiId } from '../utils/BrowserConstants.mjs';
|
|
6
|
-
import { NativeAuthError } from '../error/NativeAuthError.mjs';
|
|
7
|
-
import {
|
|
6
|
+
import { NativeAuthError, isFatalNativeAuthError, createNativeAuthError } from '../error/NativeAuthError.mjs';
|
|
7
|
+
import { createBrowserAuthError } from '../error/BrowserAuthError.mjs';
|
|
8
8
|
import { SilentCacheClient } from './SilentCacheClient.mjs';
|
|
9
|
+
import { base64Decode } from '../encode/Base64Decode.mjs';
|
|
10
|
+
import { userSwitch } from '../error/NativeAuthErrorCodes.mjs';
|
|
11
|
+
import { nativePromptNotSupported } from '../error/BrowserAuthErrorCodes.mjs';
|
|
9
12
|
|
|
10
13
|
/*
|
|
11
14
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -29,6 +32,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
29
32
|
* @param request
|
|
30
33
|
*/
|
|
31
34
|
async acquireToken(request) {
|
|
35
|
+
this.performanceClient.addQueueMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
|
|
32
36
|
this.logger.trace("NativeInteractionClient - acquireToken called.");
|
|
33
37
|
// start the perf measurement
|
|
34
38
|
const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
|
|
@@ -99,14 +103,14 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
99
103
|
async acquireTokensFromCache(nativeAccountId, request) {
|
|
100
104
|
if (!nativeAccountId) {
|
|
101
105
|
this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided");
|
|
102
|
-
throw
|
|
106
|
+
throw createClientAuthError(ClientAuthErrorCodes.noAccountFound);
|
|
103
107
|
}
|
|
104
108
|
// fetch the account from browser cache
|
|
105
109
|
const account = this.browserStorage.getAccountInfoFilteredBy({
|
|
106
110
|
nativeAccountId,
|
|
107
111
|
});
|
|
108
112
|
if (!account) {
|
|
109
|
-
throw
|
|
113
|
+
throw createClientAuthError(ClientAuthErrorCodes.noAccountFound);
|
|
110
114
|
}
|
|
111
115
|
// leverage silent flow for cached tokens retrieval
|
|
112
116
|
try {
|
|
@@ -138,7 +142,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
138
142
|
}
|
|
139
143
|
catch (e) {
|
|
140
144
|
// Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
|
|
141
|
-
if (e instanceof NativeAuthError && e
|
|
145
|
+
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
142
146
|
throw e;
|
|
143
147
|
}
|
|
144
148
|
}
|
|
@@ -209,43 +213,35 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
209
213
|
this.logger.trace("NativeInteractionClient - handleNativeResponse called.");
|
|
210
214
|
if (response.account.id !== request.accountId) {
|
|
211
215
|
// User switch in native broker prompt is not supported. All users must first sign in through web flow to ensure server state is in sync
|
|
212
|
-
throw
|
|
216
|
+
throw createNativeAuthError(userSwitch);
|
|
213
217
|
}
|
|
214
218
|
// Get the preferred_cache domain for the given authority
|
|
215
219
|
const authority = await this.getDiscoveredAuthority(request.authority);
|
|
216
220
|
// generate identifiers
|
|
217
|
-
const
|
|
218
|
-
const homeAccountIdentifier = this.createHomeAccountIdentifier(response,
|
|
221
|
+
const idTokenClaims = AuthToken.extractTokenClaims(response.id_token, base64Decode);
|
|
222
|
+
const homeAccountIdentifier = this.createHomeAccountIdentifier(response, idTokenClaims);
|
|
219
223
|
const accountEntity = AccountEntity.createAccount({
|
|
220
224
|
homeAccountId: homeAccountIdentifier,
|
|
221
|
-
idTokenClaims:
|
|
225
|
+
idTokenClaims: idTokenClaims,
|
|
222
226
|
clientInfo: response.client_info,
|
|
223
227
|
nativeAccountId: response.account.id,
|
|
224
228
|
}, authority);
|
|
225
229
|
// generate authenticationResult
|
|
226
|
-
const result = await this.generateAuthenticationResult(response, request,
|
|
230
|
+
const result = await this.generateAuthenticationResult(response, request, idTokenClaims, accountEntity, authority.canonicalAuthority, reqTimestamp);
|
|
227
231
|
// cache accounts and tokens in the appropriate storage
|
|
228
232
|
this.cacheAccount(accountEntity);
|
|
229
|
-
this.cacheNativeTokens(response, request, homeAccountIdentifier,
|
|
233
|
+
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.accessToken, result.tenantId, reqTimestamp);
|
|
230
234
|
return result;
|
|
231
235
|
}
|
|
232
|
-
/**
|
|
233
|
-
* Create an idToken Object (not entity)
|
|
234
|
-
* @param response
|
|
235
|
-
* @returns
|
|
236
|
-
*/
|
|
237
|
-
createIdTokenObj(response) {
|
|
238
|
-
return new AuthToken(response.id_token || Constants.EMPTY_STRING, this.browserCrypto);
|
|
239
|
-
}
|
|
240
236
|
/**
|
|
241
237
|
* creates an homeAccountIdentifier for the account
|
|
242
238
|
* @param response
|
|
243
239
|
* @param idTokenObj
|
|
244
240
|
* @returns
|
|
245
241
|
*/
|
|
246
|
-
createHomeAccountIdentifier(response,
|
|
242
|
+
createHomeAccountIdentifier(response, idTokenClaims) {
|
|
247
243
|
// Save account in browser storage
|
|
248
|
-
const homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto,
|
|
244
|
+
const homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenClaims);
|
|
249
245
|
return homeAccountIdentifier;
|
|
250
246
|
}
|
|
251
247
|
/**
|
|
@@ -288,7 +284,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
288
284
|
* PopTokenGenerator to query the full key for signing
|
|
289
285
|
*/
|
|
290
286
|
if (!request.keyId) {
|
|
291
|
-
throw
|
|
287
|
+
throw createClientAuthError(ClientAuthErrorCodes.keyIdMissing);
|
|
292
288
|
}
|
|
293
289
|
return await popTokenGenerator.signPopToken(response.access_token, request.keyId, shrParameters);
|
|
294
290
|
}
|
|
@@ -306,7 +302,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
306
302
|
* @param reqTimestamp
|
|
307
303
|
* @returns
|
|
308
304
|
*/
|
|
309
|
-
async generateAuthenticationResult(response, request,
|
|
305
|
+
async generateAuthenticationResult(response, request, idTokenClaims, accountEntity, authority, reqTimestamp) {
|
|
310
306
|
// Add Native Broker fields to Telemetry
|
|
311
307
|
const mats = this.addTelemetryFromNativeResponse(response);
|
|
312
308
|
// If scopes not returned in server response, use request scopes
|
|
@@ -315,11 +311,11 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
315
311
|
: ScopeSet.fromString(request.scope);
|
|
316
312
|
const accountProperties = response.account.properties || {};
|
|
317
313
|
const uid = accountProperties["UID"] ||
|
|
318
|
-
|
|
319
|
-
|
|
314
|
+
idTokenClaims.oid ||
|
|
315
|
+
idTokenClaims.sub ||
|
|
320
316
|
Constants.EMPTY_STRING;
|
|
321
317
|
const tid = accountProperties["TenantId"] ||
|
|
322
|
-
|
|
318
|
+
idTokenClaims.tid ||
|
|
323
319
|
Constants.EMPTY_STRING;
|
|
324
320
|
// generate PoP token as needed
|
|
325
321
|
const responseAccessToken = await this.generatePopAccessToken(response, request);
|
|
@@ -333,7 +329,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
333
329
|
scopes: responseScopes.asArray(),
|
|
334
330
|
account: accountEntity.getAccountInfo(),
|
|
335
331
|
idToken: response.id_token,
|
|
336
|
-
idTokenClaims:
|
|
332
|
+
idTokenClaims: idTokenClaims,
|
|
337
333
|
accessToken: responseAccessToken,
|
|
338
334
|
fromCache: mats ? this.isResponseFromCache(mats) : false,
|
|
339
335
|
expiresOn: new Date(Number(reqTimestamp + response.expires_in) * 1000),
|
|
@@ -366,8 +362,8 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
366
362
|
* @param tenantId
|
|
367
363
|
* @param reqTimestamp
|
|
368
364
|
*/
|
|
369
|
-
cacheNativeTokens(response, request, homeAccountIdentifier,
|
|
370
|
-
const cachedIdToken = IdTokenEntity.createIdTokenEntity(homeAccountIdentifier, request.authority, response.id_token ||
|
|
365
|
+
cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, responseAccessToken, tenantId, reqTimestamp) {
|
|
366
|
+
const cachedIdToken = IdTokenEntity.createIdTokenEntity(homeAccountIdentifier, request.authority, response.id_token || "", request.clientId, idTokenClaims.tid || "");
|
|
371
367
|
// cache accessToken in inmemory storage
|
|
372
368
|
const expiresIn = request.tokenType === AuthenticationScheme.POP
|
|
373
369
|
? Constants.SHR_NONCE_VALIDITY
|
|
@@ -376,11 +372,9 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
376
372
|
: response.expires_in) || 0;
|
|
377
373
|
const tokenExpirationSeconds = reqTimestamp + expiresIn;
|
|
378
374
|
const responseScopes = this.generateScopes(response, request);
|
|
379
|
-
const cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId,
|
|
380
|
-
? idTokenObj.claims.tid || Constants.EMPTY_STRING
|
|
381
|
-
: tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, this.browserCrypto);
|
|
375
|
+
const cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, this.browserCrypto);
|
|
382
376
|
const nativeCacheRecord = new CacheRecord(undefined, cachedIdToken, cachedAccessToken);
|
|
383
|
-
this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, request.storeInCache);
|
|
377
|
+
void this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, request.storeInCache);
|
|
384
378
|
}
|
|
385
379
|
addTelemetryFromNativeResponse(response) {
|
|
386
380
|
const mats = this.getMATSFromResponse(response);
|
|
@@ -420,7 +414,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
420
414
|
return response;
|
|
421
415
|
}
|
|
422
416
|
else {
|
|
423
|
-
throw
|
|
417
|
+
throw createAuthError(AuthErrorCodes.unexpectedError, "Response missing expected properties.");
|
|
424
418
|
}
|
|
425
419
|
}
|
|
426
420
|
/**
|
|
@@ -489,7 +483,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
489
483
|
return request.prompt;
|
|
490
484
|
default:
|
|
491
485
|
this.logger.trace(`initializeNativeRequest: prompt = ${request.prompt} is not compatible with native flow`);
|
|
492
|
-
throw
|
|
486
|
+
throw createBrowserAuthError(nativePromptNotSupported);
|
|
493
487
|
}
|
|
494
488
|
};
|
|
495
489
|
const validatedRequest = {
|
|
@@ -523,7 +517,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
523
517
|
shrNonce: request.shrNonce,
|
|
524
518
|
};
|
|
525
519
|
const popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
|
|
526
|
-
const reqCnfData = await popTokenGenerator.generateCnf(shrParameters);
|
|
520
|
+
const reqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, this.correlationId)(shrParameters, this.logger);
|
|
527
521
|
// to reduce the URL length, it is recommended to send the hash of the req_cnf instead of the whole string
|
|
528
522
|
validatedRequest.reqCnf = reqCnfData.reqCnfHash;
|
|
529
523
|
validatedRequest.keyId = reqCnfData.kid;
|