@azure/msal-node 5.0.0-alpha.0 → 5.0.0-beta.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/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/NodeStorage.mjs +1 -1
- package/dist/cache/NodeStorage.mjs.map +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs.map +1 -1
- package/dist/cache/serializer/Deserializer.mjs +1 -1
- package/dist/cache/serializer/Deserializer.mjs.map +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/cache/serializer/Serializer.mjs.map +1 -1
- package/dist/client/BaseClient.d.ts +42 -0
- package/dist/client/BaseClient.d.ts.map +1 -0
- package/dist/client/BaseClient.mjs +68 -0
- package/dist/client/BaseClient.mjs.map +1 -0
- package/dist/client/ClientApplication.mjs +1 -1
- package/dist/client/ClientApplication.mjs.map +1 -1
- package/dist/client/ClientAssertion.mjs +1 -1
- package/dist/client/ClientAssertion.mjs.map +1 -1
- package/dist/client/ClientCredentialClient.d.ts +2 -1
- package/dist/client/ClientCredentialClient.d.ts.map +1 -1
- package/dist/client/ClientCredentialClient.mjs +4 -3
- package/dist/client/ClientCredentialClient.mjs.map +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +1 -1
- package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
- package/dist/client/DeviceCodeClient.d.ts +2 -1
- package/dist/client/DeviceCodeClient.d.ts.map +1 -1
- package/dist/client/DeviceCodeClient.mjs +6 -5
- package/dist/client/DeviceCodeClient.mjs.map +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +1 -1
- package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentityClient.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.d.ts +54 -0
- package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +55 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts +81 -0
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +82 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +93 -2
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +81 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts +54 -0
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +55 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.d.ts +44 -22
- package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +44 -22
- package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.d.ts +65 -0
- package/dist/client/ManagedIdentitySources/MachineLearning.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.mjs +66 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +56 -22
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +57 -23
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +1 -1
- package/dist/client/OnBehalfOfClient.d.ts +2 -1
- package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
- package/dist/client/OnBehalfOfClient.mjs +4 -3
- package/dist/client/OnBehalfOfClient.mjs.map +1 -1
- package/dist/client/PublicClientApplication.d.ts.map +1 -1
- package/dist/client/PublicClientApplication.mjs +21 -5
- package/dist/client/PublicClientApplication.mjs.map +1 -1
- package/dist/client/UsernamePasswordClient.d.ts +2 -1
- package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
- package/dist/client/UsernamePasswordClient.mjs +4 -3
- package/dist/client/UsernamePasswordClient.mjs.map +1 -1
- package/dist/config/Configuration.d.ts +0 -6
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +3 -5
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityId.mjs.map +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +3 -3
- package/dist/config/ManagedIdentityRequestParameters.mjs.map +1 -1
- package/dist/crypto/CryptoProvider.mjs +1 -1
- package/dist/crypto/CryptoProvider.mjs.map +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/GuidGenerator.mjs.map +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/HashUtils.mjs.map +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs.map +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +1 -1
- package/dist/error/ManagedIdentityError.mjs +1 -1
- package/dist/error/ManagedIdentityError.mjs.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
- package/dist/error/NodeAuthError.d.ts +8 -0
- package/dist/error/NodeAuthError.d.ts.map +1 -1
- package/dist/error/NodeAuthError.mjs +11 -1
- package/dist/error/NodeAuthError.mjs.map +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1 -7
- package/dist/index.mjs.map +1 -1
- package/dist/internals.mjs +1 -1
- package/dist/network/HttpClient.d.ts +54 -14
- package/dist/network/HttpClient.d.ts.map +1 -1
- package/dist/network/HttpClient.mjs +140 -262
- package/dist/network/HttpClient.mjs.map +1 -1
- package/dist/network/HttpClientWithRetries.mjs +1 -1
- package/dist/network/HttpClientWithRetries.mjs.map +1 -1
- package/dist/network/LoopbackClient.mjs +1 -1
- package/dist/network/LoopbackClient.mjs.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.d.ts.map +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.mjs +2 -2
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/request/AuthorizationCodeRequest.d.ts +2 -1
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts +2 -2
- package/dist/request/ClientCredentialRequest.d.ts +0 -1
- package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
- package/dist/request/CommonClientCredentialRequest.d.ts +3 -2
- package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
- package/dist/request/CommonDeviceCodeRequest.d.ts +3 -2
- package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
- package/dist/request/CommonOnBehalfOfRequest.d.ts +1 -2
- package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
- package/dist/request/CommonUsernamePasswordRequest.d.ts +2 -1
- package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
- package/dist/request/InteractiveRequest.d.ts +1 -1
- package/dist/request/InteractiveRequest.d.ts.map +1 -1
- package/dist/request/OnBehalfOfRequest.d.ts +0 -1
- package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
- package/dist/request/RefreshTokenRequest.d.ts +2 -1
- package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/SilentFlowRequest.d.ts +2 -1
- package/dist/request/SilentFlowRequest.d.ts.map +1 -1
- package/dist/request/UsernamePasswordRequest.d.ts +2 -1
- package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
- package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
- package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs.map +1 -1
- package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
- package/dist/retry/ExponentialRetryStrategy.mjs.map +1 -1
- package/dist/retry/ImdsRetryPolicy.mjs +1 -1
- package/dist/retry/ImdsRetryPolicy.mjs.map +1 -1
- package/dist/retry/LinearRetryStrategy.mjs +1 -1
- package/dist/retry/LinearRetryStrategy.mjs.map +1 -1
- package/dist/utils/Constants.d.ts +2 -9
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +4 -12
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/EncodingUtils.mjs +1 -1
- package/dist/utils/EncodingUtils.mjs.map +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs.map +1 -1
- package/lib/msal-node.cjs +5747 -5335
- package/lib/msal-node.cjs.map +1 -1
- package/lib/types/client/BaseClient.d.ts +42 -0
- package/lib/types/client/BaseClient.d.ts.map +1 -0
- package/lib/types/client/ClientCredentialClient.d.ts +2 -1
- package/lib/types/client/ClientCredentialClient.d.ts.map +1 -1
- package/lib/types/client/DeviceCodeClient.d.ts +2 -1
- package/lib/types/client/DeviceCodeClient.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/AppService.d.ts +54 -0
- package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +81 -0
- package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +93 -2
- package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +54 -0
- package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/Imds.d.ts +44 -22
- package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/MachineLearning.d.ts +65 -0
- package/lib/types/client/ManagedIdentitySources/MachineLearning.d.ts.map +1 -1
- package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +56 -22
- package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
- package/lib/types/client/OnBehalfOfClient.d.ts +2 -1
- package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -1
- package/lib/types/client/PublicClientApplication.d.ts.map +1 -1
- package/lib/types/client/UsernamePasswordClient.d.ts +2 -1
- package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -1
- package/lib/types/config/Configuration.d.ts +0 -6
- package/lib/types/config/Configuration.d.ts.map +1 -1
- package/lib/types/error/NodeAuthError.d.ts +8 -0
- package/lib/types/error/NodeAuthError.d.ts.map +1 -1
- package/lib/types/index.d.ts +0 -6
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/network/HttpClient.d.ts +54 -14
- package/lib/types/network/HttpClient.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/packageMetadata.d.ts.map +1 -1
- package/lib/types/request/AuthorizationCodeRequest.d.ts +2 -1
- package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -1
- package/lib/types/request/AuthorizationUrlRequest.d.ts +2 -2
- package/lib/types/request/ClientCredentialRequest.d.ts +0 -1
- package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -1
- package/lib/types/request/CommonClientCredentialRequest.d.ts +3 -2
- package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -1
- package/lib/types/request/CommonDeviceCodeRequest.d.ts +3 -2
- package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -1
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts +1 -2
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts +2 -1
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
- package/lib/types/request/InteractiveRequest.d.ts +1 -1
- package/lib/types/request/InteractiveRequest.d.ts.map +1 -1
- package/lib/types/request/OnBehalfOfRequest.d.ts +0 -1
- package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -1
- package/lib/types/request/RefreshTokenRequest.d.ts +2 -1
- package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -1
- package/lib/types/request/SilentFlowRequest.d.ts +2 -1
- package/lib/types/request/SilentFlowRequest.d.ts.map +1 -1
- package/lib/types/request/UsernamePasswordRequest.d.ts +2 -1
- package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -1
- package/lib/types/utils/Constants.d.ts +2 -9
- package/lib/types/utils/Constants.d.ts.map +1 -1
- package/package.json +88 -88
- package/src/client/BaseClient.ts +158 -0
- package/src/client/ClientCredentialClient.ts +2 -3
- package/src/client/DeviceCodeClient.ts +4 -5
- package/src/client/ManagedIdentitySources/AppService.ts +54 -0
- package/src/client/ManagedIdentitySources/AzureArc.ts +81 -0
- package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +92 -2
- package/src/client/ManagedIdentitySources/CloudShell.ts +54 -0
- package/src/client/ManagedIdentitySources/Imds.ts +43 -21
- package/src/client/ManagedIdentitySources/MachineLearning.ts +65 -0
- package/src/client/ManagedIdentitySources/ServiceFabric.ts +56 -22
- package/src/client/OnBehalfOfClient.ts +2 -3
- package/src/client/PublicClientApplication.ts +22 -4
- package/src/client/UsernamePasswordClient.ts +2 -3
- package/src/config/Configuration.ts +2 -14
- package/src/config/ManagedIdentityRequestParameters.ts +2 -2
- package/src/error/NodeAuthError.ts +14 -0
- package/src/index.ts +0 -8
- package/src/network/HttpClient.ts +166 -372
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +1 -1
- package/src/request/AuthorizationCodeRequest.ts +2 -1
- package/src/request/AuthorizationUrlRequest.ts +2 -2
- package/src/request/ClientCredentialRequest.ts +0 -1
- package/src/request/CommonClientCredentialRequest.ts +6 -2
- package/src/request/CommonDeviceCodeRequest.ts +3 -6
- package/src/request/CommonOnBehalfOfRequest.ts +4 -2
- package/src/request/CommonUsernamePasswordRequest.ts +2 -1
- package/src/request/InteractiveRequest.ts +1 -4
- package/src/request/OnBehalfOfRequest.ts +0 -1
- package/src/request/RefreshTokenRequest.ts +2 -1
- package/src/request/SilentFlowRequest.ts +2 -1
- package/src/request/UsernamePasswordRequest.ts +2 -1
- package/src/utils/Constants.ts +2 -11
- package/dist/utils/NetworkUtils.mjs +0 -43
- package/dist/utils/NetworkUtils.mjs.map +0 -1
package/dist/internals.mjs
CHANGED
|
@@ -1,26 +1,66 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
1
|
import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common/node";
|
|
4
|
-
import http from "http";
|
|
5
|
-
import https from "https";
|
|
6
2
|
/**
|
|
7
|
-
*
|
|
3
|
+
* HTTP client implementation using Node.js native fetch API.
|
|
4
|
+
*
|
|
5
|
+
* This class provides a clean interface for making HTTP requests using the modern
|
|
6
|
+
* fetch API available in Node.js 18+. It replaces the previous implementation that
|
|
7
|
+
* relied on custom proxy handling and the legacy http/https modules.
|
|
8
8
|
*/
|
|
9
9
|
export declare class HttpClient implements INetworkModule {
|
|
10
|
-
private proxyUrl;
|
|
11
|
-
private customAgentOptions;
|
|
12
|
-
constructor(proxyUrl?: string, customAgentOptions?: http.AgentOptions | https.AgentOptions);
|
|
13
10
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* Sends an HTTP GET request to the specified URL.
|
|
12
|
+
*
|
|
13
|
+
* This method handles GET requests with optional timeout support. The timeout
|
|
14
|
+
* is implemented using AbortController, which provides a clean way to cancel
|
|
15
|
+
* fetch requests that take too long to complete.
|
|
16
|
+
*
|
|
17
|
+
* @param url - The target URL for the GET request
|
|
18
|
+
* @param options - Optional request configuration including headers
|
|
19
|
+
* @param timeout - Optional timeout in milliseconds. If specified, the request
|
|
20
|
+
* will be aborted if it doesn't complete within this time
|
|
21
|
+
* @returns Promise that resolves to a NetworkResponse containing headers, body, and status
|
|
22
|
+
* @throws {AuthError} When the request times out or response parsing fails
|
|
23
|
+
* @throws {NetworkError} When the network request fails
|
|
17
24
|
*/
|
|
18
25
|
sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions, timeout?: number): Promise<NetworkResponse<T>>;
|
|
19
26
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
27
|
+
* Sends an HTTP POST request to the specified URL.
|
|
28
|
+
*
|
|
29
|
+
* This method handles POST requests with request body support. Currently,
|
|
30
|
+
* timeout functionality is not exposed for POST requests, but the underlying
|
|
31
|
+
* implementation supports it through the shared sendRequest method.
|
|
32
|
+
*
|
|
33
|
+
* @param url - The target URL for the POST request
|
|
34
|
+
* @param options - Optional request configuration including headers and body
|
|
35
|
+
* @returns Promise that resolves to a NetworkResponse containing headers, body, and status
|
|
36
|
+
* @throws {AuthError} When the request times out or response parsing fails
|
|
37
|
+
* @throws {NetworkError} When the network request fails
|
|
23
38
|
*/
|
|
24
39
|
sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;
|
|
40
|
+
/**
|
|
41
|
+
* Core HTTP request implementation using native fetch API.
|
|
42
|
+
*
|
|
43
|
+
* This method handles GET and POST HTTP requests with comprehensive
|
|
44
|
+
* timeout support and error handling. The timeout mechanism works as follows:
|
|
45
|
+
*
|
|
46
|
+
* 1. An AbortController is created for each request
|
|
47
|
+
* 2. If a timeout is specified, setTimeout is used to call abort() after the delay
|
|
48
|
+
* 3. The abort signal is passed to fetch, which will reject the promise if aborted
|
|
49
|
+
* 4. Cleanup occurs in both success and error cases to prevent timer leaks
|
|
50
|
+
*
|
|
51
|
+
* Error handling priority:
|
|
52
|
+
* 1. Timeout errors (AbortError) are converted to "Request timeout" messages
|
|
53
|
+
* 2. Network/connection errors are wrapped with "Network request failed" prefix
|
|
54
|
+
* 3. JSON parsing errors are wrapped with "Failed to parse response" prefix
|
|
55
|
+
*
|
|
56
|
+
* @param url - The target URL for the request
|
|
57
|
+
* @param method - HTTP method (GET or POST)
|
|
58
|
+
* @param options - Optional request configuration (headers, body)
|
|
59
|
+
* @param timeout - Optional timeout in milliseconds for request cancellation
|
|
60
|
+
* @returns Promise resolving to NetworkResponse with parsed JSON body
|
|
61
|
+
* @throws {AuthError} For timeouts or JSON parsing errors
|
|
62
|
+
* @throws {NetworkError} For network failures
|
|
63
|
+
*/
|
|
64
|
+
private sendRequest;
|
|
25
65
|
}
|
|
26
66
|
//# sourceMappingURL=HttpClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/network/HttpClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/network/HttpClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAGH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAGlB,MAAM,yBAAyB,CAAC;AAGjC;;;;;;GAMG;AACH,qBAAa,UAAW,YAAW,cAAc;IAC7C;;;;;;;;;;;;;;OAcG;IACG,mBAAmB,CAAC,CAAC,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,EAC/B,OAAO,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAI9B;;;;;;;;;;;;OAYG;IACG,oBAAoB,CAAC,CAAC,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAI9B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;YACW,WAAW;CAoF5B"}
|
|
@@ -1,294 +1,172 @@
|
|
|
1
|
-
/*! @azure/msal-node v5.0.0-
|
|
1
|
+
/*! @azure/msal-node v5.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { NetworkUtils } from '../utils/NetworkUtils.mjs';
|
|
6
|
-
import http from 'http';
|
|
7
|
-
import https from 'https';
|
|
3
|
+
import { createAuthError, ClientAuthErrorCodes, createNetworkError } from '@azure/msal-common/node';
|
|
4
|
+
import { HttpMethod } from '../utils/Constants.mjs';
|
|
8
5
|
|
|
9
6
|
/*
|
|
10
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
8
|
* Licensed under the MIT License.
|
|
12
9
|
*/
|
|
13
10
|
/**
|
|
14
|
-
*
|
|
11
|
+
* HTTP client implementation using Node.js native fetch API.
|
|
12
|
+
*
|
|
13
|
+
* This class provides a clean interface for making HTTP requests using the modern
|
|
14
|
+
* fetch API available in Node.js 18+. It replaces the previous implementation that
|
|
15
|
+
* relied on custom proxy handling and the legacy http/https modules.
|
|
15
16
|
*/
|
|
16
17
|
class HttpClient {
|
|
17
|
-
constructor(proxyUrl, customAgentOptions) {
|
|
18
|
-
this.proxyUrl = proxyUrl || "";
|
|
19
|
-
this.customAgentOptions = customAgentOptions || {};
|
|
20
|
-
}
|
|
21
18
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* Sends an HTTP GET request to the specified URL.
|
|
20
|
+
*
|
|
21
|
+
* This method handles GET requests with optional timeout support. The timeout
|
|
22
|
+
* is implemented using AbortController, which provides a clean way to cancel
|
|
23
|
+
* fetch requests that take too long to complete.
|
|
24
|
+
*
|
|
25
|
+
* @param url - The target URL for the GET request
|
|
26
|
+
* @param options - Optional request configuration including headers
|
|
27
|
+
* @param timeout - Optional timeout in milliseconds. If specified, the request
|
|
28
|
+
* will be aborted if it doesn't complete within this time
|
|
29
|
+
* @returns Promise that resolves to a NetworkResponse containing headers, body, and status
|
|
30
|
+
* @throws {AuthError} When the request times out or response parsing fails
|
|
31
|
+
* @throws {NetworkError} When the network request fails
|
|
25
32
|
*/
|
|
26
33
|
async sendGetRequestAsync(url, options, timeout) {
|
|
27
|
-
|
|
28
|
-
return networkRequestViaProxy(url, this.proxyUrl, HttpMethod.GET, options, this.customAgentOptions, timeout);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
return networkRequestViaHttps(url, HttpMethod.GET, options, this.customAgentOptions, timeout);
|
|
32
|
-
}
|
|
34
|
+
return this.sendRequest(url, HttpMethod.GET, options, timeout);
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
37
|
+
* Sends an HTTP POST request to the specified URL.
|
|
38
|
+
*
|
|
39
|
+
* This method handles POST requests with request body support. Currently,
|
|
40
|
+
* timeout functionality is not exposed for POST requests, but the underlying
|
|
41
|
+
* implementation supports it through the shared sendRequest method.
|
|
42
|
+
*
|
|
43
|
+
* @param url - The target URL for the POST request
|
|
44
|
+
* @param options - Optional request configuration including headers and body
|
|
45
|
+
* @returns Promise that resolves to a NetworkResponse containing headers, body, and status
|
|
46
|
+
* @throws {AuthError} When the request times out or response parsing fails
|
|
47
|
+
* @throws {NetworkError} When the network request fails
|
|
38
48
|
*/
|
|
39
49
|
async sendPostRequestAsync(url, options) {
|
|
40
|
-
|
|
41
|
-
return networkRequestViaProxy(url, this.proxyUrl, HttpMethod.POST, options, this.customAgentOptions);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return networkRequestViaHttps(url, HttpMethod.POST, options, this.customAgentOptions);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const networkRequestViaProxy = (destinationUrlString, proxyUrlString, httpMethod, options, agentOptions, timeout) => {
|
|
49
|
-
const destinationUrl = new URL(destinationUrlString);
|
|
50
|
-
const proxyUrl = new URL(proxyUrlString);
|
|
51
|
-
// "method: connect" must be used to establish a connection to the proxy
|
|
52
|
-
const headers = options?.headers || {};
|
|
53
|
-
const tunnelRequestOptions = {
|
|
54
|
-
host: proxyUrl.hostname,
|
|
55
|
-
port: proxyUrl.port,
|
|
56
|
-
method: "CONNECT",
|
|
57
|
-
path: destinationUrl.hostname,
|
|
58
|
-
headers: headers,
|
|
59
|
-
};
|
|
60
|
-
if (agentOptions && Object.keys(agentOptions).length) {
|
|
61
|
-
tunnelRequestOptions.agent = new http.Agent(agentOptions);
|
|
62
|
-
}
|
|
63
|
-
// compose a request string for the socket
|
|
64
|
-
let postRequestStringContent = "";
|
|
65
|
-
if (httpMethod === HttpMethod.POST) {
|
|
66
|
-
const body = options?.body || "";
|
|
67
|
-
postRequestStringContent =
|
|
68
|
-
"Content-Type: application/x-www-form-urlencoded\r\n" +
|
|
69
|
-
`Content-Length: ${body.length}\r\n` +
|
|
70
|
-
`\r\n${body}`;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
// optional timeout is only for get requests (regionDiscovery, for example)
|
|
74
|
-
if (timeout) {
|
|
75
|
-
tunnelRequestOptions.timeout = timeout;
|
|
76
|
-
}
|
|
50
|
+
return this.sendRequest(url, HttpMethod.POST, options);
|
|
77
51
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Core HTTP request implementation using native fetch API.
|
|
54
|
+
*
|
|
55
|
+
* This method handles GET and POST HTTP requests with comprehensive
|
|
56
|
+
* timeout support and error handling. The timeout mechanism works as follows:
|
|
57
|
+
*
|
|
58
|
+
* 1. An AbortController is created for each request
|
|
59
|
+
* 2. If a timeout is specified, setTimeout is used to call abort() after the delay
|
|
60
|
+
* 3. The abort signal is passed to fetch, which will reject the promise if aborted
|
|
61
|
+
* 4. Cleanup occurs in both success and error cases to prevent timer leaks
|
|
62
|
+
*
|
|
63
|
+
* Error handling priority:
|
|
64
|
+
* 1. Timeout errors (AbortError) are converted to "Request timeout" messages
|
|
65
|
+
* 2. Network/connection errors are wrapped with "Network request failed" prefix
|
|
66
|
+
* 3. JSON parsing errors are wrapped with "Failed to parse response" prefix
|
|
67
|
+
*
|
|
68
|
+
* @param url - The target URL for the request
|
|
69
|
+
* @param method - HTTP method (GET or POST)
|
|
70
|
+
* @param options - Optional request configuration (headers, body)
|
|
71
|
+
* @param timeout - Optional timeout in milliseconds for request cancellation
|
|
72
|
+
* @returns Promise resolving to NetworkResponse with parsed JSON body
|
|
73
|
+
* @throws {AuthError} For timeouts or JSON parsing errors
|
|
74
|
+
* @throws {NetworkError} For network failures
|
|
75
|
+
*/
|
|
76
|
+
async sendRequest(url, method, options, timeout) {
|
|
77
|
+
/*
|
|
78
|
+
* Setup timeout mechanism using AbortController
|
|
79
|
+
* This provides a standard way to cancel fetch requests
|
|
80
|
+
*/
|
|
81
|
+
const controller = new AbortController();
|
|
82
|
+
let timeoutId;
|
|
83
|
+
/*
|
|
84
|
+
* Configure timeout if specified
|
|
85
|
+
* The setTimeout will trigger abort() if the request takes too long
|
|
86
|
+
*/
|
|
85
87
|
if (timeout) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
88
|
+
timeoutId = setTimeout(() => {
|
|
89
|
+
// Calling abort() will cause fetch to reject with AbortError
|
|
90
|
+
controller.abort();
|
|
91
|
+
}, timeout);
|
|
90
92
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (proxyStatusCode < ProxyStatus.SUCCESS_RANGE_START ||
|
|
96
|
-
proxyStatusCode > ProxyStatus.SUCCESS_RANGE_END) {
|
|
97
|
-
request.destroy();
|
|
98
|
-
socket.destroy();
|
|
99
|
-
reject(new Error(`Error connecting to proxy. Http status code: ${response.statusCode}. Http status message: ${response?.statusMessage || "Unknown"}`));
|
|
100
|
-
}
|
|
101
|
-
// make a request over an HTTP tunnel
|
|
102
|
-
socket.write(outgoingRequestString);
|
|
103
|
-
const data = [];
|
|
104
|
-
socket.on("data", (chunk) => {
|
|
105
|
-
data.push(chunk);
|
|
106
|
-
});
|
|
107
|
-
socket.on("end", () => {
|
|
108
|
-
// combine all received buffer streams into one buffer, and then into a string
|
|
109
|
-
const dataString = Buffer.concat([...data]).toString();
|
|
110
|
-
// separate each line into it's own entry in an arry
|
|
111
|
-
const dataStringArray = dataString.split("\r\n");
|
|
112
|
-
// the first entry will contain the statusCode and statusMessage
|
|
113
|
-
const httpStatusCode = parseInt(dataStringArray[0].split(" ")[1]);
|
|
114
|
-
// remove "HTTP/1.1" and the status code to get the status message
|
|
115
|
-
const statusMessage = dataStringArray[0]
|
|
116
|
-
.split(" ")
|
|
117
|
-
.slice(2)
|
|
118
|
-
.join(" ");
|
|
119
|
-
// the last entry will contain the body
|
|
120
|
-
const body = dataStringArray[dataStringArray.length - 1];
|
|
121
|
-
// everything in between the first and last entries are the headers
|
|
122
|
-
const headersArray = dataStringArray.slice(1, dataStringArray.length - 2);
|
|
123
|
-
// build an object out of all the headers
|
|
124
|
-
const entries = new Map();
|
|
125
|
-
headersArray.forEach((header) => {
|
|
126
|
-
/**
|
|
127
|
-
* the header might look like "Content-Length: 1531", but that is just a string
|
|
128
|
-
* it needs to be converted to a key/value pair
|
|
129
|
-
* split the string at the first instance of ":"
|
|
130
|
-
* there may be more than one ":" if the value of the header is supposed to be a JSON object
|
|
131
|
-
*/
|
|
132
|
-
const headerKeyValue = header.split(new RegExp(/:\s(.*)/s));
|
|
133
|
-
const headerKey = headerKeyValue[0];
|
|
134
|
-
let headerValue = headerKeyValue[1];
|
|
135
|
-
// check if the value of the header is supposed to be a JSON object
|
|
136
|
-
try {
|
|
137
|
-
const object = JSON.parse(headerValue);
|
|
138
|
-
// if it is, then convert it from a string to a JSON object
|
|
139
|
-
if (object && typeof object === "object") {
|
|
140
|
-
headerValue = object;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
catch (e) {
|
|
144
|
-
// otherwise, leave it as a string
|
|
145
|
-
}
|
|
146
|
-
entries.set(headerKey, headerValue);
|
|
147
|
-
});
|
|
148
|
-
const headers = Object.fromEntries(entries);
|
|
149
|
-
const parsedHeaders = headers;
|
|
150
|
-
const networkResponse = NetworkUtils.getNetworkResponse(parsedHeaders, parseBody(httpStatusCode, statusMessage, parsedHeaders, body), httpStatusCode);
|
|
151
|
-
if ((httpStatusCode <
|
|
152
|
-
Constants.HTTP_SUCCESS_RANGE_START ||
|
|
153
|
-
httpStatusCode >
|
|
154
|
-
Constants.HTTP_SUCCESS_RANGE_END) &&
|
|
155
|
-
// do not destroy the request for the device code flow
|
|
156
|
-
networkResponse.body["error"] !==
|
|
157
|
-
Constants$1.AUTHORIZATION_PENDING) {
|
|
158
|
-
request.destroy();
|
|
159
|
-
}
|
|
160
|
-
resolve(networkResponse);
|
|
161
|
-
});
|
|
162
|
-
socket.on("error", (chunk) => {
|
|
163
|
-
request.destroy();
|
|
164
|
-
socket.destroy();
|
|
165
|
-
reject(new Error(chunk.toString()));
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
request.on("error", (chunk) => {
|
|
169
|
-
request.destroy();
|
|
170
|
-
reject(new Error(chunk.toString()));
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
const networkRequestViaHttps = (urlString, httpMethod, options, agentOptions, timeout) => {
|
|
175
|
-
const isPostRequest = httpMethod === HttpMethod.POST;
|
|
176
|
-
const body = options?.body || "";
|
|
177
|
-
const url = new URL(urlString);
|
|
178
|
-
const headers = options?.headers || {};
|
|
179
|
-
const customOptions = {
|
|
180
|
-
method: httpMethod,
|
|
181
|
-
headers: headers,
|
|
182
|
-
...NetworkUtils.urlToHttpOptions(url),
|
|
183
|
-
};
|
|
184
|
-
if (agentOptions && Object.keys(agentOptions).length) {
|
|
185
|
-
customOptions.agent = new https.Agent(agentOptions);
|
|
186
|
-
}
|
|
187
|
-
if (isPostRequest) {
|
|
188
|
-
// needed for post request to work
|
|
189
|
-
customOptions.headers = {
|
|
190
|
-
...customOptions.headers,
|
|
191
|
-
"Content-Length": body.length,
|
|
93
|
+
const fetchOptions = {
|
|
94
|
+
method: method,
|
|
95
|
+
headers: getFetchHeaders(options),
|
|
96
|
+
signal: controller.signal, // Enable cancellation via AbortController
|
|
192
97
|
};
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// optional timeout is only for get requests (regionDiscovery, for example)
|
|
196
|
-
if (timeout) {
|
|
197
|
-
customOptions.timeout = timeout;
|
|
98
|
+
if (method === HttpMethod.POST) {
|
|
99
|
+
fetchOptions.body = options?.body || "";
|
|
198
100
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
// managed identity sources use http instead of https
|
|
203
|
-
if (customOptions.protocol === "http:") {
|
|
204
|
-
request = http.request(customOptions);
|
|
101
|
+
let response;
|
|
102
|
+
try {
|
|
103
|
+
response = await fetch(url, fetchOptions);
|
|
205
104
|
}
|
|
206
|
-
|
|
207
|
-
|
|
105
|
+
catch (error) {
|
|
106
|
+
// Clean up timeout to prevent memory leaks
|
|
107
|
+
if (timeoutId) {
|
|
108
|
+
clearTimeout(timeoutId);
|
|
109
|
+
}
|
|
110
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
111
|
+
throw createAuthError(ClientAuthErrorCodes.networkError, "Request timeout");
|
|
112
|
+
}
|
|
113
|
+
const baseAuthError = createAuthError(ClientAuthErrorCodes.networkError, `Network request failed: ${error instanceof Error ? error.message : "unknown"}`);
|
|
114
|
+
throw createNetworkError(baseAuthError, undefined, undefined, error instanceof Error ? error : undefined);
|
|
208
115
|
}
|
|
209
|
-
|
|
210
|
-
|
|
116
|
+
// Clean up timeout to prevent memory leaks
|
|
117
|
+
if (timeoutId) {
|
|
118
|
+
clearTimeout(timeoutId);
|
|
211
119
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
120
|
+
try {
|
|
121
|
+
return {
|
|
122
|
+
headers: getHeaderDict(response.headers),
|
|
123
|
+
body: (await response.json()),
|
|
124
|
+
status: response.status,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
throw createAuthError(ClientAuthErrorCodes.tokenParsingError, `Failed to parse response: ${error instanceof Error ? error.message : "unknown"}`);
|
|
217
129
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
// do not destroy the request for the device code flow
|
|
235
|
-
networkResponse.body["error"] !==
|
|
236
|
-
Constants$1.AUTHORIZATION_PENDING) {
|
|
237
|
-
request.destroy();
|
|
238
|
-
}
|
|
239
|
-
resolve(networkResponse);
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
request.on("error", (chunk) => {
|
|
243
|
-
request.destroy();
|
|
244
|
-
reject(new Error(chunk.toString()));
|
|
245
|
-
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Converts a fetch Headers object to a plain JavaScript object.
|
|
134
|
+
*
|
|
135
|
+
* The fetch API returns headers as a Headers object with methods like get(), has(),
|
|
136
|
+
* etc. However, the rest of the MSAL codebase expects headers as a simple key-value
|
|
137
|
+
* object. This function performs that conversion.
|
|
138
|
+
*
|
|
139
|
+
* @param headers - The Headers object returned by fetch response
|
|
140
|
+
* @returns A plain object with header names as keys and values as strings
|
|
141
|
+
*/
|
|
142
|
+
function getHeaderDict(headers) {
|
|
143
|
+
const headerDict = {};
|
|
144
|
+
headers.forEach((value, key) => {
|
|
145
|
+
headerDict[key] = value;
|
|
246
146
|
});
|
|
247
|
-
|
|
147
|
+
return headerDict;
|
|
148
|
+
}
|
|
248
149
|
/**
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
150
|
+
* Converts NetworkRequestOptions headers to a fetch-compatible Headers object.
|
|
151
|
+
*
|
|
152
|
+
* The MSAL library uses plain objects for headers in NetworkRequestOptions,
|
|
153
|
+
* but the fetch API expects either a Headers object, plain object, or array
|
|
154
|
+
* of arrays. Using the Headers constructor provides better compatibility
|
|
155
|
+
* and validation.
|
|
156
|
+
*
|
|
157
|
+
* @param options - Optional NetworkRequestOptions containing headers
|
|
158
|
+
* @returns A Headers object ready for use with fetch API
|
|
255
159
|
*/
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
* Redirection messages (300 – 399)
|
|
261
|
-
* Client error responses (400 – 499)
|
|
262
|
-
* Server error responses (500 – 599)
|
|
263
|
-
*/
|
|
264
|
-
let parsedBody;
|
|
265
|
-
try {
|
|
266
|
-
parsedBody = JSON.parse(body);
|
|
267
|
-
}
|
|
268
|
-
catch (error) {
|
|
269
|
-
let errorType;
|
|
270
|
-
let errorDescriptionHelper;
|
|
271
|
-
if (statusCode >= Constants.HTTP_CLIENT_ERROR_RANGE_START &&
|
|
272
|
-
statusCode <= Constants.HTTP_CLIENT_ERROR_RANGE_END) {
|
|
273
|
-
errorType = "client_error";
|
|
274
|
-
errorDescriptionHelper = "A client";
|
|
275
|
-
}
|
|
276
|
-
else if (statusCode >= Constants.HTTP_SERVER_ERROR_RANGE_START &&
|
|
277
|
-
statusCode <= Constants.HTTP_SERVER_ERROR_RANGE_END) {
|
|
278
|
-
errorType = "server_error";
|
|
279
|
-
errorDescriptionHelper = "A server";
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
errorType = "unknown_error";
|
|
283
|
-
errorDescriptionHelper = "An unknown";
|
|
284
|
-
}
|
|
285
|
-
parsedBody = {
|
|
286
|
-
error: errorType,
|
|
287
|
-
error_description: `${errorDescriptionHelper} error occured.\nHttp status code: ${statusCode}\nHttp status message: ${statusMessage || "Unknown"}\nHeaders: ${JSON.stringify(headers)}`,
|
|
288
|
-
};
|
|
160
|
+
function getFetchHeaders(options) {
|
|
161
|
+
const headers = new Headers();
|
|
162
|
+
if (!(options && options.headers)) {
|
|
163
|
+
return headers;
|
|
289
164
|
}
|
|
290
|
-
|
|
291
|
-
|
|
165
|
+
Object.entries(options.headers).forEach(([key, value]) => {
|
|
166
|
+
headers.append(key, value);
|
|
167
|
+
});
|
|
168
|
+
return headers;
|
|
169
|
+
}
|
|
292
170
|
|
|
293
171
|
export { HttpClient };
|
|
294
172
|
//# sourceMappingURL=HttpClient.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.mjs","sources":["../../src/network/HttpClient.ts"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"HttpClient.mjs","sources":["../../src/network/HttpClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAaH;;;;;;AAMG;MACU,UAAU,CAAA;AACnB;;;;;;;;;;;;;;AAcG;AACH,IAAA,MAAM,mBAAmB,CACrB,GAAW,EACX,OAA+B,EAC/B,OAAgB,EAAA;AAEhB,QAAA,OAAO,IAAI,CAAC,WAAW,CAAI,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;KACrE;AAED;;;;;;;;;;;;AAYG;AACH,IAAA,MAAM,oBAAoB,CACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,WAAW,CAAI,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KAC7D;AAED;;;;;;;;;;;;;;;;;;;;;;;AAuBG;IACK,MAAM,WAAW,CACrB,GAAW,EACX,MAAc,EACd,OAA+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AA,OAAO,OAAO,CAAC;AACnB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClientWithRetries.mjs","sources":["../../src/network/HttpClientWithRetries.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAYU,qBAAqB,CAAA;AAK9B,IAAA,WAAA,CACI,mBAAmC,EACnC,WAA6B,EAC7B,MAAc,EAAA;AAEd,QAAA,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"HttpClientWithRetries.mjs","sources":["../../src/network/HttpClientWithRetries.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAYU,qBAAqB,CAAA;AAK9B,IAAA,WAAA,CACI,mBAAmC,EACnC,WAA6B,EAC7B,MAAc,EAAA;AAEd,QAAA,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACxB;AAEO,IAAA,MAAM,6BAA6B,CACvC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,IAAI,UAAU,KAAK,UAAU,CAAC,GAAG,EAAE;YAC/B,OAAO,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACrE,SAAA;AAAM,aAAA;YACH,OAAO,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACtE,SAAA;KACJ;AAEO,IAAA,MAAM,uBAAuB,CACjC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;;AAG/B,QAAA,IAAI,QAAQ,GACR,MAAM,IAAI,CAAC,6BAA6B,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AAEvE,QAAA,IAAI,cAAc,IAAI,IAAI,CAAC,WAAW,EAAE;AACpC,YAAA,IAAI,CAAC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC;AACxC,SAAA;QAED,IAAI,YAAY,GAAW,CAAC,CAAC;AAC7B,QAAA,OACI,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAChC,QAAQ,CAAC,MAAM,EACf,YAAY,EACZ,IAAI,CAAC,MAAM,EACX,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CACtD,EACH;AACE,YAAA,QAAQ,GAAG,MAAM,IAAI,CAAC,6BAA6B,CAC/C,UAAU,EACV,GAAG,EACH,OAAO,CACV,CAAC;AACF,YAAA,YAAY,EAAE,CAAC;AAClB,SAAA;AAED,QAAA,OAAO,QAAQ,CAAC;KACnB;AAEM,IAAA,MAAM,mBAAmB,CAC5B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACrE;AAEM,IAAA,MAAM,oBAAoB,CAC7B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACtE;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoopbackClient.mjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA;;;AAGG;MAYU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAM,aAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,
|
|
1
|
+
{"version":3,"file":"LoopbackClient.mjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA;;;AAGG;MAYU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAM,aAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CAAoB,CAAC,OAAO,EAAE,MAAM,KAAI;AACtD,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACF,aAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,OAAO;AACV,iBAAA;AAAM,qBAAA,IAAI,GAAG,KAAKA,SAAe,CAAC,aAAa,EAAE;oBAC9C,GAAG,CAAC,GAAG,CACH,eAAe;AACX,wBAAA,qEAAqE,CAC5E,CAAC;oBACF,OAAO;AACV,iBAAA;AAED,gBAAA,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;gBAC1C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;gBAC5C,MAAM,gBAAgB,GAClB,QAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,MAAM,CAAC;AAClD,oBAAA,EAAE,CAAC;gBACP,IAAI,gBAAgB,CAAC,IAAI,EAAE;AACvB,oBAAA,GAAG,CAAC,SAAS,CAACA,SAAe,CAAC,aAAa,EAAE;AACz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U,EAAE;AACvD;;AAEG;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;AACrC,aAAA;AACD,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC,eAAO,MAAM,OAAO,iBAAiB,CAAC"}
|
package/dist/packageMetadata.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-node v5.0.0-
|
|
1
|
+
/*! @azure/msal-node v5.0.0-beta.0 2025-12-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
/* eslint-disable header/header */
|
|
4
4
|
const name = "@azure/msal-node";
|
|
5
|
-
const version = "5.0.0-
|
|
5
|
+
const version = "5.0.0-beta.0";
|
|
6
6
|
|
|
7
7
|
export { name, version };
|
|
8
8
|
//# sourceMappingURL=packageMetadata.mjs.map
|