@azure/msal-browser 3.19.1 → 3.21.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 +53 -53
- package/dist/app/IPublicClientApplication.mjs +105 -105
- package/dist/app/PublicClientApplication.d.ts +293 -293
- package/dist/app/PublicClientApplication.mjs +364 -364
- package/dist/app/PublicClientNext.d.ts +276 -276
- package/dist/app/PublicClientNext.mjs +354 -354
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +62 -62
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +254 -254
- package/dist/broker/nativeBroker/NativeRequest.d.ts +45 -45
- package/dist/broker/nativeBroker/NativeResponse.d.ts +48 -48
- package/dist/broker/nativeBroker/NativeStatusCodes.d.ts +7 -7
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +11 -11
- package/dist/cache/AccountManager.d.ts +48 -48
- package/dist/cache/AccountManager.mjs +126 -126
- package/dist/cache/AsyncMemoryStorage.d.ts +50 -50
- package/dist/cache/AsyncMemoryStorage.mjs +131 -131
- package/dist/cache/BrowserCacheManager.d.ts +410 -385
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1364 -1294
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/BrowserStorage.d.ts +11 -11
- package/dist/cache/BrowserStorage.mjs +32 -32
- package/dist/cache/DatabaseStorage.d.ts +56 -56
- package/dist/cache/DatabaseStorage.mjs +200 -200
- package/dist/cache/IAsyncStorage.d.ts +27 -27
- package/dist/cache/ITokenCache.d.ts +11 -11
- package/dist/cache/IWindowStorage.d.ts +27 -27
- package/dist/cache/MemoryStorage.d.ts +11 -11
- package/dist/cache/MemoryStorage.mjs +31 -31
- package/dist/cache/TokenCache.d.ts +77 -77
- package/dist/cache/TokenCache.mjs +195 -195
- package/dist/config/Configuration.d.ts +213 -208
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +128 -128
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/ControllerFactory.d.ts +5 -5
- package/dist/controllers/ControllerFactory.mjs +25 -25
- package/dist/controllers/IController.d.ts +60 -60
- package/dist/controllers/NestedAppAuthController.d.ts +202 -202
- package/dist/controllers/NestedAppAuthController.mjs +473 -473
- package/dist/controllers/StandardController.d.ts +405 -405
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +1334 -1316
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.d.ts +86 -86
- package/dist/controllers/UnknownOperatingContextController.mjs +256 -256
- package/dist/crypto/BrowserCrypto.d.ts +52 -52
- package/dist/crypto/BrowserCrypto.mjs +151 -151
- package/dist/crypto/CryptoOps.d.ts +74 -74
- package/dist/crypto/CryptoOps.mjs +176 -176
- package/dist/crypto/PkceGenerator.d.ts +8 -8
- package/dist/crypto/PkceGenerator.mjs +54 -54
- package/dist/crypto/SignedHttpRequest.d.ts +30 -30
- package/dist/crypto/SignedHttpRequest.mjs +39 -39
- package/dist/encode/Base64Decode.d.ts +9 -9
- package/dist/encode/Base64Decode.mjs +36 -36
- package/dist/encode/Base64Encode.d.ts +19 -19
- package/dist/encode/Base64Encode.mjs +43 -43
- package/dist/error/BrowserAuthError.d.ts +256 -255
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.mjs +265 -264
- package/dist/error/BrowserAuthError.mjs.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts +47 -46
- package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +53 -52
- package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.d.ts +33 -33
- package/dist/error/BrowserConfigurationAuthError.mjs +40 -40
- package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts +3 -3
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +7 -7
- package/dist/error/NativeAuthError.d.ts +29 -29
- package/dist/error/NativeAuthError.mjs +60 -60
- package/dist/error/NativeAuthErrorCodes.d.ts +2 -2
- package/dist/error/NativeAuthErrorCodes.mjs +6 -6
- package/dist/error/NestedAppAuthError.d.ts +14 -14
- package/dist/error/NestedAppAuthError.mjs +23 -23
- package/dist/event/EventHandler.d.ts +41 -41
- package/dist/event/EventHandler.mjs +125 -125
- package/dist/event/EventMessage.d.ts +25 -25
- package/dist/event/EventMessage.mjs +68 -68
- package/dist/event/EventType.d.ts +29 -29
- package/dist/event/EventType.mjs +32 -32
- package/dist/index.d.ts +40 -40
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +50 -50
- package/dist/interaction_client/BaseInteractionClient.mjs +106 -106
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +4 -4
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +10 -10
- package/dist/interaction_client/NativeInteractionClient.d.ts +151 -143
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +624 -584
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts +118 -105
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +460 -434
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +50 -50
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +349 -317
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts +23 -23
- package/dist/interaction_client/SilentAuthCodeClient.mjs +57 -57
- package/dist/interaction_client/SilentCacheClient.d.ts +16 -16
- package/dist/interaction_client/SilentCacheClient.mjs +42 -42
- package/dist/interaction_client/SilentIframeClient.d.ts +32 -32
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +111 -101
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts +20 -20
- package/dist/interaction_client/SilentRefreshClient.mjs +47 -47
- package/dist/interaction_client/StandardInteractionClient.d.ts +48 -48
- package/dist/interaction_client/StandardInteractionClient.mjs +199 -199
- package/dist/interaction_handler/InteractionHandler.d.ts +33 -33
- package/dist/interaction_handler/InteractionHandler.mjs +93 -93
- package/dist/interaction_handler/RedirectHandler.d.ts +32 -32
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +135 -134
- package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts +13 -13
- package/dist/interaction_handler/SilentHandler.mjs +134 -134
- package/dist/naa/AccountInfo.d.ts +11 -11
- package/dist/naa/AuthBridge.d.ts +8 -8
- package/dist/naa/AuthResult.d.ts +6 -6
- package/dist/naa/BridgeAccountContext.d.ts +12 -12
- package/dist/naa/BridgeCapabilities.d.ts +3 -3
- package/dist/naa/BridgeError.d.ts +9 -9
- package/dist/naa/BridgeError.mjs +7 -7
- package/dist/naa/BridgeProxy.d.ts +67 -67
- package/dist/naa/BridgeProxy.d.ts.map +1 -1
- package/dist/naa/BridgeProxy.mjs +153 -148
- package/dist/naa/BridgeProxy.mjs.map +1 -1
- package/dist/naa/BridgeRequest.d.ts +7 -7
- package/dist/naa/BridgeRequestEnvelope.d.ts +12 -12
- package/dist/naa/BridgeResponseEnvelope.d.ts +13 -13
- package/dist/naa/BridgeStatusCode.d.ts +11 -11
- package/dist/naa/BridgeStatusCode.mjs +14 -14
- package/dist/naa/IBridgeProxy.d.ts +10 -10
- package/dist/naa/InitContext.d.ts +8 -8
- package/dist/naa/TokenRequest.d.ts +18 -18
- package/dist/naa/TokenResponse.d.ts +13 -13
- package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +35 -35
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +179 -179
- package/dist/navigation/INavigationClient.d.ts +16 -16
- package/dist/navigation/NavigationClient.d.ts +22 -22
- package/dist/navigation/NavigationClient.mjs +40 -40
- package/dist/navigation/NavigationOptions.d.ts +12 -12
- package/dist/network/FetchClient.d.ts +26 -26
- package/dist/network/FetchClient.mjs +99 -99
- package/dist/operatingcontext/BaseOperatingContext.d.ts +41 -41
- package/dist/operatingcontext/BaseOperatingContext.mjs +94 -94
- package/dist/operatingcontext/NestedAppOperatingContext.d.ts +34 -34
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +71 -71
- package/dist/operatingcontext/StandardOperatingContext.d.ts +25 -25
- package/dist/operatingcontext/StandardOperatingContext.mjs +43 -43
- package/dist/operatingcontext/UnknownOperatingContext.d.ts +25 -25
- package/dist/operatingcontext/UnknownOperatingContext.mjs +42 -42
- package/dist/packageMetadata.d.ts +2 -2
- package/dist/packageMetadata.mjs +4 -4
- package/dist/request/AuthorizationCodeRequest.d.ts +8 -8
- package/dist/request/AuthorizationUrlRequest.d.ts +8 -8
- package/dist/request/ClearCacheRequest.d.ts +10 -10
- package/dist/request/EndSessionPopupRequest.d.ts +18 -18
- package/dist/request/EndSessionRequest.d.ts +15 -15
- package/dist/request/InitializeApplicationRequest.d.ts +8 -8
- package/dist/request/PopupRequest.d.ts +34 -34
- package/dist/request/PopupWindowAttributes.d.ts +15 -15
- package/dist/request/RedirectRequest.d.ts +40 -35
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/request/RequestHelpers.d.ts +13 -13
- package/dist/request/RequestHelpers.mjs +53 -53
- package/dist/request/SilentRequest.d.ts +33 -33
- package/dist/request/SsoSilentRequest.d.ts +29 -29
- package/dist/response/AuthenticationResult.d.ts +4 -4
- package/dist/response/ResponseHandler.d.ts +7 -7
- package/dist/response/ResponseHandler.mjs +36 -36
- package/dist/telemetry/BrowserPerformanceClient.d.ts +38 -34
- package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +163 -163
- package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +21 -21
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +92 -92
- package/dist/utils/BrowserConstants.d.ts +182 -180
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +214 -212
- package/dist/utils/BrowserConstants.mjs.map +1 -1
- package/dist/utils/BrowserProtocolUtils.d.ts +11 -11
- package/dist/utils/BrowserProtocolUtils.mjs +21 -21
- package/dist/utils/BrowserUtils.d.ts +75 -75
- package/dist/utils/BrowserUtils.mjs +157 -157
- package/lib/msal-browser.cjs +19028 -18759
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +19028 -18759
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +65 -65
- package/package.json +2 -2
- package/src/cache/BrowserCacheManager.ts +95 -0
- package/src/config/Configuration.ts +9 -1
- package/src/controllers/StandardController.ts +30 -12
- package/src/error/BrowserAuthError.ts +2 -0
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/NativeInteractionClient.ts +105 -54
- package/src/interaction_client/PopupClient.ts +202 -117
- package/src/interaction_client/RedirectClient.ts +62 -2
- package/src/interaction_client/SilentIframeClient.ts +41 -3
- package/src/interaction_handler/RedirectHandler.ts +1 -0
- package/src/naa/BridgeProxy.ts +7 -2
- package/src/packageMetadata.ts +1 -1
- package/src/request/RedirectRequest.ts +5 -0
- package/src/telemetry/BrowserPerformanceClient.ts +1 -1
- package/src/utils/BrowserConstants.ts +2 -0
package/dist/naa/BridgeProxy.mjs
CHANGED
|
@@ -1,155 +1,160 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.21.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { BridgeStatusCode } from './BridgeStatusCode.mjs';
|
|
4
4
|
import { createNewGuid } from '../crypto/BrowserCrypto.mjs';
|
|
5
|
+
import { supportsBrowserPerformanceNow } from '../telemetry/BrowserPerformanceClient.mjs';
|
|
5
6
|
|
|
6
|
-
/*
|
|
7
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
-
* Licensed under the MIT License.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* BridgeProxy
|
|
12
|
-
* Provides a proxy for accessing a bridge to a host app and/or
|
|
13
|
-
* platform broker
|
|
14
|
-
*/
|
|
15
|
-
class BridgeProxy {
|
|
16
|
-
/**
|
|
17
|
-
* initializeNestedAppAuthBridge - Initializes the bridge to the host app
|
|
18
|
-
* @returns a promise that resolves to an InitializeBridgeResponse or rejects with an Error
|
|
19
|
-
* @remarks This method will be called by the create factory method
|
|
20
|
-
* @remarks If the bridge is not available, this method will throw an error
|
|
21
|
-
*/
|
|
22
|
-
static async initializeNestedAppAuthBridge() {
|
|
23
|
-
if (window === undefined) {
|
|
24
|
-
throw new Error("window is undefined");
|
|
25
|
-
}
|
|
26
|
-
if (window.nestedAppAuthBridge === undefined) {
|
|
27
|
-
throw new Error("window.nestedAppAuthBridge is undefined");
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
window.nestedAppAuthBridge.addEventListener("message", (response) => {
|
|
31
|
-
const responsePayload = typeof response === "string" ? response : response.data;
|
|
32
|
-
const responseEnvelope = JSON.parse(responsePayload);
|
|
33
|
-
const request = BridgeProxy.bridgeRequests.find((element) => element.requestId === responseEnvelope.requestId);
|
|
34
|
-
if (request !== undefined) {
|
|
35
|
-
BridgeProxy.bridgeRequests.splice(BridgeProxy.bridgeRequests.indexOf(request), 1);
|
|
36
|
-
if (responseEnvelope.success) {
|
|
37
|
-
request.resolve(responseEnvelope);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
request.reject(responseEnvelope.error);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
const bridgeResponse = await new Promise((resolve, reject) => {
|
|
45
|
-
const message = {
|
|
46
|
-
messageType: "NestedAppAuthRequest",
|
|
47
|
-
method: "GetInitContext",
|
|
48
|
-
requestId: createNewGuid(),
|
|
49
|
-
sendTime:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
*
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* BridgeProxy
|
|
13
|
+
* Provides a proxy for accessing a bridge to a host app and/or
|
|
14
|
+
* platform broker
|
|
15
|
+
*/
|
|
16
|
+
class BridgeProxy {
|
|
17
|
+
/**
|
|
18
|
+
* initializeNestedAppAuthBridge - Initializes the bridge to the host app
|
|
19
|
+
* @returns a promise that resolves to an InitializeBridgeResponse or rejects with an Error
|
|
20
|
+
* @remarks This method will be called by the create factory method
|
|
21
|
+
* @remarks If the bridge is not available, this method will throw an error
|
|
22
|
+
*/
|
|
23
|
+
static async initializeNestedAppAuthBridge() {
|
|
24
|
+
if (window === undefined) {
|
|
25
|
+
throw new Error("window is undefined");
|
|
26
|
+
}
|
|
27
|
+
if (window.nestedAppAuthBridge === undefined) {
|
|
28
|
+
throw new Error("window.nestedAppAuthBridge is undefined");
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
window.nestedAppAuthBridge.addEventListener("message", (response) => {
|
|
32
|
+
const responsePayload = typeof response === "string" ? response : response.data;
|
|
33
|
+
const responseEnvelope = JSON.parse(responsePayload);
|
|
34
|
+
const request = BridgeProxy.bridgeRequests.find((element) => element.requestId === responseEnvelope.requestId);
|
|
35
|
+
if (request !== undefined) {
|
|
36
|
+
BridgeProxy.bridgeRequests.splice(BridgeProxy.bridgeRequests.indexOf(request), 1);
|
|
37
|
+
if (responseEnvelope.success) {
|
|
38
|
+
request.resolve(responseEnvelope);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
request.reject(responseEnvelope.error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const bridgeResponse = await new Promise((resolve, reject) => {
|
|
46
|
+
const message = {
|
|
47
|
+
messageType: "NestedAppAuthRequest",
|
|
48
|
+
method: "GetInitContext",
|
|
49
|
+
requestId: createNewGuid(),
|
|
50
|
+
sendTime: supportsBrowserPerformanceNow()
|
|
51
|
+
? window.performance.now()
|
|
52
|
+
: Date.now(),
|
|
53
|
+
};
|
|
54
|
+
const request = {
|
|
55
|
+
requestId: message.requestId,
|
|
56
|
+
method: message.method,
|
|
57
|
+
resolve: resolve,
|
|
58
|
+
reject: reject,
|
|
59
|
+
};
|
|
60
|
+
BridgeProxy.bridgeRequests.push(request);
|
|
61
|
+
window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
|
|
62
|
+
});
|
|
63
|
+
return BridgeProxy.validateBridgeResultOrThrow(bridgeResponse.initContext);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
window.console.log(error);
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* getTokenInteractive - Attempts to get a token interactively from the bridge
|
|
72
|
+
* @param request A token request
|
|
73
|
+
* @returns a promise that resolves to an auth result or rejects with a BridgeError
|
|
74
|
+
*/
|
|
75
|
+
getTokenInteractive(request) {
|
|
76
|
+
return this.getToken("GetTokenPopup", request);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* getTokenSilent Attempts to get a token silently from the bridge
|
|
80
|
+
* @param request A token request
|
|
81
|
+
* @returns a promise that resolves to an auth result or rejects with a BridgeError
|
|
82
|
+
*/
|
|
83
|
+
getTokenSilent(request) {
|
|
84
|
+
return this.getToken("GetToken", request);
|
|
85
|
+
}
|
|
86
|
+
async getToken(requestType, request) {
|
|
87
|
+
const result = await this.sendRequest(requestType, {
|
|
88
|
+
tokenParams: request,
|
|
89
|
+
});
|
|
90
|
+
return {
|
|
91
|
+
token: BridgeProxy.validateBridgeResultOrThrow(result.token),
|
|
92
|
+
account: BridgeProxy.validateBridgeResultOrThrow(result.account),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
getHostCapabilities() {
|
|
96
|
+
return this.capabilities ?? null;
|
|
97
|
+
}
|
|
98
|
+
getAccountContext() {
|
|
99
|
+
return this.accountContext ? this.accountContext : null;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A method used to send a request to the bridge
|
|
103
|
+
* @param request A token request
|
|
104
|
+
* @returns a promise that resolves to a response of provided type or rejects with a BridgeError
|
|
105
|
+
*/
|
|
106
|
+
sendRequest(method, requestParams) {
|
|
107
|
+
const message = {
|
|
108
|
+
messageType: "NestedAppAuthRequest",
|
|
109
|
+
method: method,
|
|
110
|
+
requestId: createNewGuid(),
|
|
111
|
+
sendTime: supportsBrowserPerformanceNow()
|
|
112
|
+
? window.performance.now()
|
|
113
|
+
: Date.now(),
|
|
114
|
+
...requestParams,
|
|
115
|
+
};
|
|
116
|
+
const promise = new Promise((resolve, reject) => {
|
|
117
|
+
const request = {
|
|
118
|
+
requestId: message.requestId,
|
|
119
|
+
method: message.method,
|
|
120
|
+
resolve: resolve,
|
|
121
|
+
reject: reject,
|
|
122
|
+
};
|
|
123
|
+
BridgeProxy.bridgeRequests.push(request);
|
|
124
|
+
window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
|
|
125
|
+
});
|
|
126
|
+
return promise;
|
|
127
|
+
}
|
|
128
|
+
static validateBridgeResultOrThrow(input) {
|
|
129
|
+
if (input === undefined) {
|
|
130
|
+
const bridgeError = {
|
|
131
|
+
status: BridgeStatusCode.NestedAppAuthUnavailable,
|
|
132
|
+
};
|
|
133
|
+
throw bridgeError;
|
|
134
|
+
}
|
|
135
|
+
return input;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Private constructor for BridgeProxy
|
|
139
|
+
* @param sdkName The name of the SDK being used to make requests on behalf of the app
|
|
140
|
+
* @param sdkVersion The version of the SDK being used to make requests on behalf of the app
|
|
141
|
+
* @param capabilities The capabilities of the bridge / SDK / platform broker
|
|
142
|
+
*/
|
|
143
|
+
constructor(sdkName, sdkVersion, accountContext, capabilities) {
|
|
144
|
+
this.sdkName = sdkName;
|
|
145
|
+
this.sdkVersion = sdkVersion;
|
|
146
|
+
this.accountContext = accountContext;
|
|
147
|
+
this.capabilities = capabilities;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Factory method for creating an implementation of IBridgeProxy
|
|
151
|
+
* @returns A promise that resolves to a BridgeProxy implementation
|
|
152
|
+
*/
|
|
153
|
+
static async create() {
|
|
154
|
+
const response = await BridgeProxy.initializeNestedAppAuthBridge();
|
|
155
|
+
return new BridgeProxy(response.sdkName, response.sdkVersion, response.accountContext, response.capabilities);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
153
158
|
BridgeProxy.bridgeRequests = [];
|
|
154
159
|
|
|
155
160
|
export { BridgeProxy, BridgeProxy as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeProxy.mjs","sources":["../../src/naa/BridgeProxy.ts"],"sourcesContent":[null],"names":["BrowserCrypto.createNewGuid"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BridgeProxy.mjs","sources":["../../src/naa/BridgeProxy.ts"],"sourcesContent":[null],"names":["BrowserCrypto.createNewGuid"],"mappings":";;;;;;AAAA;;;AAGG;AAuBH;;;;AAIG;MACU,WAAW,CAAA;AAOpB;;;;;AAKG;IACO,aAAa,6BAA6B,GAAA;QAChD,IAAI,MAAM,KAAK,SAAS,EAAE;AACtB,YAAA,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAC1C,SAAA;AACD,QAAA,IAAI,MAAM,CAAC,mBAAmB,KAAK,SAAS,EAAE;AAC1C,YAAA,MAAM,IAAI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ACf,UAAkB,EAClB,cAA+B,EAC/B,YAAiC,EAAA;AAEjC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;AACrC,QAAA,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;KACpC;AAED;;;AAGG;IACI,aAAa,MAAM,GAAA;AACtB,QAAA,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,6BAA6B,EAAE,CAAC;AACnE,QAAA,OAAO,IAAI,WAAW,CAClB,QAAQ,CAAC,OAAO,EAChB,QAAQ,CAAC,UAAU,EACnB,QAAQ,CAAC,cAAc,EACvB,QAAQ,CAAC,YAAY,CACxB,CAAC;KACL;;AAhMM,WAAc,CAAA,cAAA,GAAoB,EAAE;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BridgeResponseEnvelope } from "./BridgeResponseEnvelope";
|
|
2
|
-
export type BridgeRequest = {
|
|
3
|
-
requestId: string;
|
|
4
|
-
method: string;
|
|
5
|
-
resolve: (value: BridgeResponseEnvelope | PromiseLike<BridgeResponseEnvelope>) => void;
|
|
6
|
-
reject: (reason?: any) => void;
|
|
7
|
-
};
|
|
1
|
+
import { BridgeResponseEnvelope } from "./BridgeResponseEnvelope";
|
|
2
|
+
export type BridgeRequest = {
|
|
3
|
+
requestId: string;
|
|
4
|
+
method: string;
|
|
5
|
+
resolve: (value: BridgeResponseEnvelope | PromiseLike<BridgeResponseEnvelope>) => void;
|
|
6
|
+
reject: (reason?: any) => void;
|
|
7
|
+
};
|
|
8
8
|
//# sourceMappingURL=BridgeRequest.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TokenRequest } from "./TokenRequest";
|
|
2
|
-
export type BridgeMethods = "GetToken" | "GetInitContext" | "GetTokenPopup";
|
|
3
|
-
export type BridgeRequestEnvelope = {
|
|
4
|
-
messageType: "NestedAppAuthRequest";
|
|
5
|
-
method: BridgeMethods;
|
|
6
|
-
sendTime?: number;
|
|
7
|
-
clientLibrary?: string;
|
|
8
|
-
clientLibraryVersion?: string;
|
|
9
|
-
requestId: string;
|
|
10
|
-
tokenParams?: TokenRequest;
|
|
11
|
-
};
|
|
12
|
-
export declare function isBridgeRequestEnvelope(obj: unknown): obj is BridgeRequestEnvelope;
|
|
1
|
+
import { TokenRequest } from "./TokenRequest";
|
|
2
|
+
export type BridgeMethods = "GetToken" | "GetInitContext" | "GetTokenPopup";
|
|
3
|
+
export type BridgeRequestEnvelope = {
|
|
4
|
+
messageType: "NestedAppAuthRequest";
|
|
5
|
+
method: BridgeMethods;
|
|
6
|
+
sendTime?: number;
|
|
7
|
+
clientLibrary?: string;
|
|
8
|
+
clientLibraryVersion?: string;
|
|
9
|
+
requestId: string;
|
|
10
|
+
tokenParams?: TokenRequest;
|
|
11
|
+
};
|
|
12
|
+
export declare function isBridgeRequestEnvelope(obj: unknown): obj is BridgeRequestEnvelope;
|
|
13
13
|
//# sourceMappingURL=BridgeRequestEnvelope.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { BridgeError } from "./BridgeError";
|
|
2
|
-
import { TokenResponse } from "./TokenResponse";
|
|
3
|
-
import { AccountInfo } from "./AccountInfo";
|
|
4
|
-
import { InitContext } from "./InitContext";
|
|
5
|
-
export type BridgeResponseEnvelope = {
|
|
6
|
-
messageType: "NestedAppAuthResponse";
|
|
7
|
-
requestId: string;
|
|
8
|
-
success: boolean;
|
|
9
|
-
token?: TokenResponse;
|
|
10
|
-
error?: BridgeError;
|
|
11
|
-
account?: AccountInfo;
|
|
12
|
-
initContext?: InitContext;
|
|
13
|
-
};
|
|
1
|
+
import { BridgeError } from "./BridgeError";
|
|
2
|
+
import { TokenResponse } from "./TokenResponse";
|
|
3
|
+
import { AccountInfo } from "./AccountInfo";
|
|
4
|
+
import { InitContext } from "./InitContext";
|
|
5
|
+
export type BridgeResponseEnvelope = {
|
|
6
|
+
messageType: "NestedAppAuthResponse";
|
|
7
|
+
requestId: string;
|
|
8
|
+
success: boolean;
|
|
9
|
+
token?: TokenResponse;
|
|
10
|
+
error?: BridgeError;
|
|
11
|
+
account?: AccountInfo;
|
|
12
|
+
initContext?: InitContext;
|
|
13
|
+
};
|
|
14
14
|
//# sourceMappingURL=BridgeResponseEnvelope.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare const BridgeStatusCode: {
|
|
2
|
-
readonly UserInteractionRequired: "USER_INTERACTION_REQUIRED";
|
|
3
|
-
readonly UserCancel: "USER_CANCEL";
|
|
4
|
-
readonly NoNetwork: "NO_NETWORK";
|
|
5
|
-
readonly TransientError: "TRANSIENT_ERROR";
|
|
6
|
-
readonly PersistentError: "PERSISTENT_ERROR";
|
|
7
|
-
readonly Disabled: "DISABLED";
|
|
8
|
-
readonly AccountUnavailable: "ACCOUNT_UNAVAILABLE";
|
|
9
|
-
readonly NestedAppAuthUnavailable: "NESTED_APP_AUTH_UNAVAILABLE";
|
|
10
|
-
};
|
|
11
|
-
export type BridgeStatusCode = (typeof BridgeStatusCode)[keyof typeof BridgeStatusCode];
|
|
1
|
+
export declare const BridgeStatusCode: {
|
|
2
|
+
readonly UserInteractionRequired: "USER_INTERACTION_REQUIRED";
|
|
3
|
+
readonly UserCancel: "USER_CANCEL";
|
|
4
|
+
readonly NoNetwork: "NO_NETWORK";
|
|
5
|
+
readonly TransientError: "TRANSIENT_ERROR";
|
|
6
|
+
readonly PersistentError: "PERSISTENT_ERROR";
|
|
7
|
+
readonly Disabled: "DISABLED";
|
|
8
|
+
readonly AccountUnavailable: "ACCOUNT_UNAVAILABLE";
|
|
9
|
+
readonly NestedAppAuthUnavailable: "NESTED_APP_AUTH_UNAVAILABLE";
|
|
10
|
+
};
|
|
11
|
+
export type BridgeStatusCode = (typeof BridgeStatusCode)[keyof typeof BridgeStatusCode];
|
|
12
12
|
//# sourceMappingURL=BridgeStatusCode.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.21.0 2024-08-13 */
|
|
2
2
|
'use strict';
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/
|
|
7
|
-
const BridgeStatusCode = {
|
|
8
|
-
UserInteractionRequired: "USER_INTERACTION_REQUIRED",
|
|
9
|
-
UserCancel: "USER_CANCEL",
|
|
10
|
-
NoNetwork: "NO_NETWORK",
|
|
11
|
-
TransientError: "TRANSIENT_ERROR",
|
|
12
|
-
PersistentError: "PERSISTENT_ERROR",
|
|
13
|
-
Disabled: "DISABLED",
|
|
14
|
-
AccountUnavailable: "ACCOUNT_UNAVAILABLE",
|
|
15
|
-
NestedAppAuthUnavailable: "NESTED_APP_AUTH_UNAVAILABLE", // NAA is unavailable in the current context, can retry with standard browser based auth
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
* Licensed under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
const BridgeStatusCode = {
|
|
8
|
+
UserInteractionRequired: "USER_INTERACTION_REQUIRED",
|
|
9
|
+
UserCancel: "USER_CANCEL",
|
|
10
|
+
NoNetwork: "NO_NETWORK",
|
|
11
|
+
TransientError: "TRANSIENT_ERROR",
|
|
12
|
+
PersistentError: "PERSISTENT_ERROR",
|
|
13
|
+
Disabled: "DISABLED",
|
|
14
|
+
AccountUnavailable: "ACCOUNT_UNAVAILABLE",
|
|
15
|
+
NestedAppAuthUnavailable: "NESTED_APP_AUTH_UNAVAILABLE", // NAA is unavailable in the current context, can retry with standard browser based auth
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export { BridgeStatusCode };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AuthResult } from "./AuthResult";
|
|
2
|
-
import { AccountContext } from "./BridgeAccountContext";
|
|
3
|
-
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
4
|
-
import { TokenRequest } from "./TokenRequest";
|
|
5
|
-
export interface IBridgeProxy {
|
|
6
|
-
getTokenInteractive(request: TokenRequest): Promise<AuthResult>;
|
|
7
|
-
getTokenSilent(request: TokenRequest): Promise<AuthResult>;
|
|
8
|
-
getHostCapabilities(): BridgeCapabilities | null;
|
|
9
|
-
getAccountContext(): AccountContext | null;
|
|
10
|
-
}
|
|
1
|
+
import { AuthResult } from "./AuthResult";
|
|
2
|
+
import { AccountContext } from "./BridgeAccountContext";
|
|
3
|
+
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
4
|
+
import { TokenRequest } from "./TokenRequest";
|
|
5
|
+
export interface IBridgeProxy {
|
|
6
|
+
getTokenInteractive(request: TokenRequest): Promise<AuthResult>;
|
|
7
|
+
getTokenSilent(request: TokenRequest): Promise<AuthResult>;
|
|
8
|
+
getHostCapabilities(): BridgeCapabilities | null;
|
|
9
|
+
getAccountContext(): AccountContext | null;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=IBridgeProxy.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
2
|
-
import { AccountContext } from "./BridgeAccountContext";
|
|
3
|
-
export interface InitContext {
|
|
4
|
-
capabilities?: BridgeCapabilities;
|
|
5
|
-
sdkName: string;
|
|
6
|
-
sdkVersion: string;
|
|
7
|
-
accountContext?: AccountContext;
|
|
8
|
-
}
|
|
1
|
+
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
2
|
+
import { AccountContext } from "./BridgeAccountContext";
|
|
3
|
+
export interface InitContext {
|
|
4
|
+
capabilities?: BridgeCapabilities;
|
|
5
|
+
sdkName: string;
|
|
6
|
+
sdkVersion: string;
|
|
7
|
+
accountContext?: AccountContext;
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=InitContext.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export type TokenRequest = {
|
|
2
|
-
platformBrokerId?: string;
|
|
3
|
-
clientId: string;
|
|
4
|
-
authority?: string;
|
|
5
|
-
scope: string;
|
|
6
|
-
correlationId: string;
|
|
7
|
-
claims?: string;
|
|
8
|
-
state?: string;
|
|
9
|
-
reqCnf?: string;
|
|
10
|
-
keyId?: string;
|
|
11
|
-
authenticationScheme?: string;
|
|
12
|
-
shrClaims?: string;
|
|
13
|
-
shrNonce?: string;
|
|
14
|
-
resourceRequestMethod?: string;
|
|
15
|
-
resourceRequestUri?: string;
|
|
16
|
-
extendedExpiryToken?: boolean;
|
|
17
|
-
extraParameters?: Map<string, string>;
|
|
18
|
-
};
|
|
1
|
+
export type TokenRequest = {
|
|
2
|
+
platformBrokerId?: string;
|
|
3
|
+
clientId: string;
|
|
4
|
+
authority?: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
correlationId: string;
|
|
7
|
+
claims?: string;
|
|
8
|
+
state?: string;
|
|
9
|
+
reqCnf?: string;
|
|
10
|
+
keyId?: string;
|
|
11
|
+
authenticationScheme?: string;
|
|
12
|
+
shrClaims?: string;
|
|
13
|
+
shrNonce?: string;
|
|
14
|
+
resourceRequestMethod?: string;
|
|
15
|
+
resourceRequestUri?: string;
|
|
16
|
+
extendedExpiryToken?: boolean;
|
|
17
|
+
extraParameters?: Map<string, string>;
|
|
18
|
+
};
|
|
19
19
|
//# sourceMappingURL=TokenRequest.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export type TokenResponse = {
|
|
2
|
-
access_token: string;
|
|
3
|
-
expires_in: number;
|
|
4
|
-
id_token: string;
|
|
5
|
-
properties: TokenResponseProperties | null;
|
|
6
|
-
scope?: string;
|
|
7
|
-
shr?: string;
|
|
8
|
-
extendedLifetimeToken?: boolean;
|
|
9
|
-
authority?: string;
|
|
10
|
-
};
|
|
11
|
-
export type TokenResponseProperties = {
|
|
12
|
-
MATS?: string;
|
|
13
|
-
};
|
|
1
|
+
export type TokenResponse = {
|
|
2
|
+
access_token: string;
|
|
3
|
+
expires_in: number;
|
|
4
|
+
id_token: string;
|
|
5
|
+
properties: TokenResponseProperties | null;
|
|
6
|
+
scope?: string;
|
|
7
|
+
shr?: string;
|
|
8
|
+
extendedLifetimeToken?: boolean;
|
|
9
|
+
authority?: string;
|
|
10
|
+
};
|
|
11
|
+
export type TokenResponseProperties = {
|
|
12
|
+
MATS?: string;
|
|
13
|
+
};
|
|
14
14
|
//# sourceMappingURL=TokenResponse.d.ts.map
|