@azure/msal-browser 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.mjs +20 -19
- package/dist/app/IPublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientApplication.d.ts +14 -6
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.mjs +17 -7
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +3 -4
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +13 -13
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.d.ts +8 -0
- package/dist/broker/nativeBroker/NativeStatusCodes.d.ts.map +1 -0
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +16 -0
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs.map +1 -0
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +3 -3
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +8 -7
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/BrowserStorage.d.ts.map +1 -1
- package/dist/cache/BrowserStorage.mjs +7 -9
- package/dist/cache/BrowserStorage.mjs.map +1 -1
- package/dist/cache/CryptoKeyStore.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +7 -7
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/IController.d.ts +3 -2
- package/dist/controllers/IController.d.ts.map +1 -1
- package/dist/controllers/StandardController.d.ts +11 -6
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +53 -34
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.d.ts +44 -49
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +76 -76
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.d.ts +1 -7
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.mjs +11 -19
- package/dist/crypto/CryptoOps.mjs.map +1 -1
- package/dist/crypto/PkceGenerator.d.ts +6 -21
- package/dist/crypto/PkceGenerator.d.ts.map +1 -1
- package/dist/crypto/PkceGenerator.mjs +45 -46
- package/dist/crypto/PkceGenerator.mjs.map +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.d.ts.map +1 -1
- package/dist/encode/Base64Decode.mjs +18 -2
- package/dist/encode/Base64Decode.mjs.map +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.d.ts +10 -1
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.mjs +12 -3
- package/dist/error/BrowserAuthError.mjs.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +3 -2
- package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.d.ts +9 -46
- package/dist/error/BrowserConfigurationAuthError.d.ts.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +20 -73
- package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts +4 -0
- package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts.map +1 -0
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +12 -0
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs.map +1 -0
- package/dist/error/NativeAuthError.d.ts +17 -45
- package/dist/error/NativeAuthError.d.ts.map +1 -1
- package/dist/error/NativeAuthError.mjs +47 -78
- package/dist/error/NativeAuthError.mjs.map +1 -1
- package/dist/error/NativeAuthErrorCodes.d.ts +3 -0
- package/dist/error/NativeAuthErrorCodes.d.ts.map +1 -0
- package/dist/error/NativeAuthErrorCodes.mjs +11 -0
- package/dist/error/NativeAuthErrorCodes.mjs.map +1 -0
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.mjs +3 -2
- package/dist/event/EventHandler.mjs.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +7 -8
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +12 -10
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +5 -8
- package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +10 -18
- package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +2 -2
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +8 -18
- package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +12 -33
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +6 -9
- package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +3 -3
- package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +3 -4
- package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/TeamsAppOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +3 -3
- package/dist/utils/BrowserProtocolUtils.mjs.map +1 -1
- package/dist/utils/BrowserStringUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +1413 -1727
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +1413 -1727
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +68 -65
- package/package.json +2 -2
- package/src/app/IPublicClientApplication.ts +55 -18
- package/src/app/PublicClientApplication.ts +18 -6
- package/src/broker/nativeBroker/NativeMessageHandler.ts +12 -15
- package/src/broker/nativeBroker/NativeStatusCodes.ts +13 -0
- package/src/cache/BrowserCacheManager.ts +21 -6
- package/src/cache/BrowserStorage.ts +9 -11
- package/src/config/Configuration.ts +16 -8
- package/src/controllers/IController.ts +4 -1
- package/src/controllers/StandardController.ts +155 -92
- package/src/crypto/BrowserCrypto.ts +118 -102
- package/src/crypto/CryptoOps.ts +10 -22
- package/src/crypto/PkceGenerator.ts +93 -54
- package/src/encode/Base64Decode.ts +21 -1
- package/src/error/BrowserAuthError.ts +13 -1
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/error/BrowserConfigurationAuthError.ts +33 -102
- package/src/error/BrowserConfigurationAuthErrorCodes.ts +9 -0
- package/src/error/NativeAuthError.ts +73 -101
- package/src/error/NativeAuthErrorCodes.ts +7 -0
- package/src/event/EventHandler.ts +2 -1
- package/src/index.ts +5 -0
- package/src/interaction_client/BaseInteractionClient.ts +13 -7
- package/src/interaction_client/NativeInteractionClient.ts +29 -11
- package/src/interaction_client/SilentAuthCodeClient.ts +18 -16
- package/src/interaction_client/SilentCacheClient.ts +22 -30
- package/src/interaction_client/SilentIframeClient.ts +1 -1
- package/src/interaction_client/SilentRefreshClient.ts +26 -28
- package/src/interaction_client/StandardInteractionClient.ts +36 -67
- package/src/interaction_handler/InteractionHandler.ts +20 -15
- package/src/interaction_handler/RedirectHandler.ts +6 -2
- package/src/interaction_handler/SilentHandler.ts +6 -3
- package/src/packageMetadata.ts +1 -1
- package/src/utils/BrowserProtocolUtils.ts +3 -2
- package/dist/crypto/ISubtleCrypto.d.ts +0 -10
- package/dist/crypto/ISubtleCrypto.d.ts.map +0 -1
- package/dist/crypto/ModernBrowserCrypto.d.ts +0 -10
- package/dist/crypto/ModernBrowserCrypto.d.ts.map +0 -1
- package/dist/crypto/ModernBrowserCrypto.mjs +0 -31
- package/dist/crypto/ModernBrowserCrypto.mjs.map +0 -1
- package/src/crypto/ISubtleCrypto.ts +0 -30
- package/src/crypto/ModernBrowserCrypto.ts +0 -69
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
AuthError,
|
|
12
12
|
AzureCloudOptions,
|
|
13
13
|
PerformanceEvents,
|
|
14
|
+
invokeAsync,
|
|
14
15
|
} from "@azure/msal-common";
|
|
15
16
|
import { ApiId } from "../utils/BrowserConstants";
|
|
16
17
|
import {
|
|
@@ -32,18 +33,17 @@ export class SilentRefreshClient extends StandardInteractionClient {
|
|
|
32
33
|
request.correlationId
|
|
33
34
|
);
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
const baseRequest = await invokeAsync(
|
|
37
|
+
this.initializeBaseRequest.bind(this),
|
|
36
38
|
PerformanceEvents.InitializeBaseRequest,
|
|
39
|
+
this.logger,
|
|
40
|
+
this.performanceClient,
|
|
37
41
|
request.correlationId
|
|
38
|
-
);
|
|
42
|
+
)(request, request.account);
|
|
39
43
|
const silentRequest: CommonSilentFlowRequest = {
|
|
40
44
|
...request,
|
|
41
|
-
...
|
|
45
|
+
...baseRequest,
|
|
42
46
|
};
|
|
43
|
-
const acquireTokenMeasurement = this.performanceClient.startMeasurement(
|
|
44
|
-
PerformanceEvents.SilentRefreshClientAcquireToken,
|
|
45
|
-
silentRequest.correlationId
|
|
46
|
-
);
|
|
47
47
|
const serverTelemetryManager = this.initializeServerTelemetryManager(
|
|
48
48
|
ApiId.acquireTokenSilent_silentFlow
|
|
49
49
|
);
|
|
@@ -55,30 +55,30 @@ export class SilentRefreshClient extends StandardInteractionClient {
|
|
|
55
55
|
);
|
|
56
56
|
this.logger.verbose("Refresh token client created");
|
|
57
57
|
// Send request to renew token. Auth module will throw errors if token cannot be renewed.
|
|
58
|
-
|
|
58
|
+
return invokeAsync(
|
|
59
|
+
refreshTokenClient.acquireTokenByRefreshToken.bind(
|
|
60
|
+
refreshTokenClient
|
|
61
|
+
),
|
|
59
62
|
PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken,
|
|
63
|
+
this.logger,
|
|
64
|
+
this.performanceClient,
|
|
60
65
|
request.correlationId
|
|
61
|
-
)
|
|
62
|
-
return refreshTokenClient
|
|
63
|
-
.acquireTokenByRefreshToken(silentRequest)
|
|
66
|
+
)(silentRequest)
|
|
64
67
|
.then((result) => result as AuthenticationResult)
|
|
65
68
|
.then((result: AuthenticationResult) => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
this.performanceClient.addFields(
|
|
70
|
+
{
|
|
71
|
+
fromCache: result.fromCache,
|
|
72
|
+
requestId: result.requestId,
|
|
73
|
+
},
|
|
74
|
+
request.correlationId
|
|
75
|
+
);
|
|
71
76
|
|
|
72
77
|
return result;
|
|
73
78
|
})
|
|
74
79
|
.catch((e: AuthError) => {
|
|
75
80
|
(e as AuthError).setCorrelationId(this.correlationId);
|
|
76
81
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
77
|
-
acquireTokenMeasurement.end({
|
|
78
|
-
errorCode: e.errorCode,
|
|
79
|
-
subErrorCode: e.subError,
|
|
80
|
-
success: false,
|
|
81
|
-
});
|
|
82
82
|
throw e;
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -106,15 +106,13 @@ export class SilentRefreshClient extends StandardInteractionClient {
|
|
|
106
106
|
azureCloudOptions?: AzureCloudOptions
|
|
107
107
|
): Promise<RefreshTokenClient> {
|
|
108
108
|
// Create auth module.
|
|
109
|
-
|
|
109
|
+
const clientConfig = await invokeAsync(
|
|
110
|
+
this.getClientConfiguration.bind(this),
|
|
110
111
|
PerformanceEvents.StandardInteractionClientGetClientConfiguration,
|
|
112
|
+
this.logger,
|
|
113
|
+
this.performanceClient,
|
|
111
114
|
this.correlationId
|
|
112
|
-
);
|
|
113
|
-
const clientConfig = await this.getClientConfiguration(
|
|
114
|
-
serverTelemetryManager,
|
|
115
|
-
authorityUrl,
|
|
116
|
-
azureCloudOptions
|
|
117
|
-
);
|
|
115
|
+
)(serverTelemetryManager, authorityUrl, azureCloudOptions);
|
|
118
116
|
return new RefreshTokenClient(clientConfig, this.performanceClient);
|
|
119
117
|
}
|
|
120
118
|
}
|
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
AccountInfo,
|
|
22
22
|
AzureCloudOptions,
|
|
23
23
|
PerformanceEvents,
|
|
24
|
-
|
|
24
|
+
invokeAsync,
|
|
25
|
+
BaseAuthRequest,
|
|
25
26
|
} from "@azure/msal-common";
|
|
26
27
|
import { BaseInteractionClient } from "./BaseInteractionClient";
|
|
27
28
|
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
|
|
@@ -40,6 +41,8 @@ import { BrowserUtils } from "../utils/BrowserUtils";
|
|
|
40
41
|
import { RedirectRequest } from "../request/RedirectRequest";
|
|
41
42
|
import { PopupRequest } from "../request/PopupRequest";
|
|
42
43
|
import { SsoSilentRequest } from "../request/SsoSilentRequest";
|
|
44
|
+
import { generatePkceCodes } from "../crypto/PkceGenerator";
|
|
45
|
+
import { createNewGuid } from "../crypto/BrowserCrypto";
|
|
43
46
|
|
|
44
47
|
/**
|
|
45
48
|
* Defines the class structure and helper functions used by the "standard", non-brokered auth flows (popup, redirect, silent (RT), silent (iframe))
|
|
@@ -56,12 +59,13 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
56
59
|
PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest,
|
|
57
60
|
request.correlationId
|
|
58
61
|
);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const generatedPkceParams = await invokeAsync(
|
|
63
|
+
generatePkceCodes,
|
|
64
|
+
PerformanceEvents.GeneratePkceCodes,
|
|
65
|
+
this.logger,
|
|
66
|
+
this.performanceClient,
|
|
67
|
+
this.correlationId
|
|
68
|
+
)(this.performanceClient, this.logger, this.correlationId);
|
|
65
69
|
|
|
66
70
|
const authCodeRequest: CommonAuthorizationCodeRequest = {
|
|
67
71
|
...request,
|
|
@@ -89,8 +93,7 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
89
93
|
);
|
|
90
94
|
|
|
91
95
|
const validLogoutRequest: CommonEndSessionRequest = {
|
|
92
|
-
correlationId:
|
|
93
|
-
this.correlationId || this.browserCrypto.createNewGuid(),
|
|
96
|
+
correlationId: this.correlationId || createNewGuid(),
|
|
94
97
|
...logoutRequest,
|
|
95
98
|
};
|
|
96
99
|
|
|
@@ -219,15 +222,13 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
219
222
|
this.correlationId
|
|
220
223
|
);
|
|
221
224
|
// Create auth module.
|
|
222
|
-
|
|
225
|
+
const clientConfig = await invokeAsync(
|
|
226
|
+
this.getClientConfiguration.bind(this),
|
|
223
227
|
PerformanceEvents.StandardInteractionClientGetClientConfiguration,
|
|
228
|
+
this.logger,
|
|
229
|
+
this.performanceClient,
|
|
224
230
|
this.correlationId
|
|
225
|
-
);
|
|
226
|
-
const clientConfig = await this.getClientConfiguration(
|
|
227
|
-
serverTelemetryManager,
|
|
228
|
-
authorityUrl,
|
|
229
|
-
requestAzureCloudOptions
|
|
230
|
-
);
|
|
231
|
+
)(serverTelemetryManager, authorityUrl, requestAzureCloudOptions);
|
|
231
232
|
return new AuthorizationCodeClient(
|
|
232
233
|
clientConfig,
|
|
233
234
|
this.performanceClient
|
|
@@ -249,18 +250,13 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
249
250
|
PerformanceEvents.StandardInteractionClientGetClientConfiguration,
|
|
250
251
|
this.correlationId
|
|
251
252
|
);
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
this.correlationId
|
|
255
|
-
);
|
|
256
|
-
this.performanceClient.setPreQueueTime(
|
|
253
|
+
const discoveredAuthority = await invokeAsync(
|
|
254
|
+
this.getDiscoveredAuthority.bind(this),
|
|
257
255
|
PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,
|
|
256
|
+
this.logger,
|
|
257
|
+
this.performanceClient,
|
|
258
258
|
this.correlationId
|
|
259
|
-
);
|
|
260
|
-
const discoveredAuthority = await this.getDiscoveredAuthority(
|
|
261
|
-
requestAuthority,
|
|
262
|
-
requestAzureCloudOptions
|
|
263
|
-
);
|
|
259
|
+
)(requestAuthority, requestAzureCloudOptions);
|
|
264
260
|
const logger = this.config.system.loggerOptions;
|
|
265
261
|
|
|
266
262
|
return {
|
|
@@ -349,15 +345,6 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
349
345
|
PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,
|
|
350
346
|
this.correlationId
|
|
351
347
|
);
|
|
352
|
-
this.logger.verbose(
|
|
353
|
-
"getDiscoveredAuthority called",
|
|
354
|
-
this.correlationId
|
|
355
|
-
);
|
|
356
|
-
const getAuthorityMeasurement =
|
|
357
|
-
this.performanceClient?.startMeasurement(
|
|
358
|
-
PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,
|
|
359
|
-
this.correlationId
|
|
360
|
-
);
|
|
361
348
|
const authorityOptions: AuthorityOptions = {
|
|
362
349
|
protocolMode: this.config.auth.protocolMode,
|
|
363
350
|
OIDCOptions: this.config.auth.OIDCOptions,
|
|
@@ -378,15 +365,13 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
378
365
|
userAuthority,
|
|
379
366
|
requestAzureCloudOptions || this.config.auth.azureCloudOptions
|
|
380
367
|
);
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
this.correlationId
|
|
384
|
-
);
|
|
385
|
-
this.performanceClient.setPreQueueTime(
|
|
368
|
+
return await invokeAsync(
|
|
369
|
+
AuthorityFactory.createDiscoveredInstance.bind(AuthorityFactory),
|
|
386
370
|
PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance,
|
|
371
|
+
this.logger,
|
|
372
|
+
this.performanceClient,
|
|
387
373
|
this.correlationId
|
|
388
|
-
)
|
|
389
|
-
return await AuthorityFactory.createDiscoveredInstance(
|
|
374
|
+
)(
|
|
390
375
|
builtAuthority,
|
|
391
376
|
this.config.system.networkClient,
|
|
392
377
|
this.browserStorage,
|
|
@@ -394,23 +379,7 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
394
379
|
this.logger,
|
|
395
380
|
this.performanceClient,
|
|
396
381
|
this.correlationId
|
|
397
|
-
)
|
|
398
|
-
.then((result: Authority) => {
|
|
399
|
-
getAuthorityMeasurement.end({
|
|
400
|
-
success: true,
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
return result;
|
|
404
|
-
})
|
|
405
|
-
.catch((error: AuthError) => {
|
|
406
|
-
getAuthorityMeasurement.end({
|
|
407
|
-
errorCode: error.errorCode,
|
|
408
|
-
subErrorCode: error.subError,
|
|
409
|
-
success: false,
|
|
410
|
-
});
|
|
411
|
-
|
|
412
|
-
throw error;
|
|
413
|
-
});
|
|
382
|
+
);
|
|
414
383
|
}
|
|
415
384
|
|
|
416
385
|
/**
|
|
@@ -426,10 +395,7 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
426
395
|
PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,
|
|
427
396
|
this.correlationId
|
|
428
397
|
);
|
|
429
|
-
|
|
430
|
-
"initializeAuthorizationRequest called",
|
|
431
|
-
this.correlationId
|
|
432
|
-
);
|
|
398
|
+
|
|
433
399
|
const redirectUri = this.getRedirectUri(request.redirectUri);
|
|
434
400
|
const browserState: BrowserStateObject = {
|
|
435
401
|
interactionType: interactionType,
|
|
@@ -440,16 +406,19 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
|
|
|
440
406
|
browserState
|
|
441
407
|
);
|
|
442
408
|
|
|
443
|
-
|
|
409
|
+
const baseRequest: BaseAuthRequest = await invokeAsync(
|
|
410
|
+
this.initializeBaseRequest.bind(this),
|
|
444
411
|
PerformanceEvents.InitializeBaseRequest,
|
|
412
|
+
this.logger,
|
|
413
|
+
this.performanceClient,
|
|
445
414
|
this.correlationId
|
|
446
|
-
);
|
|
415
|
+
)(request);
|
|
447
416
|
|
|
448
417
|
const validatedRequest: AuthorizationUrlRequest = {
|
|
449
|
-
...
|
|
418
|
+
...baseRequest,
|
|
450
419
|
redirectUri: redirectUri,
|
|
451
420
|
state: state,
|
|
452
|
-
nonce: request.nonce ||
|
|
421
|
+
nonce: request.nonce || createNewGuid(),
|
|
453
422
|
responseMode: this.config.auth.OIDCOptions
|
|
454
423
|
.serverResponseType as ResponseMode,
|
|
455
424
|
};
|
|
@@ -10,13 +10,14 @@ import {
|
|
|
10
10
|
AuthorityFactory,
|
|
11
11
|
Authority,
|
|
12
12
|
INetworkModule,
|
|
13
|
-
ClientAuthError,
|
|
14
13
|
CcsCredential,
|
|
15
14
|
Logger,
|
|
16
15
|
ServerError,
|
|
17
16
|
IPerformanceClient,
|
|
18
17
|
PerformanceEvents,
|
|
19
18
|
invokeAsync,
|
|
19
|
+
createClientAuthError,
|
|
20
|
+
ClientAuthErrorCodes,
|
|
20
21
|
} from "@azure/msal-common";
|
|
21
22
|
|
|
22
23
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
@@ -67,7 +68,6 @@ export class InteractionHandler {
|
|
|
67
68
|
PerformanceEvents.HandleCodeResponseFromHash,
|
|
68
69
|
this.authCodeRequest.correlationId
|
|
69
70
|
);
|
|
70
|
-
this.logger.verbose("InteractionHandler.handleCodeResponse called");
|
|
71
71
|
// Check that location hash isn't empty.
|
|
72
72
|
if (!locationHash) {
|
|
73
73
|
throw createBrowserAuthError(BrowserAuthErrorCodes.hashEmptyError);
|
|
@@ -77,7 +77,10 @@ export class InteractionHandler {
|
|
|
77
77
|
const stateKey = this.browserStorage.generateStateKey(state);
|
|
78
78
|
const requestState = this.browserStorage.getTemporaryCache(stateKey);
|
|
79
79
|
if (!requestState) {
|
|
80
|
-
throw
|
|
80
|
+
throw createClientAuthError(
|
|
81
|
+
ClientAuthErrorCodes.stateNotFound,
|
|
82
|
+
"Cached State"
|
|
83
|
+
);
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
let authCodeResponse;
|
|
@@ -100,16 +103,13 @@ export class InteractionHandler {
|
|
|
100
103
|
}
|
|
101
104
|
}
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
return invokeAsync(
|
|
107
|
+
this.handleCodeResponseFromServer.bind(this),
|
|
104
108
|
PerformanceEvents.HandleCodeResponseFromServer,
|
|
109
|
+
this.logger,
|
|
110
|
+
this.performanceClient,
|
|
105
111
|
this.authCodeRequest.correlationId
|
|
106
|
-
);
|
|
107
|
-
return this.handleCodeResponseFromServer(
|
|
108
|
-
authCodeResponse,
|
|
109
|
-
state,
|
|
110
|
-
authority,
|
|
111
|
-
networkModule
|
|
112
|
-
);
|
|
112
|
+
)(authCodeResponse, state, authority, networkModule);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/**
|
|
@@ -139,7 +139,10 @@ export class InteractionHandler {
|
|
|
139
139
|
const stateKey = this.browserStorage.generateStateKey(state);
|
|
140
140
|
const requestState = this.browserStorage.getTemporaryCache(stateKey);
|
|
141
141
|
if (!requestState) {
|
|
142
|
-
throw
|
|
142
|
+
throw createClientAuthError(
|
|
143
|
+
ClientAuthErrorCodes.stateNotFound,
|
|
144
|
+
"Cached State"
|
|
145
|
+
);
|
|
143
146
|
}
|
|
144
147
|
|
|
145
148
|
// Get cached items
|
|
@@ -151,11 +154,13 @@ export class InteractionHandler {
|
|
|
151
154
|
|
|
152
155
|
// Check for new cloud instance
|
|
153
156
|
if (authCodeResponse.cloud_instance_host_name) {
|
|
154
|
-
|
|
157
|
+
await invokeAsync(
|
|
158
|
+
this.updateTokenEndpointAuthority.bind(this),
|
|
155
159
|
PerformanceEvents.UpdateTokenEndpointAuthority,
|
|
160
|
+
this.logger,
|
|
161
|
+
this.performanceClient,
|
|
156
162
|
this.authCodeRequest.correlationId
|
|
157
|
-
)
|
|
158
|
-
await this.updateTokenEndpointAuthority(
|
|
163
|
+
)(
|
|
159
164
|
authCodeResponse.cloud_instance_host_name,
|
|
160
165
|
authority,
|
|
161
166
|
networkModule
|
|
@@ -9,10 +9,11 @@ import {
|
|
|
9
9
|
ICrypto,
|
|
10
10
|
Authority,
|
|
11
11
|
INetworkModule,
|
|
12
|
-
ClientAuthError,
|
|
13
12
|
Logger,
|
|
14
13
|
ServerError,
|
|
15
14
|
IPerformanceClient,
|
|
15
|
+
createClientAuthError,
|
|
16
|
+
ClientAuthErrorCodes,
|
|
16
17
|
} from "@azure/msal-common";
|
|
17
18
|
import {
|
|
18
19
|
createBrowserAuthError,
|
|
@@ -161,7 +162,10 @@ export class RedirectHandler extends InteractionHandler {
|
|
|
161
162
|
const stateKey = this.browserStorage.generateStateKey(state);
|
|
162
163
|
const requestState = this.browserStorage.getTemporaryCache(stateKey);
|
|
163
164
|
if (!requestState) {
|
|
164
|
-
throw
|
|
165
|
+
throw createClientAuthError(
|
|
166
|
+
ClientAuthErrorCodes.stateNotFound,
|
|
167
|
+
"Cached State"
|
|
168
|
+
);
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
let authCodeResponse;
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Logger,
|
|
12
12
|
IPerformanceClient,
|
|
13
13
|
PerformanceEvents,
|
|
14
|
+
invokeAsync,
|
|
14
15
|
} from "@azure/msal-common";
|
|
15
16
|
import { InteractionHandler } from "./InteractionHandler";
|
|
16
17
|
import {
|
|
@@ -71,11 +72,13 @@ export class SilentHandler extends InteractionHandler {
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
if (this.navigateFrameWait) {
|
|
74
|
-
|
|
75
|
+
return await invokeAsync(
|
|
76
|
+
this.loadFrame.bind(this),
|
|
75
77
|
PerformanceEvents.SilentHandlerLoadFrame,
|
|
78
|
+
this.logger,
|
|
79
|
+
this.performanceClient,
|
|
76
80
|
this.authCodeRequest.correlationId
|
|
77
|
-
);
|
|
78
|
-
return await this.loadFrame(requestUrl);
|
|
81
|
+
)(requestUrl);
|
|
79
82
|
}
|
|
80
83
|
return this.loadFrameSync(requestUrl);
|
|
81
84
|
}
|
package/src/packageMetadata.ts
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
import { InteractionType } from "./BrowserConstants";
|
|
7
7
|
import {
|
|
8
|
-
ClientAuthError,
|
|
9
8
|
ICrypto,
|
|
10
9
|
RequestStateObject,
|
|
11
10
|
ProtocolUtils,
|
|
12
11
|
ServerAuthorizationCodeResponse,
|
|
13
12
|
UrlString,
|
|
13
|
+
createClientAuthError,
|
|
14
|
+
ClientAuthErrorCodes,
|
|
14
15
|
} from "@azure/msal-common";
|
|
15
16
|
|
|
16
17
|
export type BrowserStateObject = {
|
|
@@ -36,7 +37,7 @@ export class BrowserProtocolUtils {
|
|
|
36
37
|
ProtocolUtils.parseRequestState(browserCrypto, state);
|
|
37
38
|
return requestStateObj.libraryState.meta as BrowserStateObject;
|
|
38
39
|
} catch (e) {
|
|
39
|
-
throw
|
|
40
|
+
throw createClientAuthError(ClientAuthErrorCodes.invalidState);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface ISubtleCrypto {
|
|
2
|
-
initPrng?(entropy: Uint8Array): void;
|
|
3
|
-
getRandomValues(dataBuffer: Uint8Array): Uint8Array;
|
|
4
|
-
generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
|
|
5
|
-
exportKey(key: CryptoKey): Promise<JsonWebKey>;
|
|
6
|
-
importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
7
|
-
sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer>;
|
|
8
|
-
digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=ISubtleCrypto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISubtleCrypto.d.ts","sourceRoot":"","sources":["../../src/crypto/ISubtleCrypto.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;IACpD,WAAW,CACP,SAAS,EAAE,qBAAqB,EAChC,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,QAAQ,EAAE,GACtB,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1B,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/C,SAAS,CACL,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,qBAAqB,EAChC,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,QAAQ,EAAE,GACtB,OAAO,CAAC,SAAS,CAAC,CAAC;IACtB,IAAI,CACA,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,WAAW,GAClB,OAAO,CAAC,WAAW,CAAC,CAAC;IACxB,MAAM,CACF,SAAS,EAAE,mBAAmB,EAC9B,IAAI,EAAE,UAAU,GACjB,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ISubtleCrypto } from "./ISubtleCrypto";
|
|
2
|
-
export declare class ModernBrowserCrypto implements ISubtleCrypto {
|
|
3
|
-
getRandomValues(dataBuffer: Uint8Array): Uint8Array;
|
|
4
|
-
generateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
|
|
5
|
-
exportKey(key: CryptoKey): Promise<JsonWebKey>;
|
|
6
|
-
importKey(keyData: JsonWebKey, algorithm: RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
7
|
-
sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer>;
|
|
8
|
-
digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise<ArrayBuffer>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=ModernBrowserCrypto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModernBrowserCrypto.d.ts","sourceRoot":"","sources":["../../src/crypto/ModernBrowserCrypto.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,mBAAoB,YAAW,aAAa;IACrD,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU;IAI7C,WAAW,CACb,SAAS,EAAE,qBAAqB,EAChC,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,QAAQ,EAAE,GACtB,OAAO,CAAC,aAAa,CAAC;IAQnB,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IAO9C,SAAS,CACX,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,qBAAqB,EAChC,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,QAAQ,EAAE,GACtB,OAAO,CAAC,SAAS,CAAC;IAUf,IAAI,CACN,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,WAAW,GAClB,OAAO,CAAC,WAAW,CAAC;IAQjB,MAAM,CACR,SAAS,EAAE,mBAAmB,EAC9B,IAAI,EAAE,UAAU,GACjB,OAAO,CAAC,WAAW,CAAC;CAM1B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.1.0 2023-09-05 */
|
|
2
|
-
'use strict';
|
|
3
|
-
import { KEY_FORMAT_JWK } from '../utils/BrowserConstants.mjs';
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
-
* Licensed under the MIT License.
|
|
8
|
-
*/
|
|
9
|
-
class ModernBrowserCrypto {
|
|
10
|
-
getRandomValues(dataBuffer) {
|
|
11
|
-
return window.crypto.getRandomValues(dataBuffer);
|
|
12
|
-
}
|
|
13
|
-
async generateKey(algorithm, extractable, keyUsages) {
|
|
14
|
-
return window.crypto.subtle.generateKey(algorithm, extractable, keyUsages);
|
|
15
|
-
}
|
|
16
|
-
async exportKey(key) {
|
|
17
|
-
return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
|
|
18
|
-
}
|
|
19
|
-
async importKey(keyData, algorithm, extractable, keyUsages) {
|
|
20
|
-
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, keyData, algorithm, extractable, keyUsages);
|
|
21
|
-
}
|
|
22
|
-
async sign(algorithm, key, data) {
|
|
23
|
-
return window.crypto.subtle.sign(algorithm, key, data);
|
|
24
|
-
}
|
|
25
|
-
async digest(algorithm, data) {
|
|
26
|
-
return window.crypto.subtle.digest(algorithm, data);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { ModernBrowserCrypto };
|
|
31
|
-
//# sourceMappingURL=ModernBrowserCrypto.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModernBrowserCrypto.mjs","sources":["../../src/crypto/ModernBrowserCrypto.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAMA;AAEA;AACI;AAIM;AAmBS,MAAA,mBACF,CAAU;AAcjB,IAAA,eACO,CAAE,UAAmB,EAAA;AAW5B,QAAA,OACF,MAAW,CAAA,MAAA,CAAA,eACX,CAAA,UAAM,CAAA,CAAA;AAOb,KAAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface ISubtleCrypto {
|
|
7
|
-
initPrng?(entropy: Uint8Array): void;
|
|
8
|
-
getRandomValues(dataBuffer: Uint8Array): Uint8Array;
|
|
9
|
-
generateKey(
|
|
10
|
-
algorithm: RsaHashedKeyGenParams,
|
|
11
|
-
extractable: boolean,
|
|
12
|
-
keyUsages: KeyUsage[]
|
|
13
|
-
): Promise<CryptoKeyPair>;
|
|
14
|
-
exportKey(key: CryptoKey): Promise<JsonWebKey>;
|
|
15
|
-
importKey(
|
|
16
|
-
keyData: JsonWebKey,
|
|
17
|
-
algorithm: RsaHashedImportParams,
|
|
18
|
-
extractable: boolean,
|
|
19
|
-
keyUsages: KeyUsage[]
|
|
20
|
-
): Promise<CryptoKey>;
|
|
21
|
-
sign(
|
|
22
|
-
algorithm: AlgorithmIdentifier,
|
|
23
|
-
key: CryptoKey,
|
|
24
|
-
data: ArrayBuffer
|
|
25
|
-
): Promise<ArrayBuffer>;
|
|
26
|
-
digest(
|
|
27
|
-
algorithm: AlgorithmIdentifier,
|
|
28
|
-
data: Uint8Array
|
|
29
|
-
): Promise<ArrayBuffer>;
|
|
30
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { KEY_FORMAT_JWK } from "../utils/BrowserConstants";
|
|
7
|
-
import { ISubtleCrypto } from "./ISubtleCrypto";
|
|
8
|
-
|
|
9
|
-
export class ModernBrowserCrypto implements ISubtleCrypto {
|
|
10
|
-
getRandomValues(dataBuffer: Uint8Array): Uint8Array {
|
|
11
|
-
return window.crypto.getRandomValues(dataBuffer);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async generateKey(
|
|
15
|
-
algorithm: RsaHashedKeyGenParams,
|
|
16
|
-
extractable: boolean,
|
|
17
|
-
keyUsages: KeyUsage[]
|
|
18
|
-
): Promise<CryptoKeyPair> {
|
|
19
|
-
return window.crypto.subtle.generateKey(
|
|
20
|
-
algorithm,
|
|
21
|
-
extractable,
|
|
22
|
-
keyUsages
|
|
23
|
-
) as Promise<CryptoKeyPair>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async exportKey(key: CryptoKey): Promise<JsonWebKey> {
|
|
27
|
-
return window.crypto.subtle.exportKey(
|
|
28
|
-
KEY_FORMAT_JWK,
|
|
29
|
-
key
|
|
30
|
-
) as Promise<JsonWebKey>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async importKey(
|
|
34
|
-
keyData: JsonWebKey,
|
|
35
|
-
algorithm: RsaHashedImportParams,
|
|
36
|
-
extractable: boolean,
|
|
37
|
-
keyUsages: KeyUsage[]
|
|
38
|
-
): Promise<CryptoKey> {
|
|
39
|
-
return window.crypto.subtle.importKey(
|
|
40
|
-
KEY_FORMAT_JWK,
|
|
41
|
-
keyData,
|
|
42
|
-
algorithm,
|
|
43
|
-
extractable,
|
|
44
|
-
keyUsages
|
|
45
|
-
) as Promise<CryptoKey>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async sign(
|
|
49
|
-
algorithm: AlgorithmIdentifier,
|
|
50
|
-
key: CryptoKey,
|
|
51
|
-
data: ArrayBuffer
|
|
52
|
-
): Promise<ArrayBuffer> {
|
|
53
|
-
return window.crypto.subtle.sign(
|
|
54
|
-
algorithm,
|
|
55
|
-
key,
|
|
56
|
-
data
|
|
57
|
-
) as Promise<ArrayBuffer>;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async digest(
|
|
61
|
-
algorithm: AlgorithmIdentifier,
|
|
62
|
-
data: Uint8Array
|
|
63
|
-
): Promise<ArrayBuffer> {
|
|
64
|
-
return window.crypto.subtle.digest(
|
|
65
|
-
algorithm,
|
|
66
|
-
data
|
|
67
|
-
) as Promise<ArrayBuffer>;
|
|
68
|
-
}
|
|
69
|
-
}
|