@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
|
@@ -19,13 +19,10 @@ import {
|
|
|
19
19
|
* - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
|
|
20
20
|
* - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
|
|
21
21
|
* - timeout - Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period.
|
|
22
|
-
* - extraQueryParameters - String to string map of custom query parameters added to
|
|
22
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
23
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
-
export type CommonDeviceCodeRequest = Omit<
|
|
26
|
-
BaseAuthRequest,
|
|
27
|
-
"tokenQueryParameters" | "tokenBodyParameters"
|
|
28
|
-
> & {
|
|
25
|
+
export type CommonDeviceCodeRequest = BaseAuthRequest & {
|
|
29
26
|
deviceCodeCallback: (response: DeviceCodeResponse) => void;
|
|
30
27
|
cancel?: boolean;
|
|
31
28
|
timeout?: number;
|
|
@@ -11,9 +11,11 @@ import { BaseAuthRequest } from "@azure/msal-common/node";
|
|
|
11
11
|
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
|
|
12
12
|
* - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
|
|
13
13
|
* - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
|
|
14
|
-
* - tokenQueryParameters - String to string map of custom query parameters added to the /token call
|
|
15
14
|
*/
|
|
16
|
-
export type CommonOnBehalfOfRequest =
|
|
15
|
+
export type CommonOnBehalfOfRequest = Omit<
|
|
16
|
+
BaseAuthRequest,
|
|
17
|
+
"extraQueryParameters" | "extraParameters"
|
|
18
|
+
> & {
|
|
17
19
|
oboAssertion: string;
|
|
18
20
|
skipCache?: boolean;
|
|
19
21
|
};
|
|
@@ -15,7 +15,8 @@ import { BaseAuthRequest } from "@azure/msal-common/node";
|
|
|
15
15
|
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
|
|
16
16
|
* - username - username of the client
|
|
17
17
|
* - password - credentials
|
|
18
|
-
* -
|
|
18
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
19
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
19
20
|
*/
|
|
20
21
|
export type CommonUsernamePasswordRequest = BaseAuthRequest & {
|
|
21
22
|
username: string;
|
|
@@ -18,10 +18,7 @@ import { ILoopbackClient } from "../network/ILoopbackClient.js";
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
export type InteractiveRequest = Partial<
|
|
21
|
-
Omit<
|
|
22
|
-
CommonAuthorizationUrlRequest,
|
|
23
|
-
"scopes" | "redirectUri" | "storeInCache"
|
|
24
|
-
>
|
|
21
|
+
Omit<CommonAuthorizationUrlRequest, "scopes" | "storeInCache">
|
|
25
22
|
> & {
|
|
26
23
|
openBrowser: (url: string) => Promise<void>;
|
|
27
24
|
scopes?: Array<string>;
|
|
@@ -11,7 +11,6 @@ import { CommonOnBehalfOfRequest } from "./CommonOnBehalfOfRequest.js";
|
|
|
11
11
|
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
|
|
12
12
|
* - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
|
|
13
13
|
* - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
|
|
14
|
-
* - tokenQueryParameters - String to string map of custom query parameters added to the /token call
|
|
15
14
|
* @public
|
|
16
15
|
*/
|
|
17
16
|
export type OnBehalfOfRequest = Partial<
|
|
@@ -12,7 +12,8 @@ import { CommonRefreshTokenRequest } from "@azure/msal-common/node";
|
|
|
12
12
|
* - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
|
|
13
13
|
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
|
|
14
14
|
* - refreshToken - A refresh token returned from a previous request to the Identity provider.
|
|
15
|
-
* -
|
|
15
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
16
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
16
17
|
* - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios.
|
|
17
18
|
* @public
|
|
18
19
|
*/
|
|
@@ -11,7 +11,8 @@ import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node";
|
|
|
11
11
|
* - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
|
|
12
12
|
* - authority - Url of the authority which the application acquires tokens from.
|
|
13
13
|
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
|
|
14
|
-
* -
|
|
14
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
15
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
15
16
|
* - account - Account entity to lookup the credentials.
|
|
16
17
|
* - forceRefresh - Forces silent requests to make network calls if true.
|
|
17
18
|
* @public
|
|
@@ -15,7 +15,8 @@ import { CommonUsernamePasswordRequest } from "./CommonUsernamePasswordRequest.j
|
|
|
15
15
|
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
|
|
16
16
|
* - username - username of the client
|
|
17
17
|
* - password - credentials
|
|
18
|
-
* -
|
|
18
|
+
* - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
19
|
+
* - extraParameters - String to string map of custom query parameters added to outgoing token service requests
|
|
19
20
|
* @public
|
|
20
21
|
*/
|
|
21
22
|
export type UsernamePasswordRequest = Partial<
|
package/src/utils/Constants.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { Constants as CommonConstants } from "@azure/msal-common/node";
|
|
7
6
|
import { DefaultManagedIdentityRetryPolicy } from "../retry/DefaultManagedIdentityRetryPolicy.js";
|
|
8
7
|
import { ImdsRetryPolicy } from "../retry/ImdsRetryPolicy.js";
|
|
9
8
|
|
|
@@ -88,19 +87,11 @@ export type ManagedIdentityIdType =
|
|
|
88
87
|
* http methods
|
|
89
88
|
*/
|
|
90
89
|
export const HttpMethod = {
|
|
91
|
-
GET: "
|
|
92
|
-
POST: "
|
|
90
|
+
GET: "GET",
|
|
91
|
+
POST: "POST",
|
|
93
92
|
} as const;
|
|
94
93
|
export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];
|
|
95
94
|
|
|
96
|
-
export const ProxyStatus = {
|
|
97
|
-
SUCCESS: CommonConstants.HTTP_SUCCESS,
|
|
98
|
-
SUCCESS_RANGE_START: CommonConstants.HTTP_SUCCESS_RANGE_START,
|
|
99
|
-
SUCCESS_RANGE_END: CommonConstants.HTTP_SUCCESS_RANGE_END,
|
|
100
|
-
SERVER_ERROR: CommonConstants.HTTP_SERVER_ERROR,
|
|
101
|
-
} as const;
|
|
102
|
-
export type ProxyStatus = (typeof ProxyStatus)[keyof typeof ProxyStatus];
|
|
103
|
-
|
|
104
95
|
/**
|
|
105
96
|
* Constants used for region discovery
|
|
106
97
|
*/
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*! @azure/msal-node v5.0.0-alpha.0 2025-10-02 */
|
|
2
|
-
'use strict';
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/
|
|
7
|
-
class NetworkUtils {
|
|
8
|
-
static getNetworkResponse(headers, body, statusCode) {
|
|
9
|
-
return {
|
|
10
|
-
headers: headers,
|
|
11
|
-
body: body,
|
|
12
|
-
status: statusCode,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/*
|
|
16
|
-
* Utility function that converts a URL object into an ordinary options object as expected by the
|
|
17
|
-
* http.request and https.request APIs.
|
|
18
|
-
* https://github.com/nodejs/node/blob/main/lib/internal/url.js#L1090
|
|
19
|
-
*/
|
|
20
|
-
static urlToHttpOptions(url) {
|
|
21
|
-
const options = {
|
|
22
|
-
protocol: url.protocol,
|
|
23
|
-
hostname: url.hostname && url.hostname.startsWith("[")
|
|
24
|
-
? url.hostname.slice(1, -1)
|
|
25
|
-
: url.hostname,
|
|
26
|
-
hash: url.hash,
|
|
27
|
-
search: url.search,
|
|
28
|
-
pathname: url.pathname,
|
|
29
|
-
path: `${url.pathname || ""}${url.search || ""}`,
|
|
30
|
-
href: url.href,
|
|
31
|
-
};
|
|
32
|
-
if (url.port !== "") {
|
|
33
|
-
options.port = Number(url.port);
|
|
34
|
-
}
|
|
35
|
-
if (url.username || url.password) {
|
|
36
|
-
options.auth = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`;
|
|
37
|
-
}
|
|
38
|
-
return options;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { NetworkUtils };
|
|
43
|
-
//# sourceMappingURL=NetworkUtils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkUtils.mjs","sources":["../../src/utils/NetworkUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;MAgBU,YAAY,CAAA;AACrB,IAAA,OAAO,kBAAkB,CACrB,OAA+B,EAC/B,IAAO,EACP,UAAkB,EAAA;QAElB,OAAO;AACH,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,MAAM,EAAE,UAAU;SACrB,CAAC;IACN,CAAC;AAED;;;;AAIG;IACH,OAAO,gBAAgB,CAAC,GAAQ,EAAA;AAC5B,QAAA,MAAM,OAAO,GAA4B;YACrC,QAAQ,EAAE,GAAG,CAAC,QAAQ;AACtB,YAAA,QAAQ,EACJ,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;kBACtC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;kBACzB,GAAG,CAAC,QAAQ;YACtB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;AACtB,YAAA,IAAI,EAAE,CAAA,EAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAA,EAAG,GAAG,CAAC,MAAM,IAAI,EAAE,CAAA,CAAE;YAChD,IAAI,EAAE,GAAG,CAAC,IAAI;SACjB,CAAC;AACF,QAAA,IAAI,GAAG,CAAC,IAAI,KAAK,EAAE,EAAE;YACjB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,QAAA,CAAA;AACD,QAAA,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE;AAC9B,YAAA,OAAO,CAAC,IAAI,GAAG,GAAG,kBAAkB,CAChC,GAAG,CAAC,QAAQ,CACf,CAAA,CAAA,EAAI,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3C,QAAA,CAAA;AACD,QAAA,OAAO,OAAO,CAAC;IACnB,CAAC;AACJ;;;;"}
|