@azure/msal-browser 3.5.1-beta.0 → 3.6.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 +51 -51
- package/dist/app/IPublicClientApplication.mjs +102 -102
- package/dist/app/IPublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientApplication.d.ts +269 -268
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.mjs +333 -333
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientNext.d.ts +273 -273
- package/dist/app/PublicClientNext.mjs +351 -351
- package/dist/app/PublicClientNext.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +62 -62
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +254 -254
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeRequest.d.ts +44 -44
- 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/broker/nativeBroker/NativeStatusCodes.mjs.map +1 -1
- package/dist/cache/AsyncMemoryStorage.d.ts +51 -51
- package/dist/cache/AsyncMemoryStorage.mjs +132 -132
- package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +395 -383
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1282 -1262
- 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/BrowserStorage.mjs.map +1 -1
- package/dist/cache/CryptoKeyStore.d.ts +18 -18
- package/dist/cache/CryptoKeyStore.mjs +40 -40
- package/dist/cache/CryptoKeyStore.mjs.map +1 -1
- package/dist/cache/DatabaseStorage.d.ts +56 -56
- package/dist/cache/DatabaseStorage.mjs +190 -190
- package/dist/cache/DatabaseStorage.mjs.map +1 -1
- package/dist/cache/IAsyncMemoryStorage.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/MemoryStorage.mjs.map +1 -1
- package/dist/cache/TokenCache.d.ts +77 -77
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +221 -225
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.d.ts +206 -206
- 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 +4 -4
- package/dist/controllers/ControllerFactory.d.ts.map +1 -1
- package/dist/controllers/ControllerFactory.mjs +29 -29
- package/dist/controllers/ControllerFactory.mjs.map +1 -1
- package/dist/controllers/IController.d.ts +61 -61
- package/dist/controllers/NestedAppAuthController.d.ts +95 -95
- package/dist/controllers/NestedAppAuthController.mjs +334 -334
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.d.ts +407 -407
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +1291 -1293
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.d.ts +87 -87
- package/dist/controllers/UnknownOperatingContextController.mjs +264 -264
- package/dist/controllers/UnknownOperatingContextController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.d.ts +44 -44
- package/dist/crypto/BrowserCrypto.mjs +93 -93
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.d.ts +63 -63
- package/dist/crypto/CryptoOps.mjs +145 -145
- package/dist/crypto/CryptoOps.mjs.map +1 -1
- package/dist/crypto/PkceGenerator.d.ts +8 -8
- package/dist/crypto/PkceGenerator.mjs +54 -54
- package/dist/crypto/PkceGenerator.mjs.map +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts +30 -30
- package/dist/crypto/SignedHttpRequest.mjs +39 -39
- package/dist/crypto/SignedHttpRequest.mjs.map +1 -1
- package/dist/encode/Base64Decode.d.ts +9 -9
- package/dist/encode/Base64Decode.mjs +36 -36
- package/dist/encode/Base64Decode.mjs.map +1 -1
- package/dist/encode/Base64Encode.d.ts +19 -19
- package/dist/encode/Base64Encode.mjs +43 -43
- package/dist/encode/Base64Encode.mjs.map +1 -1
- package/dist/error/BrowserAuthError.d.ts +250 -250
- package/dist/error/BrowserAuthError.mjs +258 -258
- package/dist/error/BrowserAuthError.mjs.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts +45 -45
- package/dist/error/BrowserAuthErrorCodes.mjs +49 -49
- 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/BrowserConfigurationAuthErrorCodes.mjs.map +1 -1
- package/dist/error/NativeAuthError.d.ts +29 -29
- package/dist/error/NativeAuthError.mjs +60 -60
- package/dist/error/NativeAuthError.mjs.map +1 -1
- package/dist/error/NativeAuthErrorCodes.d.ts +2 -2
- package/dist/error/NativeAuthErrorCodes.mjs +6 -6
- package/dist/error/NativeAuthErrorCodes.mjs.map +1 -1
- package/dist/error/NestedAppAuthError.d.ts +14 -14
- package/dist/error/NestedAppAuthError.mjs +23 -23
- package/dist/error/NestedAppAuthError.mjs.map +1 -1
- package/dist/event/EventHandler.d.ts +41 -41
- package/dist/event/EventHandler.mjs +119 -119
- package/dist/event/EventHandler.mjs.map +1 -1
- package/dist/event/EventMessage.d.ts +25 -25
- package/dist/event/EventMessage.mjs +68 -68
- package/dist/event/EventMessage.mjs.map +1 -1
- package/dist/event/EventType.d.ts +28 -28
- package/dist/event/EventType.mjs +31 -31
- package/dist/event/EventType.mjs.map +1 -1
- package/dist/index.d.ts +39 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +54 -54
- package/dist/interaction_client/BaseInteractionClient.mjs +152 -152
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +4 -4
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +10 -10
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +140 -140
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +539 -549
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts +105 -105
- package/dist/interaction_client/PopupClient.mjs +432 -432
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +49 -49
- package/dist/interaction_client/RedirectClient.mjs +311 -311
- 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/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentCacheClient.d.ts +24 -24
- package/dist/interaction_client/SilentCacheClient.mjs +61 -61
- package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +32 -32
- package/dist/interaction_client/SilentIframeClient.mjs +96 -96
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts +20 -20
- package/dist/interaction_client/SilentRefreshClient.mjs +43 -43
- package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts +54 -54
- package/dist/interaction_client/StandardInteractionClient.mjs +222 -222
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +33 -33
- package/dist/interaction_handler/InteractionHandler.mjs +93 -93
- package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts +32 -32
- package/dist/interaction_handler/RedirectHandler.mjs +134 -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 +133 -133
- package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
- package/dist/naa/AccountInfo.d.ts +11 -11
- package/dist/naa/AccountRequests.d.ts +9 -9
- package/dist/naa/AuthBridge.d.ts +8 -5
- package/dist/naa/AuthBridge.d.ts.map +1 -1
- 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/BridgeError.mjs.map +1 -1
- package/dist/naa/BridgeProxy.d.ts +72 -72
- package/dist/naa/BridgeProxy.d.ts.map +1 -1
- package/dist/naa/BridgeProxy.mjs +153 -152
- package/dist/naa/BridgeProxy.mjs.map +1 -1
- package/dist/naa/BridgeRequest.d.ts +6 -6
- package/dist/naa/BridgeRequestEnvelope.d.ts +13 -13
- package/dist/naa/BridgeResponseEnvelope.d.ts +10 -10
- package/dist/naa/BridgeStatusCode.d.ts +10 -10
- package/dist/naa/BridgeStatusCode.mjs +15 -15
- package/dist/naa/BridgeStatusCode.mjs.map +1 -1
- package/dist/naa/IBridgeProxy.d.ts +12 -12
- package/dist/naa/InitializeBridgeResponse.d.ts +6 -6
- package/dist/naa/TokenRequest.d.ts +19 -19
- package/dist/naa/TokenResponse.d.ts +15 -15
- package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +23 -23
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +141 -141
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
- 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/NavigationClient.mjs.map +1 -1
- 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/network/FetchClient.mjs.map +1 -1
- package/dist/operatingcontext/BaseOperatingContext.d.ts +40 -40
- package/dist/operatingcontext/BaseOperatingContext.mjs +44 -44
- package/dist/operatingcontext/BaseOperatingContext.mjs.map +1 -1
- package/dist/operatingcontext/StandardOperatingContext.d.ts +25 -25
- package/dist/operatingcontext/StandardOperatingContext.mjs +43 -43
- package/dist/operatingcontext/StandardOperatingContext.mjs.map +1 -1
- package/dist/operatingcontext/TeamsAppOperatingContext.d.ts +32 -32
- package/dist/operatingcontext/TeamsAppOperatingContext.mjs +85 -85
- package/dist/operatingcontext/TeamsAppOperatingContext.mjs.map +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.d.ts +25 -25
- package/dist/operatingcontext/UnknownOperatingContext.mjs +42 -42
- package/dist/operatingcontext/UnknownOperatingContext.mjs.map +1 -1
- package/dist/packageMetadata.d.ts +2 -2
- package/dist/packageMetadata.mjs +4 -4
- package/dist/packageMetadata.mjs.map +1 -1
- 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/PopupRequest.d.ts +34 -34
- package/dist/request/PopupWindowAttributes.d.ts +15 -15
- package/dist/request/RedirectRequest.d.ts +35 -35
- package/dist/request/SilentRequest.d.ts +32 -32
- 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/response/ResponseHandler.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.d.ts +36 -36
- package/dist/telemetry/BrowserPerformanceClient.mjs +125 -125
- 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/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
- package/dist/utils/BrowserConstants.d.ts +176 -176
- package/dist/utils/BrowserConstants.mjs +204 -204
- 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/BrowserProtocolUtils.mjs.map +1 -1
- package/dist/utils/BrowserUtils.d.ts +56 -56
- package/dist/utils/BrowserUtils.mjs +125 -125
- package/dist/utils/BrowserUtils.mjs.map +1 -1
- package/lib/msal-browser.cjs +18217 -17928
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +18217 -17928
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +71 -68
- package/package.json +103 -102
- package/src/app/PublicClientApplication.ts +2 -1
- package/src/cache/BrowserCacheManager.ts +31 -4
- package/src/cache/DatabaseStorage.ts +1 -1
- package/src/cache/TokenCache.ts +33 -29
- package/src/config/Configuration.ts +1 -1
- package/src/controllers/ControllerFactory.ts +3 -5
- package/src/controllers/StandardController.ts +4 -6
- package/src/crypto/CryptoOps.ts +1 -1
- package/src/crypto/SignedHttpRequest.ts +1 -1
- package/src/index.ts +1 -0
- package/src/interaction_client/BaseInteractionClient.ts +2 -2
- package/src/interaction_client/NativeInteractionClient.ts +23 -20
- package/src/interaction_client/PopupClient.ts +1 -1
- package/src/interaction_client/RedirectClient.ts +3 -3
- package/src/interaction_client/SilentAuthCodeClient.ts +1 -1
- package/src/interaction_client/StandardInteractionClient.ts +1 -1
- package/src/interaction_handler/SilentHandler.ts +2 -2
- package/src/naa/AuthBridge.ts +3 -2
- package/src/naa/BridgeProxy.ts +6 -4
- package/src/packageMetadata.ts +1 -1
package/dist/naa/BridgeProxy.mjs
CHANGED
|
@@ -1,156 +1,157 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.6.0 2023-12-01 */
|
|
2
2
|
'use strict';
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* BridgeProxy
|
|
9
|
-
* Provides a proxy for accessing a bridge to a host app and/or
|
|
10
|
-
* platform broker
|
|
11
|
-
*/
|
|
12
|
-
class BridgeProxy {
|
|
13
|
-
/**
|
|
14
|
-
* initializeNestedAppAuthBridge - Initializes the bridge to the host app
|
|
15
|
-
* @returns a promise that resolves to an InitializeBridgeResponse or rejects with an Error
|
|
16
|
-
* @remarks This method will be called by the create factory method
|
|
17
|
-
* @remarks If the bridge is not available, this method will throw an error
|
|
18
|
-
*/
|
|
19
|
-
static async initializeNestedAppAuthBridge() {
|
|
20
|
-
if (window === undefined) {
|
|
21
|
-
throw new Error("window is undefined");
|
|
22
|
-
}
|
|
23
|
-
if (window.nestedAppAuthBridge === undefined) {
|
|
24
|
-
throw new Error("window.nestedAppAuthBridge is undefined");
|
|
25
|
-
}
|
|
26
|
-
if (window.crypto === undefined) {
|
|
27
|
-
throw new Error("window.crypto is undefined");
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
BridgeProxy.crypto = window.crypto;
|
|
31
|
-
window.nestedAppAuthBridge.addEventListener("message", (response) => {
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
* @param
|
|
137
|
-
* @param
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
this.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
* Licensed under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* BridgeProxy
|
|
9
|
+
* Provides a proxy for accessing a bridge to a host app and/or
|
|
10
|
+
* platform broker
|
|
11
|
+
*/
|
|
12
|
+
class BridgeProxy {
|
|
13
|
+
/**
|
|
14
|
+
* initializeNestedAppAuthBridge - Initializes the bridge to the host app
|
|
15
|
+
* @returns a promise that resolves to an InitializeBridgeResponse or rejects with an Error
|
|
16
|
+
* @remarks This method will be called by the create factory method
|
|
17
|
+
* @remarks If the bridge is not available, this method will throw an error
|
|
18
|
+
*/
|
|
19
|
+
static async initializeNestedAppAuthBridge() {
|
|
20
|
+
if (window === undefined) {
|
|
21
|
+
throw new Error("window is undefined");
|
|
22
|
+
}
|
|
23
|
+
if (window.nestedAppAuthBridge === undefined) {
|
|
24
|
+
throw new Error("window.nestedAppAuthBridge is undefined");
|
|
25
|
+
}
|
|
26
|
+
if (window.crypto === undefined) {
|
|
27
|
+
throw new Error("window.crypto is undefined");
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
BridgeProxy.crypto = window.crypto;
|
|
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.body);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
request.reject(responseEnvelope.body);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const promise = new Promise((resolve, reject) => {
|
|
46
|
+
const message = {
|
|
47
|
+
messageType: "NestedAppAuthRequest",
|
|
48
|
+
method: "GetInitContext",
|
|
49
|
+
requestId: BridgeProxy.getRandomId(),
|
|
50
|
+
};
|
|
51
|
+
const request = {
|
|
52
|
+
requestId: message.requestId,
|
|
53
|
+
method: message.method,
|
|
54
|
+
resolve: resolve,
|
|
55
|
+
reject: reject,
|
|
56
|
+
};
|
|
57
|
+
BridgeProxy.bridgeRequests.push(request);
|
|
58
|
+
window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
|
|
59
|
+
});
|
|
60
|
+
return await promise;
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
window.console.log(error);
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
static getRandomId() {
|
|
68
|
+
return BridgeProxy.crypto.randomUUID();
|
|
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 a token response or rejects with a BridgeError
|
|
74
|
+
*/
|
|
75
|
+
getTokenInteractive(request) {
|
|
76
|
+
return this.sendRequest("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 a token response or rejects with a BridgeError
|
|
82
|
+
*/
|
|
83
|
+
getTokenSilent(request) {
|
|
84
|
+
return this.sendRequest("GetToken", request);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* getAccountInfo - Gets account information from the bridge
|
|
88
|
+
*
|
|
89
|
+
* @param request A request for account information
|
|
90
|
+
*/
|
|
91
|
+
getAccountInfo(request) {
|
|
92
|
+
let method = "GetAccountByHomeId";
|
|
93
|
+
if (request.homeAccountId !== undefined) {
|
|
94
|
+
method = "GetAccountByHomeId";
|
|
95
|
+
}
|
|
96
|
+
if (request.localAccountId !== undefined) {
|
|
97
|
+
method = "GetAccountByLocalId";
|
|
98
|
+
}
|
|
99
|
+
if (request.username !== undefined) {
|
|
100
|
+
method = "GetAccountByUsername";
|
|
101
|
+
}
|
|
102
|
+
return this.sendRequest(method, request);
|
|
103
|
+
}
|
|
104
|
+
getActiveAccount() {
|
|
105
|
+
return this.sendRequest("GetActiveAccount", undefined);
|
|
106
|
+
}
|
|
107
|
+
getHostCapabilities() {
|
|
108
|
+
return this.capabilities ?? null;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* A method used to send a request to the bridge
|
|
112
|
+
* @param request A token request
|
|
113
|
+
* @returns a promise that resolves to a response of provided type or rejects with a BridgeError
|
|
114
|
+
*/
|
|
115
|
+
sendRequest(method, request) {
|
|
116
|
+
const message = {
|
|
117
|
+
messageType: "NestedAppAuthRequest",
|
|
118
|
+
method: method,
|
|
119
|
+
requestId: BridgeProxy.getRandomId(),
|
|
120
|
+
body: request,
|
|
121
|
+
};
|
|
122
|
+
const promise = new Promise((resolve, reject) => {
|
|
123
|
+
const request = {
|
|
124
|
+
requestId: message.requestId,
|
|
125
|
+
method: message.method,
|
|
126
|
+
resolve: resolve,
|
|
127
|
+
reject: reject,
|
|
128
|
+
};
|
|
129
|
+
BridgeProxy.bridgeRequests.push(request);
|
|
130
|
+
window.nestedAppAuthBridge.postMessage(JSON.stringify(message));
|
|
131
|
+
});
|
|
132
|
+
return promise;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Private constructor for BridgeProxy
|
|
136
|
+
* @param sdkName The name of the SDK being used to make requests on behalf of the app
|
|
137
|
+
* @param sdkVersion The version of the SDK being used to make requests on behalf of the app
|
|
138
|
+
* @param capabilities The capabilities of the bridge / SDK / platform broker
|
|
139
|
+
*/
|
|
140
|
+
constructor(sdkName, sdkVersion, capabilities) {
|
|
141
|
+
this.sdkName = sdkName;
|
|
142
|
+
this.sdkVersion = sdkVersion;
|
|
143
|
+
this.capabilities = capabilities;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Factory method for creating an implementation of IBridgeProxy
|
|
147
|
+
* @returns A promise that resolves to a BridgeProxy implementation
|
|
148
|
+
*/
|
|
149
|
+
static async create() {
|
|
150
|
+
const response = await BridgeProxy.initializeNestedAppAuthBridge();
|
|
151
|
+
return new BridgeProxy(response.sdkName, response.sdkVersion, response.capabilities);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
154
155
|
BridgeProxy.bridgeRequests = [];
|
|
155
156
|
|
|
156
157
|
export { BridgeProxy, BridgeProxy as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeProxy.mjs","sources":["../../src/naa/BridgeProxy.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"BridgeProxy.mjs","sources":["../../src/naa/BridgeProxy.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAwBH;;;;AAIG;MACU,WAAW,CAAA;AAQpB;;;;;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,EAA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vB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,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,YAAY,CACxB,CAAC;KACL;;AAvMD;AACO,WAAc,CAAA,cAAA,GAAU,EAAE;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type BridgeRequest<TResponse> = {
|
|
2
|
-
requestId: string;
|
|
3
|
-
method: string;
|
|
4
|
-
resolve: (value: TResponse | PromiseLike<TResponse>) => void;
|
|
5
|
-
reject: (reason?: any) => void;
|
|
6
|
-
};
|
|
1
|
+
export type BridgeRequest<TResponse> = {
|
|
2
|
+
requestId: string;
|
|
3
|
+
method: string;
|
|
4
|
+
resolve: (value: TResponse | PromiseLike<TResponse>) => void;
|
|
5
|
+
reject: (reason?: any) => void;
|
|
6
|
+
};
|
|
7
7
|
//# sourceMappingURL=BridgeRequest.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { TokenRequest } from "./TokenRequest";
|
|
2
|
-
import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
|
|
3
|
-
export type BridgeMethods = "GetToken" | "GetActiveAccount" | "GetAllAccounts" | "GetAccountByHomeId" | "GetAccountByLocalId" | "GetAccountByUsername" | "GetInitContext" | "GetTokenPopup";
|
|
4
|
-
export type BridgeRequestEnvelope = {
|
|
5
|
-
messageType: "NestedAppAuthRequest";
|
|
6
|
-
method: BridgeMethods;
|
|
7
|
-
sendTime?: number;
|
|
8
|
-
clientLibrary?: string;
|
|
9
|
-
clientLibraryVersion?: string;
|
|
10
|
-
requestId: string;
|
|
11
|
-
body?: TokenRequest | AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest;
|
|
12
|
-
};
|
|
13
|
-
export declare function isBridgeRequestEnvelope(obj: unknown): obj is BridgeRequestEnvelope;
|
|
1
|
+
import { TokenRequest } from "./TokenRequest";
|
|
2
|
+
import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
|
|
3
|
+
export type BridgeMethods = "GetToken" | "GetActiveAccount" | "GetAllAccounts" | "GetAccountByHomeId" | "GetAccountByLocalId" | "GetAccountByUsername" | "GetInitContext" | "GetTokenPopup";
|
|
4
|
+
export type BridgeRequestEnvelope = {
|
|
5
|
+
messageType: "NestedAppAuthRequest";
|
|
6
|
+
method: BridgeMethods;
|
|
7
|
+
sendTime?: number;
|
|
8
|
+
clientLibrary?: string;
|
|
9
|
+
clientLibraryVersion?: string;
|
|
10
|
+
requestId: string;
|
|
11
|
+
body?: TokenRequest | AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest;
|
|
12
|
+
};
|
|
13
|
+
export declare function isBridgeRequestEnvelope(obj: unknown): obj is BridgeRequestEnvelope;
|
|
14
14
|
//# sourceMappingURL=BridgeRequestEnvelope.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BridgeError } from "./BridgeError";
|
|
2
|
-
import { TokenResponse } from "./TokenResponse";
|
|
3
|
-
import { AccountInfo } from "./AccountInfo";
|
|
4
|
-
import { InitializeBridgeResponse } from "./InitializeBridgeResponse";
|
|
5
|
-
export type BridgeResponseEnvelope = {
|
|
6
|
-
messageType: "NestedAppAuthResponse";
|
|
7
|
-
requestId: string;
|
|
8
|
-
success: boolean;
|
|
9
|
-
body: TokenResponse | BridgeError | AccountInfo | AccountInfo[] | InitializeBridgeResponse;
|
|
10
|
-
};
|
|
1
|
+
import { BridgeError } from "./BridgeError";
|
|
2
|
+
import { TokenResponse } from "./TokenResponse";
|
|
3
|
+
import { AccountInfo } from "./AccountInfo";
|
|
4
|
+
import { InitializeBridgeResponse } from "./InitializeBridgeResponse";
|
|
5
|
+
export type BridgeResponseEnvelope = {
|
|
6
|
+
messageType: "NestedAppAuthResponse";
|
|
7
|
+
requestId: string;
|
|
8
|
+
success: boolean;
|
|
9
|
+
body: TokenResponse | BridgeError | AccountInfo | AccountInfo[] | InitializeBridgeResponse;
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=BridgeResponseEnvelope.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare enum BridgeStatusCode {
|
|
2
|
-
USER_INTERACTION_REQUIRED = "USER_INTERACTION_REQUIRED",
|
|
3
|
-
USER_CANCEL = "USER_CANCEL",
|
|
4
|
-
NO_NETWORK = "NO_NETWORK",
|
|
5
|
-
TRANSIENT_ERROR = "TRANSIENT_ERROR",
|
|
6
|
-
PERSISTENT_ERROR = "PERSISTENT_ERROR",
|
|
7
|
-
DISABLED = "DISABLED",
|
|
8
|
-
ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE",
|
|
9
|
-
NESTED_APP_AUTH_UNAVAILABLE = "NESTED_APP_AUTH_UNAVAILABLE"
|
|
10
|
-
}
|
|
1
|
+
export declare enum BridgeStatusCode {
|
|
2
|
+
USER_INTERACTION_REQUIRED = "USER_INTERACTION_REQUIRED",
|
|
3
|
+
USER_CANCEL = "USER_CANCEL",
|
|
4
|
+
NO_NETWORK = "NO_NETWORK",
|
|
5
|
+
TRANSIENT_ERROR = "TRANSIENT_ERROR",
|
|
6
|
+
PERSISTENT_ERROR = "PERSISTENT_ERROR",
|
|
7
|
+
DISABLED = "DISABLED",
|
|
8
|
+
ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE",
|
|
9
|
+
NESTED_APP_AUTH_UNAVAILABLE = "NESTED_APP_AUTH_UNAVAILABLE"
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=BridgeStatusCode.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.6.0 2023-12-01 */
|
|
2
2
|
'use strict';
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/
|
|
7
|
-
var BridgeStatusCode;
|
|
8
|
-
(function (BridgeStatusCode) {
|
|
9
|
-
BridgeStatusCode["USER_INTERACTION_REQUIRED"] = "USER_INTERACTION_REQUIRED";
|
|
10
|
-
BridgeStatusCode["USER_CANCEL"] = "USER_CANCEL";
|
|
11
|
-
BridgeStatusCode["NO_NETWORK"] = "NO_NETWORK";
|
|
12
|
-
BridgeStatusCode["TRANSIENT_ERROR"] = "TRANSIENT_ERROR";
|
|
13
|
-
BridgeStatusCode["PERSISTENT_ERROR"] = "PERSISTENT_ERROR";
|
|
14
|
-
BridgeStatusCode["DISABLED"] = "DISABLED";
|
|
15
|
-
BridgeStatusCode["ACCOUNT_UNAVAILABLE"] = "ACCOUNT_UNAVAILABLE";
|
|
16
|
-
BridgeStatusCode["NESTED_APP_AUTH_UNAVAILABLE"] = "NESTED_APP_AUTH_UNAVAILABLE";
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
* Licensed under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
var BridgeStatusCode;
|
|
8
|
+
(function (BridgeStatusCode) {
|
|
9
|
+
BridgeStatusCode["USER_INTERACTION_REQUIRED"] = "USER_INTERACTION_REQUIRED";
|
|
10
|
+
BridgeStatusCode["USER_CANCEL"] = "USER_CANCEL";
|
|
11
|
+
BridgeStatusCode["NO_NETWORK"] = "NO_NETWORK";
|
|
12
|
+
BridgeStatusCode["TRANSIENT_ERROR"] = "TRANSIENT_ERROR";
|
|
13
|
+
BridgeStatusCode["PERSISTENT_ERROR"] = "PERSISTENT_ERROR";
|
|
14
|
+
BridgeStatusCode["DISABLED"] = "DISABLED";
|
|
15
|
+
BridgeStatusCode["ACCOUNT_UNAVAILABLE"] = "ACCOUNT_UNAVAILABLE";
|
|
16
|
+
BridgeStatusCode["NESTED_APP_AUTH_UNAVAILABLE"] = "NESTED_APP_AUTH_UNAVAILABLE";
|
|
17
17
|
})(BridgeStatusCode || (BridgeStatusCode = {}));
|
|
18
18
|
|
|
19
19
|
export { BridgeStatusCode };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeStatusCode.mjs","sources":["../../src/naa/BridgeStatusCode.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"BridgeStatusCode.mjs","sources":["../../src/naa/BridgeStatusCode.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;IAES,iBASX;AATD,CAAA,UAAY,gBAAgB,EAAA;AACxB,IAAA,gBAAA,CAAA,2BAAA,CAAA,GAAA,2BAAuD,CAAA;AACvD,IAAA,gBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,gBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,gBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC,CAAA;AACnC,IAAA,gBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC,CAAA;AACrC,IAAA,gBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,gBAAA,CAAA,qBAAA,CAAA,GAAA,qBAA2C,CAAA;AAC3C,IAAA,gBAAA,CAAA,6BAAA,CAAA,GAAA,6BAA2D,CAAA;AAC/D,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,GAS3B,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AccountInfo } from "./AccountInfo";
|
|
2
|
-
import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
|
|
3
|
-
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
4
|
-
import { TokenRequest } from "./TokenRequest";
|
|
5
|
-
import { TokenResponse } from "./TokenResponse";
|
|
6
|
-
export interface IBridgeProxy {
|
|
7
|
-
getTokenInteractive(request: TokenRequest): Promise<TokenResponse>;
|
|
8
|
-
getTokenSilent(request: TokenRequest): Promise<TokenResponse>;
|
|
9
|
-
getAccountInfo(request: AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest): Promise<AccountInfo>;
|
|
10
|
-
getActiveAccount(): Promise<AccountInfo>;
|
|
11
|
-
getHostCapabilities(): BridgeCapabilities | null;
|
|
12
|
-
}
|
|
1
|
+
import { AccountInfo } from "./AccountInfo";
|
|
2
|
+
import { AccountByHomeIdRequest, AccountByLocalIdRequest, AccountByUsernameRequest } from "./AccountRequests";
|
|
3
|
+
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
4
|
+
import { TokenRequest } from "./TokenRequest";
|
|
5
|
+
import { TokenResponse } from "./TokenResponse";
|
|
6
|
+
export interface IBridgeProxy {
|
|
7
|
+
getTokenInteractive(request: TokenRequest): Promise<TokenResponse>;
|
|
8
|
+
getTokenSilent(request: TokenRequest): Promise<TokenResponse>;
|
|
9
|
+
getAccountInfo(request: AccountByHomeIdRequest | AccountByLocalIdRequest | AccountByUsernameRequest): Promise<AccountInfo>;
|
|
10
|
+
getActiveAccount(): Promise<AccountInfo>;
|
|
11
|
+
getHostCapabilities(): BridgeCapabilities | null;
|
|
12
|
+
}
|
|
13
13
|
//# sourceMappingURL=IBridgeProxy.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
2
|
-
export interface InitializeBridgeResponse {
|
|
3
|
-
capabilities?: BridgeCapabilities;
|
|
4
|
-
sdkName: string;
|
|
5
|
-
sdkVersion: string;
|
|
6
|
-
}
|
|
1
|
+
import { BridgeCapabilities } from "./BridgeCapabilities";
|
|
2
|
+
export interface InitializeBridgeResponse {
|
|
3
|
+
capabilities?: BridgeCapabilities;
|
|
4
|
+
sdkName: string;
|
|
5
|
+
sdkVersion: string;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=InitializeBridgeResponse.d.ts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export type TokenRequest = {
|
|
2
|
-
userObjectId?: string;
|
|
3
|
-
clientId: string;
|
|
4
|
-
authority?: string;
|
|
5
|
-
scope: string;
|
|
6
|
-
correlationId: string;
|
|
7
|
-
nonce?: string;
|
|
8
|
-
claims?: string;
|
|
9
|
-
state?: string;
|
|
10
|
-
reqCnf?: string;
|
|
11
|
-
keyId?: string;
|
|
12
|
-
authenticationScheme?: string;
|
|
13
|
-
shrClaims?: string;
|
|
14
|
-
shrNonce?: string;
|
|
15
|
-
resourceRequestMethod?: string;
|
|
16
|
-
resourceRequestUri?: string;
|
|
17
|
-
extendedExpiryToken?: boolean;
|
|
18
|
-
extraParameters?: Map<string, string>;
|
|
19
|
-
};
|
|
1
|
+
export type TokenRequest = {
|
|
2
|
+
userObjectId?: string;
|
|
3
|
+
clientId: string;
|
|
4
|
+
authority?: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
correlationId: string;
|
|
7
|
+
nonce?: string;
|
|
8
|
+
claims?: string;
|
|
9
|
+
state?: string;
|
|
10
|
+
reqCnf?: string;
|
|
11
|
+
keyId?: string;
|
|
12
|
+
authenticationScheme?: string;
|
|
13
|
+
shrClaims?: string;
|
|
14
|
+
shrNonce?: string;
|
|
15
|
+
resourceRequestMethod?: string;
|
|
16
|
+
resourceRequestUri?: string;
|
|
17
|
+
extendedExpiryToken?: boolean;
|
|
18
|
+
extraParameters?: Map<string, string>;
|
|
19
|
+
};
|
|
20
20
|
//# sourceMappingURL=TokenRequest.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { AccountInfo } from "./AccountInfo";
|
|
2
|
-
export type TokenResponse = {
|
|
3
|
-
access_token: string;
|
|
4
|
-
account: AccountInfo;
|
|
5
|
-
expires_in: number;
|
|
6
|
-
id_token: string;
|
|
7
|
-
properties: TokenResponseProperties | null;
|
|
8
|
-
scope: string;
|
|
9
|
-
shr?: string;
|
|
10
|
-
extendedLifetimeToken?: boolean;
|
|
11
|
-
authority?: string;
|
|
12
|
-
};
|
|
13
|
-
export type TokenResponseProperties = {
|
|
14
|
-
MATS?: string;
|
|
15
|
-
};
|
|
1
|
+
import { AccountInfo } from "./AccountInfo";
|
|
2
|
+
export type TokenResponse = {
|
|
3
|
+
access_token: string;
|
|
4
|
+
account: AccountInfo;
|
|
5
|
+
expires_in: number;
|
|
6
|
+
id_token: string;
|
|
7
|
+
properties: TokenResponseProperties | null;
|
|
8
|
+
scope: string;
|
|
9
|
+
shr?: string;
|
|
10
|
+
extendedLifetimeToken?: boolean;
|
|
11
|
+
authority?: string;
|
|
12
|
+
};
|
|
13
|
+
export type TokenResponseProperties = {
|
|
14
|
+
MATS?: string;
|
|
15
|
+
};
|
|
16
16
|
//# sourceMappingURL=TokenResponse.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { TokenRequest } from "../TokenRequest";
|
|
2
|
-
import { AccountInfo as NaaAccountInfo } from "../AccountInfo";
|
|
3
|
-
import { RedirectRequest } from "../../request/RedirectRequest";
|
|
4
|
-
import { PopupRequest } from "../../request/PopupRequest";
|
|
5
|
-
import { TokenResponse } from "../TokenResponse";
|
|
6
|
-
import { AccountInfo as MsalAccountInfo, AuthError, ClientAuthError, ClientConfigurationError, InteractionRequiredAuthError, ServerError, ICrypto, Logger, TokenClaims } from "@azure/msal-common";
|
|
7
|
-
import { AuthenticationResult } from "../../response/AuthenticationResult";
|
|
8
|
-
export declare class NestedAppAuthAdapter {
|
|
9
|
-
protected crypto: ICrypto;
|
|
10
|
-
protected logger: Logger;
|
|
11
|
-
protected clientId: string;
|
|
12
|
-
protected clientCapabilities: string[];
|
|
13
|
-
constructor(clientId: string, clientCapabilities: string[], crypto: ICrypto, logger: Logger);
|
|
14
|
-
toNaaTokenRequest(request: PopupRequest | RedirectRequest): TokenRequest;
|
|
15
|
-
fromNaaTokenResponse(request: TokenRequest, response: TokenResponse, reqTimestamp: number): AuthenticationResult;
|
|
16
|
-
fromNaaAccountInfo(fromAccount: NaaAccountInfo, idTokenClaims?: TokenClaims): MsalAccountInfo;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param error BridgeError
|
|
20
|
-
* @returns AuthError, ClientAuthError, ClientConfigurationError, ServerError, InteractionRequiredError
|
|
21
|
-
*/
|
|
22
|
-
fromBridgeError(error: unknown): AuthError | ClientAuthError | ClientConfigurationError | ServerError | InteractionRequiredAuthError;
|
|
23
|
-
}
|
|
1
|
+
import { TokenRequest } from "../TokenRequest";
|
|
2
|
+
import { AccountInfo as NaaAccountInfo } from "../AccountInfo";
|
|
3
|
+
import { RedirectRequest } from "../../request/RedirectRequest";
|
|
4
|
+
import { PopupRequest } from "../../request/PopupRequest";
|
|
5
|
+
import { TokenResponse } from "../TokenResponse";
|
|
6
|
+
import { AccountInfo as MsalAccountInfo, AuthError, ClientAuthError, ClientConfigurationError, InteractionRequiredAuthError, ServerError, ICrypto, Logger, TokenClaims } from "@azure/msal-common";
|
|
7
|
+
import { AuthenticationResult } from "../../response/AuthenticationResult";
|
|
8
|
+
export declare class NestedAppAuthAdapter {
|
|
9
|
+
protected crypto: ICrypto;
|
|
10
|
+
protected logger: Logger;
|
|
11
|
+
protected clientId: string;
|
|
12
|
+
protected clientCapabilities: string[];
|
|
13
|
+
constructor(clientId: string, clientCapabilities: string[], crypto: ICrypto, logger: Logger);
|
|
14
|
+
toNaaTokenRequest(request: PopupRequest | RedirectRequest): TokenRequest;
|
|
15
|
+
fromNaaTokenResponse(request: TokenRequest, response: TokenResponse, reqTimestamp: number): AuthenticationResult;
|
|
16
|
+
fromNaaAccountInfo(fromAccount: NaaAccountInfo, idTokenClaims?: TokenClaims): MsalAccountInfo;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param error BridgeError
|
|
20
|
+
* @returns AuthError, ClientAuthError, ClientConfigurationError, ServerError, InteractionRequiredError
|
|
21
|
+
*/
|
|
22
|
+
fromBridgeError(error: unknown): AuthError | ClientAuthError | ClientConfigurationError | ServerError | InteractionRequiredAuthError;
|
|
23
|
+
}
|
|
24
24
|
//# sourceMappingURL=NestedAppAuthAdapter.d.ts.map
|