@azure/msal-browser 4.12.0 → 4.13.1
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/IPlatformAuthHandler.d.ts +12 -0
- package/dist/broker/nativeBroker/IPlatformAuthHandler.d.ts.map +1 -0
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +30 -0
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -0
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +143 -0
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -0
- package/dist/broker/nativeBroker/{NativeMessageHandler.d.ts → PlatformAuthExtensionHandler.d.ts} +16 -16
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -0
- package/dist/broker/nativeBroker/{NativeMessageHandler.mjs → PlatformAuthExtensionHandler.mjs} +66 -58
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -0
- package/dist/broker/nativeBroker/PlatformAuthProvider.d.ts +26 -0
- package/dist/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -0
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +108 -0
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -0
- package/dist/broker/nativeBroker/{NativeRequest.d.ts → PlatformAuthRequest.d.ts} +34 -3
- package/dist/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -0
- package/dist/broker/nativeBroker/{NativeResponse.d.ts → PlatformAuthResponse.d.ts} +24 -2
- package/dist/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -0
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +6 -2
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +17 -2
- 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 +1 -1
- 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.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.d.ts +2 -2
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +30 -29
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.d.ts +10 -1
- package/dist/event/EventMessage.d.ts.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventMessage.mjs.map +1 -1
- package/dist/event/EventType.d.ts +1 -0
- package/dist/event/EventType.d.ts.map +1 -1
- package/dist/event/EventType.mjs +2 -1
- package/dist/event/EventType.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +3 -3
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +3 -3
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/{NativeInteractionClient.d.ts → PlatformAuthInteractionClient.d.ts} +21 -23
- package/dist/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -0
- package/dist/interaction_client/{NativeInteractionClient.mjs → PlatformAuthInteractionClient.mjs} +80 -111
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -0
- package/dist/interaction_client/PopupClient.d.ts +2 -2
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +7 -7
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +2 -2
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +7 -8
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts +2 -2
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +3 -3
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +2 -2
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +7 -8
- package/dist/interaction_client/SilentIframeClient.mjs.map +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 +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +3 -3
- package/dist/navigation/NavigationClient.mjs.map +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts +4 -4
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +10 -9
- 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 +8 -1
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +11 -4
- package/dist/utils/BrowserConstants.mjs.map +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/lib/msal-browser.cjs +1541 -1320
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +1541 -1320
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +66 -66
- package/lib/types/broker/nativeBroker/IPlatformAuthHandler.d.ts +12 -0
- package/lib/types/broker/nativeBroker/IPlatformAuthHandler.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +30 -0
- package/lib/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/{NativeMessageHandler.d.ts → PlatformAuthExtensionHandler.d.ts} +16 -16
- package/lib/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/PlatformAuthProvider.d.ts +26 -0
- package/lib/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/{NativeRequest.d.ts → PlatformAuthRequest.d.ts} +34 -3
- package/lib/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/{NativeResponse.d.ts → PlatformAuthResponse.d.ts} +24 -2
- package/lib/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -0
- package/lib/types/cache/BrowserCacheManager.d.ts +6 -2
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts +2 -2
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/event/EventMessage.d.ts +10 -1
- package/lib/types/event/EventMessage.d.ts.map +1 -1
- package/lib/types/event/EventType.d.ts +1 -0
- package/lib/types/event/EventType.d.ts.map +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/interaction_client/BaseInteractionClient.d.ts +3 -3
- package/lib/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_client/{NativeInteractionClient.d.ts → PlatformAuthInteractionClient.d.ts} +21 -23
- package/lib/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -0
- package/lib/types/interaction_client/PopupClient.d.ts +2 -2
- package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.d.ts +2 -2
- package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentAuthCodeClient.d.ts +2 -2
- package/lib/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentIframeClient.d.ts +2 -2
- package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts +4 -4
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/utils/BrowserConstants.d.ts +8 -1
- package/lib/types/utils/BrowserConstants.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/broker/nativeBroker/IPlatformAuthHandler.ts +17 -0
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +248 -0
- package/src/broker/nativeBroker/{NativeMessageHandler.ts → PlatformAuthExtensionHandler.ts} +90 -79
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +164 -0
- package/src/broker/nativeBroker/{NativeRequest.ts → PlatformAuthRequest.ts} +41 -2
- package/src/broker/nativeBroker/{NativeResponse.ts → PlatformAuthResponse.ts} +25 -1
- package/src/cache/BrowserCacheManager.ts +27 -3
- package/src/controllers/StandardController.ts +51 -45
- package/src/event/EventMessage.ts +11 -0
- package/src/event/EventType.ts +1 -0
- package/src/index.ts +3 -0
- package/src/interaction_client/BaseInteractionClient.ts +4 -4
- package/src/interaction_client/{NativeInteractionClient.ts → PlatformAuthInteractionClient.ts} +136 -167
- package/src/interaction_client/PopupClient.ts +8 -7
- package/src/interaction_client/RedirectClient.ts +12 -12
- package/src/interaction_client/SilentAuthCodeClient.ts +3 -3
- package/src/interaction_client/SilentIframeClient.ts +12 -12
- package/src/navigation/NavigationClient.ts +2 -2
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +12 -10
- package/src/utils/BrowserConstants.ts +9 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +0 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs.map +0 -1
- package/dist/broker/nativeBroker/NativeRequest.d.ts.map +0 -1
- package/dist/broker/nativeBroker/NativeResponse.d.ts.map +0 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +0 -1
- package/dist/interaction_client/NativeInteractionClient.mjs.map +0 -1
- package/lib/types/broker/nativeBroker/NativeMessageHandler.d.ts.map +0 -1
- package/lib/types/broker/nativeBroker/NativeRequest.d.ts.map +0 -1
- package/lib/types/broker/nativeBroker/NativeResponse.d.ts.map +0 -1
- package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformAuthInteractionClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/PlatformAuthInteractionClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,MAAM,EACN,OAAO,EAIP,aAAa,EAEb,QAAQ,EAOR,kBAAkB,EAQlB,WAAW,EAOX,0BAA0B,EAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACH,KAAK,EAIL,iBAAiB,EACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EACH,IAAI,EACJ,oBAAoB,EACvB,MAAM,gDAAgD,CAAC;AAOxD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAKvE,OAAO,EAAE,iB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CACb,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GACvC,MAAM;IAQT,SAAS,CAAC,8BAA8B,CACpC,YAAY,CAAC,EAAE,MAAM,GACtB,IAAI,GAAG,IAAI;IAgCd;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;;OAIG;IACH,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAWlD;;;OAGG;cACa,uBAAuB,CACnC,OAAO,EAAE,YAAY,GAAG,gBAAgB,GACzC,OAAO,CAAC,mBAAmB,CAAC;YAmFjB,qBAAqB;IAoBnC,OAAO,CAAC,SAAS;IAwCjB;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;CA2ClC"}
|
|
@@ -2,13 +2,13 @@ import { CommonEndSessionRequest, IPerformanceClient, Logger, ICrypto, PkceCodes
|
|
|
2
2
|
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
3
3
|
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
|
|
4
4
|
import { PopupRequest } from "../request/PopupRequest.js";
|
|
5
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
6
5
|
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
7
6
|
import { EventHandler } from "../event/EventHandler.js";
|
|
8
7
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
9
8
|
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
10
9
|
import { PopupWindowAttributes } from "../request/PopupWindowAttributes.js";
|
|
11
10
|
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
11
|
+
import { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
12
12
|
export type PopupParams = {
|
|
13
13
|
popup?: Window | null;
|
|
14
14
|
popupName: string;
|
|
@@ -18,7 +18,7 @@ export type PopupParams = {
|
|
|
18
18
|
export declare class PopupClient extends StandardInteractionClient {
|
|
19
19
|
private currentWindow;
|
|
20
20
|
protected nativeStorage: BrowserCacheManager;
|
|
21
|
-
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeStorageImpl: BrowserCacheManager,
|
|
21
|
+
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeStorageImpl: BrowserCacheManager, platformAuthHandler?: IPlatformAuthHandler, correlationId?: string);
|
|
22
22
|
/**
|
|
23
23
|
* Acquires tokens by opening a popup window to the /authorize endpoint of the authority
|
|
24
24
|
* @param request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/PopupClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,uBAAuB,EAKvB,kBAAkB,EAClB,MAAM,EACN,OAAO,EAKP,SAAS,EACT,6BAA6B,EAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAO3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"PopupClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/PopupClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,uBAAuB,EAKvB,kBAAkB,EAClB,MAAM,EACN,OAAO,EAKP,SAAS,EACT,6BAA6B,EAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAO3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK1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uBAAuB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM;CAIpE"}
|
|
@@ -2,15 +2,15 @@ import { ServerTelemetryManager, AuthorizeResponse, ICrypto, Logger, IPerformanc
|
|
|
2
2
|
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
3
3
|
import { EndSessionRequest } from "../request/EndSessionRequest.js";
|
|
4
4
|
import { RedirectRequest } from "../request/RedirectRequest.js";
|
|
5
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
6
5
|
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
7
6
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
8
7
|
import { EventHandler } from "../event/EventHandler.js";
|
|
9
8
|
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
10
9
|
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
10
|
+
import { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
11
11
|
export declare class RedirectClient extends StandardInteractionClient {
|
|
12
12
|
protected nativeStorage: BrowserCacheManager;
|
|
13
|
-
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeStorageImpl: BrowserCacheManager,
|
|
13
|
+
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeStorageImpl: BrowserCacheManager, platformAuthHandler?: IPlatformAuthHandler, correlationId?: string);
|
|
14
14
|
/**
|
|
15
15
|
* Redirects the page to the /authorize endpoint of the IDP
|
|
16
16
|
* @param request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/RedirectClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,sBAAsB,EAE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B,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM;CAOpE"}
|
|
@@ -6,11 +6,11 @@ import { EventHandler } from "../event/EventHandler.js";
|
|
|
6
6
|
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
7
7
|
import { ApiId } from "../utils/BrowserConstants.js";
|
|
8
8
|
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
|
|
9
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
10
9
|
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
10
|
+
import { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
11
11
|
export declare class SilentAuthCodeClient extends StandardInteractionClient {
|
|
12
12
|
private apiId;
|
|
13
|
-
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, performanceClient: IPerformanceClient,
|
|
13
|
+
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, performanceClient: IPerformanceClient, platformAuthProvider?: IPlatformAuthHandler, correlationId?: string);
|
|
14
14
|
/**
|
|
15
15
|
* Acquires a token silently by redeeming an authorization code against the /token endpoint
|
|
16
16
|
* @param request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SilentAuthCodeClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/SilentAuthCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,MAAM,EAGN,kBAAkB,EAIrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACt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,CAAC,EAAE,MAAM;IAgB1B;;;OAGG;IACG,YAAY,CACd,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,oBAAoB,CAAC;IAmFhC;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ1B"}
|
|
@@ -6,12 +6,12 @@ import { EventHandler } from "../event/EventHandler.js";
|
|
|
6
6
|
import { INavigationClient } from "../navigation/INavigationClient.js";
|
|
7
7
|
import { ApiId } from "../utils/BrowserConstants.js";
|
|
8
8
|
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
|
|
9
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
10
9
|
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
10
|
+
import { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
11
11
|
export declare class SilentIframeClient extends StandardInteractionClient {
|
|
12
12
|
protected apiId: ApiId;
|
|
13
13
|
protected nativeStorage: BrowserCacheManager;
|
|
14
|
-
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, performanceClient: IPerformanceClient, nativeStorageImpl: BrowserCacheManager,
|
|
14
|
+
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, performanceClient: IPerformanceClient, nativeStorageImpl: BrowserCacheManager, platformAuthProvider?: IPlatformAuthHandler, correlationId?: string);
|
|
15
15
|
/**
|
|
16
16
|
* Acquires a token silently by opening a hidden iframe to the /authorize endpoint with prompt=none or prompt=no_session
|
|
17
17
|
* @param request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SilentIframeClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/SilentIframeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,MAA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KAAK,CAAC;IACvB,SAAS,CAAC,aAAa,EAAE,mBAAmB,CAAC;gBAGzC,MAAM,EAAE,oBAAoB,EAC5B,WAAW,EAAE,mBAAmB,EAChC,aAAa,EAAE,OAAO,EACtB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,iBAAiB,EACnC,KAAK,EAAE,KAAK,EACZ,iBAAiB,EAAE,kBAAkB,EACrC,iBAAiB,EAAE,mBAAmB,EACtC,oBAAoB,CAAC,EAAE,oBAAoB,EAC3C,aAAa,CAAC,EAAE,MAAM;IAiB1B;;;OAGG;IACG,YAAY,CACd,OAAO,EAAE,gBAAgB,GAC1B,OAAO,CAAC,oBAAoB,CAAC;IAuDhC;;;;OAIG;IACG,eAAe,CACjB,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,CAAC;IA4DhC;;;OAGG;IACG,cAAc,CAChB,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,CAAC;IAuFhC;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IASvB;;;;;OAKG;cACa,iBAAiB,CAC7B,UAAU,EAAE,uBAAuB,EACnC,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,CAAC;CA8FnC"}
|
|
@@ -3,8 +3,8 @@ import { BrowserConfiguration } from "../config/Configuration.js";
|
|
|
3
3
|
import { ApiId } from "../utils/BrowserConstants.js";
|
|
4
4
|
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
5
5
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
|
|
6
|
-
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
|
|
7
6
|
import { EventHandler } from "../event/EventHandler.js";
|
|
7
|
+
import { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
8
8
|
/**
|
|
9
9
|
* Gets the full /authorize URL with request parameters when using Auth Code + PKCE
|
|
10
10
|
* @param config
|
|
@@ -33,7 +33,7 @@ export declare function getEARForm(frame: Document, config: BrowserConfiguration
|
|
|
33
33
|
* @param nativeMessageHandler
|
|
34
34
|
* @returns
|
|
35
35
|
*/
|
|
36
|
-
export declare function handleResponsePlatformBroker(request: CommonAuthorizationUrlRequest, accountId: string, apiId: ApiId, config: BrowserConfiguration, browserStorage: BrowserCacheManager, nativeStorage: BrowserCacheManager, eventHandler: EventHandler, logger: Logger, performanceClient: IPerformanceClient,
|
|
36
|
+
export declare function handleResponsePlatformBroker(request: CommonAuthorizationUrlRequest, accountId: string, apiId: ApiId, config: BrowserConfiguration, browserStorage: BrowserCacheManager, nativeStorage: BrowserCacheManager, eventHandler: EventHandler, logger: Logger, performanceClient: IPerformanceClient, platformAuthProvider?: IPlatformAuthHandler): Promise<AuthenticationResult>;
|
|
37
37
|
/**
|
|
38
38
|
* Response handler when server returns code on the /authorize request
|
|
39
39
|
* @param request
|
|
@@ -45,7 +45,7 @@ export declare function handleResponsePlatformBroker(request: CommonAuthorizatio
|
|
|
45
45
|
* @param performanceClient
|
|
46
46
|
* @returns
|
|
47
47
|
*/
|
|
48
|
-
export declare function handleResponseCode(request: CommonAuthorizationUrlRequest, response: AuthorizeResponse, codeVerifier: string, apiId: ApiId, config: BrowserConfiguration, authClient: AuthorizationCodeClient, browserStorage: BrowserCacheManager, nativeStorage: BrowserCacheManager, eventHandler: EventHandler, logger: Logger, performanceClient: IPerformanceClient,
|
|
48
|
+
export declare function handleResponseCode(request: CommonAuthorizationUrlRequest, response: AuthorizeResponse, codeVerifier: string, apiId: ApiId, config: BrowserConfiguration, authClient: AuthorizationCodeClient, browserStorage: BrowserCacheManager, nativeStorage: BrowserCacheManager, eventHandler: EventHandler, logger: Logger, performanceClient: IPerformanceClient, platformAuthProvider?: IPlatformAuthHandler): Promise<AuthenticationResult>;
|
|
49
49
|
/**
|
|
50
50
|
* Response handler when server returns ear_jwe on the /authorize request
|
|
51
51
|
* @param request
|
|
@@ -61,5 +61,5 @@ export declare function handleResponseCode(request: CommonAuthorizationUrlReques
|
|
|
61
61
|
* @param nativeMessageHandler
|
|
62
62
|
* @returns
|
|
63
63
|
*/
|
|
64
|
-
export declare function handleResponseEAR(request: CommonAuthorizationUrlRequest, response: AuthorizeResponse, apiId: ApiId, config: BrowserConfiguration, authority: Authority, browserStorage: BrowserCacheManager, nativeStorage: BrowserCacheManager, eventHandler: EventHandler, logger: Logger, performanceClient: IPerformanceClient,
|
|
64
|
+
export declare function handleResponseEAR(request: CommonAuthorizationUrlRequest, response: AuthorizeResponse, apiId: ApiId, config: BrowserConfiguration, authority: Authority, browserStorage: BrowserCacheManager, nativeStorage: BrowserCacheManager, eventHandler: EventHandler, logger: Logger, performanceClient: IPerformanceClient, platformAuthProvider?: IPlatformAuthHandler): Promise<AuthenticationResult>;
|
|
65
65
|
//# sourceMappingURL=Authorize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorize.d.ts","sourceRoot":"","sources":["../../../src/protocol/Authorize.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,SAAS,EAGT,6BAA6B,EAG7B,kBAAkB,EAClB,MAAM,EAQN,uBAAuB,EAGvB,iBAAiB,EAKpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAoB,MAAM,8BAA8B,CAAC;AAOvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Authorize.d.ts","sourceRoot":"","sources":["../../../src/protocol/Authorize.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,SAAS,EAGT,6BAA6B,EAG7B,kBAAkB,EAClB,MAAM,EAQN,uBAAuB,EAGvB,iBAAiB,EAKpB,MAAM,4BAA4B,CAAC;AACpC,OAAO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,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,oBAAoB,EAC5B,UAAU,EAAE,uBAAuB,EACnC,cAAc,EAAE,mBAAmB,EACnC,aAAa,EAAE,mBAAmB,EAClC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB,EACrC,oBAAoB,CAAC,EAAE,oBAAoB,GAC5C,OAAO,CAAC,oBAAoB,CAAC,CAkD/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CACnC,OAAO,EAAE,6BAA6B,EACtC,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,oBAAoB,EAC5B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,mBAAmB,EACnC,aAAa,EAAE,mBAAmB,EAClC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB,EACrC,oBAAoB,CAAC,EAAE,oBAAoB,GAC5C,OAAO,CAAC,oBAAoB,CAAC,CA4F/B"}
|
|
@@ -33,10 +33,15 @@ export declare const BrowserConstants: {
|
|
|
33
33
|
*/
|
|
34
34
|
MSAL_SKU: string;
|
|
35
35
|
};
|
|
36
|
-
export declare const
|
|
36
|
+
export declare const PlatformAuthConstants: {
|
|
37
37
|
CHANNEL_ID: string;
|
|
38
38
|
PREFERRED_EXTENSION_ID: string;
|
|
39
39
|
MATS_TELEMETRY: string;
|
|
40
|
+
MICROSOFT_ENTRA_BROKERID: string;
|
|
41
|
+
DOM_API_NAME: string;
|
|
42
|
+
PLATFORM_DOM_APIS: string;
|
|
43
|
+
PLATFORM_DOM_PROVIDER: string;
|
|
44
|
+
PLATFORM_EXTENSION_PROVIDER: string;
|
|
40
45
|
};
|
|
41
46
|
export declare const NativeExtensionMethod: {
|
|
42
47
|
readonly HandshakeRequest: "Handshake";
|
|
@@ -79,6 +84,7 @@ export type TemporaryCacheKeys = (typeof TemporaryCacheKeys)[keyof typeof Tempor
|
|
|
79
84
|
export declare const StaticCacheKeys: {
|
|
80
85
|
readonly ACCOUNT_KEYS: "msal.account.keys";
|
|
81
86
|
readonly TOKEN_KEYS: "msal.token.keys";
|
|
87
|
+
readonly VERSION: "msal.version";
|
|
82
88
|
};
|
|
83
89
|
export type StaticCacheKeys = (typeof StaticCacheKeys)[keyof typeof StaticCacheKeys];
|
|
84
90
|
/**
|
|
@@ -174,4 +180,5 @@ export declare const iFrameRenewalPolicies: CacheLookupPolicy[];
|
|
|
174
180
|
export declare const LOG_LEVEL_CACHE_KEY = "msal.browser.log.level";
|
|
175
181
|
export declare const LOG_PII_CACHE_KEY = "msal.browser.log.pii";
|
|
176
182
|
export declare const BROWSER_PERF_ENABLED_KEY = "msal.browser.performance.enabled";
|
|
183
|
+
export declare const PLATFORM_AUTH_DOM_SUPPORT = "msal.browser.platform.auth.dom";
|
|
177
184
|
//# sourceMappingURL=BrowserConstants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEN,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB;;OAEG;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AzureAD/microsoft-authentication-library-for-js.git"
|
|
12
12
|
},
|
|
13
|
-
"version": "4.
|
|
13
|
+
"version": "4.13.1",
|
|
14
14
|
"description": "Microsoft Authentication Library for js",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"implicit",
|
|
@@ -104,6 +104,6 @@
|
|
|
104
104
|
"typescript": "^4.9.5"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@azure/msal-common": "15.
|
|
107
|
+
"@azure/msal-common": "15.7.0"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { PlatformAuthRequest } from "./PlatformAuthRequest.js";
|
|
7
|
+
import { PlatformAuthResponse } from "./PlatformAuthResponse.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Interface for the Platform Broker Handlers
|
|
11
|
+
*/
|
|
12
|
+
export interface IPlatformAuthHandler {
|
|
13
|
+
getExtensionId(): string | undefined;
|
|
14
|
+
getExtensionVersion(): string | undefined;
|
|
15
|
+
getExtensionName(): string | undefined;
|
|
16
|
+
sendMessage(request: PlatformAuthRequest): Promise<PlatformAuthResponse>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
Logger,
|
|
8
|
+
createAuthError,
|
|
9
|
+
AuthErrorCodes,
|
|
10
|
+
IPerformanceClient,
|
|
11
|
+
StringDict,
|
|
12
|
+
} from "@azure/msal-common/browser";
|
|
13
|
+
import {
|
|
14
|
+
DOMExtraParameters,
|
|
15
|
+
PlatformAuthRequest,
|
|
16
|
+
PlatformDOMTokenRequest,
|
|
17
|
+
} from "./PlatformAuthRequest.js";
|
|
18
|
+
import { PlatformAuthConstants } from "../../utils/BrowserConstants.js";
|
|
19
|
+
import {
|
|
20
|
+
PlatformAuthResponse,
|
|
21
|
+
PlatformDOMTokenResponse,
|
|
22
|
+
} from "./PlatformAuthResponse.js";
|
|
23
|
+
import { createNativeAuthError } from "../../error/NativeAuthError.js";
|
|
24
|
+
import { IPlatformAuthHandler } from "./IPlatformAuthHandler.js";
|
|
25
|
+
|
|
26
|
+
export class PlatformAuthDOMHandler implements IPlatformAuthHandler {
|
|
27
|
+
protected logger: Logger;
|
|
28
|
+
protected performanceClient: IPerformanceClient;
|
|
29
|
+
protected correlationId: string;
|
|
30
|
+
platformAuthType: string;
|
|
31
|
+
|
|
32
|
+
constructor(
|
|
33
|
+
logger: Logger,
|
|
34
|
+
performanceClient: IPerformanceClient,
|
|
35
|
+
correlationId: string
|
|
36
|
+
) {
|
|
37
|
+
this.logger = logger;
|
|
38
|
+
this.performanceClient = performanceClient;
|
|
39
|
+
this.correlationId = correlationId;
|
|
40
|
+
this.platformAuthType = PlatformAuthConstants.PLATFORM_DOM_PROVIDER;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static async createProvider(
|
|
44
|
+
logger: Logger,
|
|
45
|
+
performanceClient: IPerformanceClient,
|
|
46
|
+
correlationId: string
|
|
47
|
+
): Promise<PlatformAuthDOMHandler | undefined> {
|
|
48
|
+
logger.trace("PlatformAuthDOMHandler: createProvider called");
|
|
49
|
+
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
if (window.navigator?.platformAuthentication) {
|
|
52
|
+
const supportedContracts =
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
await window.navigator.platformAuthentication.getSupportedContracts(
|
|
55
|
+
PlatformAuthConstants.MICROSOFT_ENTRA_BROKERID
|
|
56
|
+
);
|
|
57
|
+
if (
|
|
58
|
+
supportedContracts?.includes(
|
|
59
|
+
PlatformAuthConstants.PLATFORM_DOM_APIS
|
|
60
|
+
)
|
|
61
|
+
) {
|
|
62
|
+
logger.trace("Platform auth api available in DOM");
|
|
63
|
+
return new PlatformAuthDOMHandler(
|
|
64
|
+
logger,
|
|
65
|
+
performanceClient,
|
|
66
|
+
correlationId
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Returns the Id for the broker extension this handler is communicating with
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
getExtensionId(): string {
|
|
78
|
+
return PlatformAuthConstants.MICROSOFT_ENTRA_BROKERID;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
getExtensionVersion(): string | undefined {
|
|
82
|
+
return "";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
getExtensionName(): string | undefined {
|
|
86
|
+
return PlatformAuthConstants.DOM_API_NAME;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Send token request to platform broker via browser DOM API
|
|
91
|
+
* @param request
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
async sendMessage(
|
|
95
|
+
request: PlatformAuthRequest
|
|
96
|
+
): Promise<PlatformAuthResponse> {
|
|
97
|
+
this.logger.trace(
|
|
98
|
+
this.platformAuthType + " - Sending request to browser DOM API"
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const platformDOMRequest: PlatformDOMTokenRequest =
|
|
103
|
+
this.initializePlatformDOMRequest(request);
|
|
104
|
+
const response: object =
|
|
105
|
+
// @ts-ignore
|
|
106
|
+
await window.navigator.platformAuthentication.executeGetToken(
|
|
107
|
+
platformDOMRequest
|
|
108
|
+
);
|
|
109
|
+
return this.validatePlatformBrokerResponse(response);
|
|
110
|
+
} catch (e) {
|
|
111
|
+
this.logger.error(
|
|
112
|
+
this.platformAuthType + " - executeGetToken DOM API error"
|
|
113
|
+
);
|
|
114
|
+
throw e;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
private initializePlatformDOMRequest(
|
|
119
|
+
request: PlatformAuthRequest
|
|
120
|
+
): PlatformDOMTokenRequest {
|
|
121
|
+
this.logger.trace(
|
|
122
|
+
this.platformAuthType + " - initializeNativeDOMRequest called"
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
const {
|
|
126
|
+
accountId,
|
|
127
|
+
clientId,
|
|
128
|
+
authority,
|
|
129
|
+
scope,
|
|
130
|
+
redirectUri,
|
|
131
|
+
correlationId,
|
|
132
|
+
state,
|
|
133
|
+
storeInCache,
|
|
134
|
+
embeddedClientId,
|
|
135
|
+
extraParameters,
|
|
136
|
+
...remainingProperties
|
|
137
|
+
} = request;
|
|
138
|
+
|
|
139
|
+
const validExtraParameters: DOMExtraParameters =
|
|
140
|
+
this.getDOMExtraParams(remainingProperties);
|
|
141
|
+
|
|
142
|
+
const platformDOMRequest: PlatformDOMTokenRequest = {
|
|
143
|
+
accountId: accountId,
|
|
144
|
+
brokerId: this.getExtensionId(),
|
|
145
|
+
authority: authority,
|
|
146
|
+
clientId: clientId,
|
|
147
|
+
correlationId: correlationId || this.correlationId,
|
|
148
|
+
extraParameters: { ...extraParameters, ...validExtraParameters },
|
|
149
|
+
isSecurityTokenService: false,
|
|
150
|
+
redirectUri: redirectUri,
|
|
151
|
+
scope: scope,
|
|
152
|
+
state: state,
|
|
153
|
+
storeInCache: storeInCache,
|
|
154
|
+
embeddedClientId: embeddedClientId,
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
return platformDOMRequest;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
private validatePlatformBrokerResponse(
|
|
161
|
+
response: object
|
|
162
|
+
): PlatformAuthResponse {
|
|
163
|
+
if (response.hasOwnProperty("isSuccess")) {
|
|
164
|
+
if (
|
|
165
|
+
response.hasOwnProperty("accessToken") &&
|
|
166
|
+
response.hasOwnProperty("idToken") &&
|
|
167
|
+
response.hasOwnProperty("clientInfo") &&
|
|
168
|
+
response.hasOwnProperty("account") &&
|
|
169
|
+
response.hasOwnProperty("scopes") &&
|
|
170
|
+
response.hasOwnProperty("expiresIn")
|
|
171
|
+
) {
|
|
172
|
+
this.logger.trace(
|
|
173
|
+
this.platformAuthType +
|
|
174
|
+
" - platform broker returned successful and valid response"
|
|
175
|
+
);
|
|
176
|
+
return this.convertToPlatformBrokerResponse(
|
|
177
|
+
response as PlatformDOMTokenResponse
|
|
178
|
+
);
|
|
179
|
+
} else if (response.hasOwnProperty("error")) {
|
|
180
|
+
const errorResponse = response as PlatformDOMTokenResponse;
|
|
181
|
+
if (
|
|
182
|
+
errorResponse.isSuccess === false &&
|
|
183
|
+
errorResponse.error &&
|
|
184
|
+
errorResponse.error.code
|
|
185
|
+
) {
|
|
186
|
+
this.logger.trace(
|
|
187
|
+
this.platformAuthType +
|
|
188
|
+
" - platform broker returned error response"
|
|
189
|
+
);
|
|
190
|
+
throw createNativeAuthError(
|
|
191
|
+
errorResponse.error.code,
|
|
192
|
+
errorResponse.error.description,
|
|
193
|
+
{
|
|
194
|
+
error: parseInt(errorResponse.error.errorCode),
|
|
195
|
+
protocol_error: errorResponse.error.protocolError,
|
|
196
|
+
status: errorResponse.error.status,
|
|
197
|
+
properties: errorResponse.error.properties,
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
throw createAuthError(
|
|
204
|
+
AuthErrorCodes.unexpectedError,
|
|
205
|
+
"Response missing expected properties."
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
private convertToPlatformBrokerResponse(
|
|
210
|
+
response: PlatformDOMTokenResponse
|
|
211
|
+
): PlatformAuthResponse {
|
|
212
|
+
this.logger.trace(
|
|
213
|
+
this.platformAuthType + " - convertToNativeResponse called"
|
|
214
|
+
);
|
|
215
|
+
const nativeResponse: PlatformAuthResponse = {
|
|
216
|
+
access_token: response.accessToken,
|
|
217
|
+
id_token: response.idToken,
|
|
218
|
+
client_info: response.clientInfo,
|
|
219
|
+
account: response.account,
|
|
220
|
+
expires_in: response.expiresIn,
|
|
221
|
+
scope: response.scopes,
|
|
222
|
+
state: response.state || "",
|
|
223
|
+
properties: response.properties || {},
|
|
224
|
+
extendedLifetimeToken: response.extendedLifetimeToken ?? false,
|
|
225
|
+
shr: response.proofOfPossessionPayload,
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
return nativeResponse;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
private getDOMExtraParams(
|
|
232
|
+
extraParameters: Record<string, unknown>
|
|
233
|
+
): DOMExtraParameters {
|
|
234
|
+
const stringifiedParams = Object.entries(extraParameters).reduce(
|
|
235
|
+
(record, [key, value]) => {
|
|
236
|
+
record[key] = String(value);
|
|
237
|
+
return record;
|
|
238
|
+
},
|
|
239
|
+
{} as StringDict
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
const validExtraParams: DOMExtraParameters = {
|
|
243
|
+
...stringifiedParams,
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
return validExtraParams;
|
|
247
|
+
}
|
|
248
|
+
}
|