@azure/msal-node 2.12.0 → 2.13.1
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/ITokenCache.d.ts +15 -15
- package/dist/cache/NodeStorage.cjs +423 -423
- package/dist/cache/NodeStorage.d.ts +193 -193
- package/dist/cache/NodeStorage.mjs +423 -423
- package/dist/cache/TokenCache.cjs +265 -265
- package/dist/cache/TokenCache.d.ts +90 -90
- package/dist/cache/TokenCache.mjs +265 -265
- package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
- package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
- package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
- package/dist/cache/distributed/ICacheClient.d.ts +17 -17
- package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
- package/dist/cache/serializer/Deserializer.cjs +167 -167
- package/dist/cache/serializer/Deserializer.d.ts +42 -42
- package/dist/cache/serializer/Deserializer.mjs +167 -167
- package/dist/cache/serializer/Serializer.cjs +137 -137
- package/dist/cache/serializer/Serializer.d.ts +39 -39
- package/dist/cache/serializer/Serializer.mjs +137 -137
- package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
- package/dist/client/ClientApplication.cjs +334 -334
- package/dist/client/ClientApplication.d.ts +143 -143
- package/dist/client/ClientApplication.mjs +334 -334
- package/dist/client/ClientAssertion.cjs +143 -143
- package/dist/client/ClientAssertion.d.ts +55 -55
- package/dist/client/ClientAssertion.mjs +143 -143
- package/dist/client/ClientCredentialClient.cjs +194 -194
- package/dist/client/ClientCredentialClient.d.ts +33 -33
- package/dist/client/ClientCredentialClient.mjs +194 -194
- package/dist/client/ConfidentialClientApplication.cjs +169 -169
- package/dist/client/ConfidentialClientApplication.cjs.map +1 -1
- package/dist/client/ConfidentialClientApplication.d.ts +58 -58
- package/dist/client/ConfidentialClientApplication.mjs +169 -169
- package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
- package/dist/client/DeviceCodeClient.cjs +207 -207
- package/dist/client/DeviceCodeClient.d.ts +53 -53
- package/dist/client/DeviceCodeClient.mjs +207 -207
- package/dist/client/IConfidentialClientApplication.d.ts +39 -39
- package/dist/client/IPublicClientApplication.d.ts +42 -42
- package/dist/client/ManagedIdentityApplication.cjs +84 -84
- package/dist/client/ManagedIdentityApplication.d.ts +30 -30
- package/dist/client/ManagedIdentityApplication.mjs +84 -84
- package/dist/client/ManagedIdentityClient.cjs +60 -60
- package/dist/client/ManagedIdentityClient.d.ts +27 -27
- package/dist/client/ManagedIdentityClient.mjs +60 -60
- package/dist/client/ManagedIdentitySources/AppService.cjs +45 -45
- package/dist/client/ManagedIdentitySources/AppService.d.ts +17 -17
- package/dist/client/ManagedIdentitySources/AppService.mjs +45 -45
- package/dist/client/ManagedIdentitySources/AzureArc.cjs +155 -120
- package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts +27 -23
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +155 -122
- package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +122 -122
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +30 -30
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +122 -122
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.cjs +38 -38
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts +16 -16
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +38 -38
- package/dist/client/ManagedIdentitySources/Imds.cjs +43 -43
- package/dist/client/ManagedIdentitySources/Imds.d.ts +12 -12
- package/dist/client/ManagedIdentitySources/Imds.mjs +43 -43
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +54 -54
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +17 -17
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +54 -54
- package/dist/client/OnBehalfOfClient.cjs +202 -202
- package/dist/client/OnBehalfOfClient.d.ts +47 -47
- package/dist/client/OnBehalfOfClient.mjs +202 -202
- package/dist/client/PublicClientApplication.cjs +237 -237
- package/dist/client/PublicClientApplication.d.ts +72 -72
- package/dist/client/PublicClientApplication.mjs +237 -237
- package/dist/client/UsernamePasswordClient.cjs +95 -95
- package/dist/client/UsernamePasswordClient.d.ts +25 -25
- package/dist/client/UsernamePasswordClient.mjs +95 -95
- package/dist/config/Configuration.cjs +106 -106
- package/dist/config/Configuration.d.ts +131 -131
- package/dist/config/Configuration.mjs +106 -106
- package/dist/config/ManagedIdentityId.cjs +48 -48
- package/dist/config/ManagedIdentityId.d.ts +11 -11
- package/dist/config/ManagedIdentityId.mjs +48 -48
- package/dist/config/ManagedIdentityRequestParameters.cjs +28 -28
- package/dist/config/ManagedIdentityRequestParameters.d.ts +11 -11
- package/dist/config/ManagedIdentityRequestParameters.mjs +28 -28
- package/dist/crypto/CryptoProvider.cjs +89 -89
- package/dist/crypto/CryptoProvider.d.ts +62 -62
- package/dist/crypto/CryptoProvider.mjs +89 -89
- package/dist/crypto/GuidGenerator.cjs +22 -22
- package/dist/crypto/GuidGenerator.d.ts +14 -14
- package/dist/crypto/GuidGenerator.mjs +22 -22
- package/dist/crypto/HashUtils.cjs +13 -13
- package/dist/crypto/HashUtils.d.ts +8 -8
- package/dist/crypto/HashUtils.mjs +13 -13
- package/dist/crypto/PkceGenerator.cjs +49 -49
- package/dist/crypto/PkceGenerator.d.ts +22 -22
- package/dist/crypto/PkceGenerator.mjs +49 -49
- package/dist/error/ManagedIdentityError.cjs +41 -41
- package/dist/error/ManagedIdentityError.d.ts +30 -30
- package/dist/error/ManagedIdentityError.mjs +41 -41
- package/dist/error/ManagedIdentityErrorCodes.cjs +24 -24
- package/dist/error/ManagedIdentityErrorCodes.d.ts +22 -22
- package/dist/error/ManagedIdentityErrorCodes.mjs +24 -24
- package/dist/error/NodeAuthError.cjs +95 -95
- package/dist/error/NodeAuthError.d.ts +73 -73
- package/dist/error/NodeAuthError.mjs +95 -95
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +45 -45
- package/dist/index.mjs +1 -1
- package/dist/internals.cjs +8 -8
- package/dist/internals.d.ts +6 -6
- package/dist/internals.mjs +8 -8
- package/dist/network/HttpClient.cjs +281 -281
- package/dist/network/HttpClient.d.ts +25 -25
- package/dist/network/HttpClient.mjs +281 -281
- package/dist/network/HttpClientWithRetries.cjs +34 -34
- package/dist/network/HttpClientWithRetries.d.ts +11 -11
- package/dist/network/HttpClientWithRetries.mjs +34 -34
- package/dist/network/ILoopbackClient.d.ts +10 -10
- package/dist/network/LoopbackClient.cjs +81 -77
- package/dist/network/LoopbackClient.cjs.map +1 -1
- package/dist/network/LoopbackClient.d.ts +21 -21
- package/dist/network/LoopbackClient.d.ts.map +1 -1
- package/dist/network/LoopbackClient.mjs +81 -77
- package/dist/network/LoopbackClient.mjs.map +1 -1
- package/dist/packageMetadata.cjs +4 -4
- package/dist/packageMetadata.d.ts +2 -2
- package/dist/packageMetadata.mjs +4 -4
- package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
- package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
- package/dist/request/ClientCredentialRequest.d.ts +14 -14
- package/dist/request/DeviceCodeRequest.d.ts +15 -15
- package/dist/request/InteractiveRequest.d.ts +22 -22
- package/dist/request/ManagedIdentityRequest.d.ts +8 -8
- package/dist/request/ManagedIdentityRequestParams.d.ts +9 -9
- package/dist/request/OnBehalfOfRequest.d.ts +14 -14
- package/dist/request/RefreshTokenRequest.d.ts +17 -17
- package/dist/request/SignOutRequest.d.ts +5 -5
- package/dist/request/SilentFlowRequest.d.ts +16 -16
- package/dist/request/UsernamePasswordRequest.d.ts +19 -19
- package/dist/response/ManagedIdentityTokenResponse.d.ts +34 -34
- package/dist/retry/IHttpRetryPolicy.d.ts +5 -5
- package/dist/retry/LinearRetryPolicy.cjs +40 -40
- package/dist/retry/LinearRetryPolicy.d.ts +11 -11
- package/dist/retry/LinearRetryPolicy.mjs +40 -40
- package/dist/utils/Constants.cjs +136 -136
- package/dist/utils/Constants.d.ts +141 -141
- package/dist/utils/Constants.mjs +136 -136
- package/dist/utils/EncodingUtils.cjs +44 -44
- package/dist/utils/EncodingUtils.d.ts +26 -26
- package/dist/utils/EncodingUtils.mjs +44 -44
- package/dist/utils/NetworkUtils.cjs +38 -38
- package/dist/utils/NetworkUtils.d.ts +5 -5
- package/dist/utils/NetworkUtils.mjs +38 -38
- package/package.json +2 -2
- package/src/client/ConfidentialClientApplication.ts +3 -3
- package/src/client/ManagedIdentitySources/AzureArc.ts +80 -25
- package/src/network/LoopbackClient.ts +7 -1
- package/src/packageMetadata.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.1 2024-08-29 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { Constants, ProtocolMode, AzureCloudInstance, LogLevel } from '@azure/msal-common';
|
|
4
4
|
import { HttpClient } from '../network/HttpClient.mjs';
|
|
@@ -8,111 +8,111 @@ import { LinearRetryPolicy } from '../retry/LinearRetryPolicy.mjs';
|
|
|
8
8
|
import { HttpClientWithRetries } from '../network/HttpClientWithRetries.mjs';
|
|
9
9
|
import { NodeAuthError } from '../error/NodeAuthError.mjs';
|
|
10
10
|
|
|
11
|
-
/*
|
|
12
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13
|
-
* Licensed under the MIT License.
|
|
14
|
-
*/
|
|
15
|
-
const DEFAULT_AUTH_OPTIONS = {
|
|
16
|
-
clientId: Constants.EMPTY_STRING,
|
|
17
|
-
authority: Constants.DEFAULT_AUTHORITY,
|
|
18
|
-
clientSecret: Constants.EMPTY_STRING,
|
|
19
|
-
clientAssertion: Constants.EMPTY_STRING,
|
|
20
|
-
clientCertificate: {
|
|
21
|
-
thumbprint: Constants.EMPTY_STRING,
|
|
22
|
-
thumbprintSha256: Constants.EMPTY_STRING,
|
|
23
|
-
privateKey: Constants.EMPTY_STRING,
|
|
24
|
-
x5c: Constants.EMPTY_STRING,
|
|
25
|
-
},
|
|
26
|
-
knownAuthorities: [],
|
|
27
|
-
cloudDiscoveryMetadata: Constants.EMPTY_STRING,
|
|
28
|
-
authorityMetadata: Constants.EMPTY_STRING,
|
|
29
|
-
clientCapabilities: [],
|
|
30
|
-
protocolMode: ProtocolMode.AAD,
|
|
31
|
-
azureCloudOptions: {
|
|
32
|
-
azureCloudInstance: AzureCloudInstance.None,
|
|
33
|
-
tenant: Constants.EMPTY_STRING,
|
|
34
|
-
},
|
|
35
|
-
skipAuthorityMetadataCache: false,
|
|
36
|
-
};
|
|
37
|
-
const DEFAULT_CACHE_OPTIONS = {
|
|
38
|
-
claimsBasedCachingEnabled: false,
|
|
39
|
-
};
|
|
40
|
-
const DEFAULT_LOGGER_OPTIONS = {
|
|
41
|
-
loggerCallback: () => {
|
|
42
|
-
// allow users to not set logger call back
|
|
43
|
-
},
|
|
44
|
-
piiLoggingEnabled: false,
|
|
45
|
-
logLevel: LogLevel.Info,
|
|
46
|
-
};
|
|
47
|
-
const DEFAULT_SYSTEM_OPTIONS = {
|
|
48
|
-
loggerOptions: DEFAULT_LOGGER_OPTIONS,
|
|
49
|
-
networkClient: new HttpClient(),
|
|
50
|
-
proxyUrl: Constants.EMPTY_STRING,
|
|
51
|
-
customAgentOptions: {},
|
|
52
|
-
disableInternalRetries: false,
|
|
53
|
-
};
|
|
54
|
-
const DEFAULT_TELEMETRY_OPTIONS = {
|
|
55
|
-
application: {
|
|
56
|
-
appName: Constants.EMPTY_STRING,
|
|
57
|
-
appVersion: Constants.EMPTY_STRING,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Sets the default options when not explicitly configured from app developer
|
|
62
|
-
*
|
|
63
|
-
* @param auth - Authentication options
|
|
64
|
-
* @param cache - Cache options
|
|
65
|
-
* @param system - System options
|
|
66
|
-
* @param telemetry - Telemetry options
|
|
67
|
-
*
|
|
68
|
-
* @returns Configuration
|
|
69
|
-
* @internal
|
|
70
|
-
*/
|
|
71
|
-
function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) {
|
|
72
|
-
const systemOptions = {
|
|
73
|
-
...DEFAULT_SYSTEM_OPTIONS,
|
|
74
|
-
networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions),
|
|
75
|
-
loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
|
|
76
|
-
disableInternalRetries: system?.disableInternalRetries || false,
|
|
77
|
-
};
|
|
78
|
-
// if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided
|
|
79
|
-
if (!!auth.clientCertificate &&
|
|
80
|
-
!!!auth.clientCertificate.thumbprint &&
|
|
81
|
-
!!!auth.clientCertificate.thumbprintSha256) {
|
|
82
|
-
throw NodeAuthError.createStateNotFoundError();
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
auth: { ...DEFAULT_AUTH_OPTIONS, ...auth },
|
|
86
|
-
broker: { ...broker },
|
|
87
|
-
cache: { ...DEFAULT_CACHE_OPTIONS, ...cache },
|
|
88
|
-
system: { ...systemOptions, ...system },
|
|
89
|
-
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }) {
|
|
93
|
-
const managedIdentityId = new ManagedIdentityId(managedIdentityIdParams);
|
|
94
|
-
const loggerOptions = system?.loggerOptions || DEFAULT_LOGGER_OPTIONS;
|
|
95
|
-
let networkClient;
|
|
96
|
-
// use developer provided network client if passed in
|
|
97
|
-
if (system?.networkClient) {
|
|
98
|
-
networkClient = system.networkClient;
|
|
99
|
-
// otherwise, create a new one
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
networkClient = new HttpClient(system?.proxyUrl, system?.customAgentOptions);
|
|
103
|
-
}
|
|
104
|
-
// wrap the network client with a retry policy if the developer has not disabled the option to do so
|
|
105
|
-
if (!system?.disableInternalRetries) {
|
|
106
|
-
const linearRetryPolicy = new LinearRetryPolicy(MANAGED_IDENTITY_MAX_RETRIES, MANAGED_IDENTITY_RETRY_DELAY, MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON);
|
|
107
|
-
networkClient = new HttpClientWithRetries(networkClient, linearRetryPolicy);
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
managedIdentityId: managedIdentityId,
|
|
111
|
-
system: {
|
|
112
|
-
loggerOptions,
|
|
113
|
-
networkClient,
|
|
114
|
-
},
|
|
115
|
-
};
|
|
11
|
+
/*
|
|
12
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13
|
+
* Licensed under the MIT License.
|
|
14
|
+
*/
|
|
15
|
+
const DEFAULT_AUTH_OPTIONS = {
|
|
16
|
+
clientId: Constants.EMPTY_STRING,
|
|
17
|
+
authority: Constants.DEFAULT_AUTHORITY,
|
|
18
|
+
clientSecret: Constants.EMPTY_STRING,
|
|
19
|
+
clientAssertion: Constants.EMPTY_STRING,
|
|
20
|
+
clientCertificate: {
|
|
21
|
+
thumbprint: Constants.EMPTY_STRING,
|
|
22
|
+
thumbprintSha256: Constants.EMPTY_STRING,
|
|
23
|
+
privateKey: Constants.EMPTY_STRING,
|
|
24
|
+
x5c: Constants.EMPTY_STRING,
|
|
25
|
+
},
|
|
26
|
+
knownAuthorities: [],
|
|
27
|
+
cloudDiscoveryMetadata: Constants.EMPTY_STRING,
|
|
28
|
+
authorityMetadata: Constants.EMPTY_STRING,
|
|
29
|
+
clientCapabilities: [],
|
|
30
|
+
protocolMode: ProtocolMode.AAD,
|
|
31
|
+
azureCloudOptions: {
|
|
32
|
+
azureCloudInstance: AzureCloudInstance.None,
|
|
33
|
+
tenant: Constants.EMPTY_STRING,
|
|
34
|
+
},
|
|
35
|
+
skipAuthorityMetadataCache: false,
|
|
36
|
+
};
|
|
37
|
+
const DEFAULT_CACHE_OPTIONS = {
|
|
38
|
+
claimsBasedCachingEnabled: false,
|
|
39
|
+
};
|
|
40
|
+
const DEFAULT_LOGGER_OPTIONS = {
|
|
41
|
+
loggerCallback: () => {
|
|
42
|
+
// allow users to not set logger call back
|
|
43
|
+
},
|
|
44
|
+
piiLoggingEnabled: false,
|
|
45
|
+
logLevel: LogLevel.Info,
|
|
46
|
+
};
|
|
47
|
+
const DEFAULT_SYSTEM_OPTIONS = {
|
|
48
|
+
loggerOptions: DEFAULT_LOGGER_OPTIONS,
|
|
49
|
+
networkClient: new HttpClient(),
|
|
50
|
+
proxyUrl: Constants.EMPTY_STRING,
|
|
51
|
+
customAgentOptions: {},
|
|
52
|
+
disableInternalRetries: false,
|
|
53
|
+
};
|
|
54
|
+
const DEFAULT_TELEMETRY_OPTIONS = {
|
|
55
|
+
application: {
|
|
56
|
+
appName: Constants.EMPTY_STRING,
|
|
57
|
+
appVersion: Constants.EMPTY_STRING,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Sets the default options when not explicitly configured from app developer
|
|
62
|
+
*
|
|
63
|
+
* @param auth - Authentication options
|
|
64
|
+
* @param cache - Cache options
|
|
65
|
+
* @param system - System options
|
|
66
|
+
* @param telemetry - Telemetry options
|
|
67
|
+
*
|
|
68
|
+
* @returns Configuration
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) {
|
|
72
|
+
const systemOptions = {
|
|
73
|
+
...DEFAULT_SYSTEM_OPTIONS,
|
|
74
|
+
networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions),
|
|
75
|
+
loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
|
|
76
|
+
disableInternalRetries: system?.disableInternalRetries || false,
|
|
77
|
+
};
|
|
78
|
+
// if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided
|
|
79
|
+
if (!!auth.clientCertificate &&
|
|
80
|
+
!!!auth.clientCertificate.thumbprint &&
|
|
81
|
+
!!!auth.clientCertificate.thumbprintSha256) {
|
|
82
|
+
throw NodeAuthError.createStateNotFoundError();
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
auth: { ...DEFAULT_AUTH_OPTIONS, ...auth },
|
|
86
|
+
broker: { ...broker },
|
|
87
|
+
cache: { ...DEFAULT_CACHE_OPTIONS, ...cache },
|
|
88
|
+
system: { ...systemOptions, ...system },
|
|
89
|
+
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }) {
|
|
93
|
+
const managedIdentityId = new ManagedIdentityId(managedIdentityIdParams);
|
|
94
|
+
const loggerOptions = system?.loggerOptions || DEFAULT_LOGGER_OPTIONS;
|
|
95
|
+
let networkClient;
|
|
96
|
+
// use developer provided network client if passed in
|
|
97
|
+
if (system?.networkClient) {
|
|
98
|
+
networkClient = system.networkClient;
|
|
99
|
+
// otherwise, create a new one
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
networkClient = new HttpClient(system?.proxyUrl, system?.customAgentOptions);
|
|
103
|
+
}
|
|
104
|
+
// wrap the network client with a retry policy if the developer has not disabled the option to do so
|
|
105
|
+
if (!system?.disableInternalRetries) {
|
|
106
|
+
const linearRetryPolicy = new LinearRetryPolicy(MANAGED_IDENTITY_MAX_RETRIES, MANAGED_IDENTITY_RETRY_DELAY, MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON);
|
|
107
|
+
networkClient = new HttpClientWithRetries(networkClient, linearRetryPolicy);
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
managedIdentityId: managedIdentityId,
|
|
111
|
+
system: {
|
|
112
|
+
loggerOptions,
|
|
113
|
+
networkClient,
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
export { buildAppConfiguration, buildManagedIdentityConfiguration };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.1 2024-08-29 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -6,53 +6,53 @@ var ManagedIdentityError = require('../error/ManagedIdentityError.cjs');
|
|
|
6
6
|
var Constants = require('../utils/Constants.cjs');
|
|
7
7
|
var ManagedIdentityErrorCodes = require('../error/ManagedIdentityErrorCodes.cjs');
|
|
8
8
|
|
|
9
|
-
/*
|
|
10
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
|
-
* Licensed under the MIT License.
|
|
12
|
-
*/
|
|
13
|
-
class ManagedIdentityId {
|
|
14
|
-
get id() {
|
|
15
|
-
return this._id;
|
|
16
|
-
}
|
|
17
|
-
set id(value) {
|
|
18
|
-
this._id = value;
|
|
19
|
-
}
|
|
20
|
-
get idType() {
|
|
21
|
-
return this._idType;
|
|
22
|
-
}
|
|
23
|
-
set idType(value) {
|
|
24
|
-
this._idType = value;
|
|
25
|
-
}
|
|
26
|
-
constructor(managedIdentityIdParams) {
|
|
27
|
-
const userAssignedClientId = managedIdentityIdParams?.userAssignedClientId;
|
|
28
|
-
const userAssignedResourceId = managedIdentityIdParams?.userAssignedResourceId;
|
|
29
|
-
const userAssignedObjectId = managedIdentityIdParams?.userAssignedObjectId;
|
|
30
|
-
if (userAssignedClientId) {
|
|
31
|
-
if (userAssignedResourceId || userAssignedObjectId) {
|
|
32
|
-
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
|
|
33
|
-
}
|
|
34
|
-
this.id = userAssignedClientId;
|
|
35
|
-
this.idType = Constants.ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID;
|
|
36
|
-
}
|
|
37
|
-
else if (userAssignedResourceId) {
|
|
38
|
-
if (userAssignedClientId || userAssignedObjectId) {
|
|
39
|
-
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
|
|
40
|
-
}
|
|
41
|
-
this.id = userAssignedResourceId;
|
|
42
|
-
this.idType = Constants.ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID;
|
|
43
|
-
}
|
|
44
|
-
else if (userAssignedObjectId) {
|
|
45
|
-
if (userAssignedClientId || userAssignedResourceId) {
|
|
46
|
-
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
|
|
47
|
-
}
|
|
48
|
-
this.id = userAssignedObjectId;
|
|
49
|
-
this.idType = Constants.ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID;
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.id = Constants.DEFAULT_MANAGED_IDENTITY_ID;
|
|
53
|
-
this.idType = Constants.ManagedIdentityIdType.SYSTEM_ASSIGNED;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
9
|
+
/*
|
|
10
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
|
+
* Licensed under the MIT License.
|
|
12
|
+
*/
|
|
13
|
+
class ManagedIdentityId {
|
|
14
|
+
get id() {
|
|
15
|
+
return this._id;
|
|
16
|
+
}
|
|
17
|
+
set id(value) {
|
|
18
|
+
this._id = value;
|
|
19
|
+
}
|
|
20
|
+
get idType() {
|
|
21
|
+
return this._idType;
|
|
22
|
+
}
|
|
23
|
+
set idType(value) {
|
|
24
|
+
this._idType = value;
|
|
25
|
+
}
|
|
26
|
+
constructor(managedIdentityIdParams) {
|
|
27
|
+
const userAssignedClientId = managedIdentityIdParams?.userAssignedClientId;
|
|
28
|
+
const userAssignedResourceId = managedIdentityIdParams?.userAssignedResourceId;
|
|
29
|
+
const userAssignedObjectId = managedIdentityIdParams?.userAssignedObjectId;
|
|
30
|
+
if (userAssignedClientId) {
|
|
31
|
+
if (userAssignedResourceId || userAssignedObjectId) {
|
|
32
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
|
|
33
|
+
}
|
|
34
|
+
this.id = userAssignedClientId;
|
|
35
|
+
this.idType = Constants.ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID;
|
|
36
|
+
}
|
|
37
|
+
else if (userAssignedResourceId) {
|
|
38
|
+
if (userAssignedClientId || userAssignedObjectId) {
|
|
39
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
|
|
40
|
+
}
|
|
41
|
+
this.id = userAssignedResourceId;
|
|
42
|
+
this.idType = Constants.ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID;
|
|
43
|
+
}
|
|
44
|
+
else if (userAssignedObjectId) {
|
|
45
|
+
if (userAssignedClientId || userAssignedResourceId) {
|
|
46
|
+
throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
|
|
47
|
+
}
|
|
48
|
+
this.id = userAssignedObjectId;
|
|
49
|
+
this.idType = Constants.ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.id = Constants.DEFAULT_MANAGED_IDENTITY_ID;
|
|
53
|
+
this.idType = Constants.ManagedIdentityIdType.SYSTEM_ASSIGNED;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
exports.ManagedIdentityId = ManagedIdentityId;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ManagedIdentityIdType } from "../utils/Constants";
|
|
2
|
-
import { ManagedIdentityIdParams } from "./Configuration";
|
|
3
|
-
export declare class ManagedIdentityId {
|
|
4
|
-
private _id;
|
|
5
|
-
get id(): string;
|
|
6
|
-
private set id(value);
|
|
7
|
-
private _idType;
|
|
8
|
-
get idType(): ManagedIdentityIdType;
|
|
9
|
-
private set idType(value);
|
|
10
|
-
constructor(managedIdentityIdParams?: ManagedIdentityIdParams);
|
|
11
|
-
}
|
|
1
|
+
import { ManagedIdentityIdType } from "../utils/Constants";
|
|
2
|
+
import { ManagedIdentityIdParams } from "./Configuration";
|
|
3
|
+
export declare class ManagedIdentityId {
|
|
4
|
+
private _id;
|
|
5
|
+
get id(): string;
|
|
6
|
+
private set id(value);
|
|
7
|
+
private _idType;
|
|
8
|
+
get idType(): ManagedIdentityIdType;
|
|
9
|
+
private set idType(value);
|
|
10
|
+
constructor(managedIdentityIdParams?: ManagedIdentityIdParams);
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=ManagedIdentityId.d.ts.map
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.1 2024-08-29 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { createManagedIdentityError } from '../error/ManagedIdentityError.mjs';
|
|
4
4
|
import { ManagedIdentityIdType, DEFAULT_MANAGED_IDENTITY_ID } from '../utils/Constants.mjs';
|
|
5
5
|
import { invalidManagedIdentityIdType } from '../error/ManagedIdentityErrorCodes.mjs';
|
|
6
6
|
|
|
7
|
-
/*
|
|
8
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
* Licensed under the MIT License.
|
|
10
|
-
*/
|
|
11
|
-
class ManagedIdentityId {
|
|
12
|
-
get id() {
|
|
13
|
-
return this._id;
|
|
14
|
-
}
|
|
15
|
-
set id(value) {
|
|
16
|
-
this._id = value;
|
|
17
|
-
}
|
|
18
|
-
get idType() {
|
|
19
|
-
return this._idType;
|
|
20
|
-
}
|
|
21
|
-
set idType(value) {
|
|
22
|
-
this._idType = value;
|
|
23
|
-
}
|
|
24
|
-
constructor(managedIdentityIdParams) {
|
|
25
|
-
const userAssignedClientId = managedIdentityIdParams?.userAssignedClientId;
|
|
26
|
-
const userAssignedResourceId = managedIdentityIdParams?.userAssignedResourceId;
|
|
27
|
-
const userAssignedObjectId = managedIdentityIdParams?.userAssignedObjectId;
|
|
28
|
-
if (userAssignedClientId) {
|
|
29
|
-
if (userAssignedResourceId || userAssignedObjectId) {
|
|
30
|
-
throw createManagedIdentityError(invalidManagedIdentityIdType);
|
|
31
|
-
}
|
|
32
|
-
this.id = userAssignedClientId;
|
|
33
|
-
this.idType = ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID;
|
|
34
|
-
}
|
|
35
|
-
else if (userAssignedResourceId) {
|
|
36
|
-
if (userAssignedClientId || userAssignedObjectId) {
|
|
37
|
-
throw createManagedIdentityError(invalidManagedIdentityIdType);
|
|
38
|
-
}
|
|
39
|
-
this.id = userAssignedResourceId;
|
|
40
|
-
this.idType = ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID;
|
|
41
|
-
}
|
|
42
|
-
else if (userAssignedObjectId) {
|
|
43
|
-
if (userAssignedClientId || userAssignedResourceId) {
|
|
44
|
-
throw createManagedIdentityError(invalidManagedIdentityIdType);
|
|
45
|
-
}
|
|
46
|
-
this.id = userAssignedObjectId;
|
|
47
|
-
this.idType = ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this.id = DEFAULT_MANAGED_IDENTITY_ID;
|
|
51
|
-
this.idType = ManagedIdentityIdType.SYSTEM_ASSIGNED;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License.
|
|
10
|
+
*/
|
|
11
|
+
class ManagedIdentityId {
|
|
12
|
+
get id() {
|
|
13
|
+
return this._id;
|
|
14
|
+
}
|
|
15
|
+
set id(value) {
|
|
16
|
+
this._id = value;
|
|
17
|
+
}
|
|
18
|
+
get idType() {
|
|
19
|
+
return this._idType;
|
|
20
|
+
}
|
|
21
|
+
set idType(value) {
|
|
22
|
+
this._idType = value;
|
|
23
|
+
}
|
|
24
|
+
constructor(managedIdentityIdParams) {
|
|
25
|
+
const userAssignedClientId = managedIdentityIdParams?.userAssignedClientId;
|
|
26
|
+
const userAssignedResourceId = managedIdentityIdParams?.userAssignedResourceId;
|
|
27
|
+
const userAssignedObjectId = managedIdentityIdParams?.userAssignedObjectId;
|
|
28
|
+
if (userAssignedClientId) {
|
|
29
|
+
if (userAssignedResourceId || userAssignedObjectId) {
|
|
30
|
+
throw createManagedIdentityError(invalidManagedIdentityIdType);
|
|
31
|
+
}
|
|
32
|
+
this.id = userAssignedClientId;
|
|
33
|
+
this.idType = ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID;
|
|
34
|
+
}
|
|
35
|
+
else if (userAssignedResourceId) {
|
|
36
|
+
if (userAssignedClientId || userAssignedObjectId) {
|
|
37
|
+
throw createManagedIdentityError(invalidManagedIdentityIdType);
|
|
38
|
+
}
|
|
39
|
+
this.id = userAssignedResourceId;
|
|
40
|
+
this.idType = ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID;
|
|
41
|
+
}
|
|
42
|
+
else if (userAssignedObjectId) {
|
|
43
|
+
if (userAssignedClientId || userAssignedResourceId) {
|
|
44
|
+
throw createManagedIdentityError(invalidManagedIdentityIdType);
|
|
45
|
+
}
|
|
46
|
+
this.id = userAssignedObjectId;
|
|
47
|
+
this.idType = ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.id = DEFAULT_MANAGED_IDENTITY_ID;
|
|
51
|
+
this.idType = ManagedIdentityIdType.SYSTEM_ASSIGNED;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export { ManagedIdentityId };
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.1 2024-08-29 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
var msalCommon = require('@azure/msal-common');
|
|
6
6
|
|
|
7
|
-
/*
|
|
8
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
* Licensed under the MIT License.
|
|
10
|
-
*/
|
|
11
|
-
class ManagedIdentityRequestParameters {
|
|
12
|
-
constructor(httpMethod, endpoint) {
|
|
13
|
-
this.httpMethod = httpMethod;
|
|
14
|
-
this._baseEndpoint = endpoint;
|
|
15
|
-
this.headers = {};
|
|
16
|
-
this.bodyParameters = {};
|
|
17
|
-
this.queryParameters = {};
|
|
18
|
-
}
|
|
19
|
-
computeUri() {
|
|
20
|
-
const parameterBuilder = new msalCommon.RequestParameterBuilder();
|
|
21
|
-
if (this.queryParameters) {
|
|
22
|
-
parameterBuilder.addExtraQueryParameters(this.queryParameters);
|
|
23
|
-
}
|
|
24
|
-
const queryParametersString = parameterBuilder.createQueryString();
|
|
25
|
-
return msalCommon.UrlString.appendQueryString(this._baseEndpoint, queryParametersString);
|
|
26
|
-
}
|
|
27
|
-
computeParametersBodyString() {
|
|
28
|
-
const parameterBuilder = new msalCommon.RequestParameterBuilder();
|
|
29
|
-
if (this.bodyParameters) {
|
|
30
|
-
parameterBuilder.addExtraQueryParameters(this.bodyParameters);
|
|
31
|
-
}
|
|
32
|
-
return parameterBuilder.createQueryString();
|
|
33
|
-
}
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License.
|
|
10
|
+
*/
|
|
11
|
+
class ManagedIdentityRequestParameters {
|
|
12
|
+
constructor(httpMethod, endpoint) {
|
|
13
|
+
this.httpMethod = httpMethod;
|
|
14
|
+
this._baseEndpoint = endpoint;
|
|
15
|
+
this.headers = {};
|
|
16
|
+
this.bodyParameters = {};
|
|
17
|
+
this.queryParameters = {};
|
|
18
|
+
}
|
|
19
|
+
computeUri() {
|
|
20
|
+
const parameterBuilder = new msalCommon.RequestParameterBuilder();
|
|
21
|
+
if (this.queryParameters) {
|
|
22
|
+
parameterBuilder.addExtraQueryParameters(this.queryParameters);
|
|
23
|
+
}
|
|
24
|
+
const queryParametersString = parameterBuilder.createQueryString();
|
|
25
|
+
return msalCommon.UrlString.appendQueryString(this._baseEndpoint, queryParametersString);
|
|
26
|
+
}
|
|
27
|
+
computeParametersBodyString() {
|
|
28
|
+
const parameterBuilder = new msalCommon.RequestParameterBuilder();
|
|
29
|
+
if (this.bodyParameters) {
|
|
30
|
+
parameterBuilder.addExtraQueryParameters(this.bodyParameters);
|
|
31
|
+
}
|
|
32
|
+
return parameterBuilder.createQueryString();
|
|
33
|
+
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
exports.ManagedIdentityRequestParameters = ManagedIdentityRequestParameters;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { HttpMethod } from "../utils/Constants";
|
|
2
|
-
export declare class ManagedIdentityRequestParameters {
|
|
3
|
-
private _baseEndpoint;
|
|
4
|
-
httpMethod: HttpMethod;
|
|
5
|
-
headers: Record<string, string>;
|
|
6
|
-
bodyParameters: Record<string, string>;
|
|
7
|
-
queryParameters: Record<string, string>;
|
|
8
|
-
constructor(httpMethod: HttpMethod, endpoint: string);
|
|
9
|
-
computeUri(): string;
|
|
10
|
-
computeParametersBodyString(): string;
|
|
11
|
-
}
|
|
1
|
+
import { HttpMethod } from "../utils/Constants";
|
|
2
|
+
export declare class ManagedIdentityRequestParameters {
|
|
3
|
+
private _baseEndpoint;
|
|
4
|
+
httpMethod: HttpMethod;
|
|
5
|
+
headers: Record<string, string>;
|
|
6
|
+
bodyParameters: Record<string, string>;
|
|
7
|
+
queryParameters: Record<string, string>;
|
|
8
|
+
constructor(httpMethod: HttpMethod, endpoint: string);
|
|
9
|
+
computeUri(): string;
|
|
10
|
+
computeParametersBodyString(): string;
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=ManagedIdentityRequestParameters.d.ts.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.
|
|
1
|
+
/*! @azure/msal-node v2.13.1 2024-08-29 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { RequestParameterBuilder, UrlString } from '@azure/msal-common';
|
|
4
4
|
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
-
* Licensed under the MIT License.
|
|
8
|
-
*/
|
|
9
|
-
class ManagedIdentityRequestParameters {
|
|
10
|
-
constructor(httpMethod, endpoint) {
|
|
11
|
-
this.httpMethod = httpMethod;
|
|
12
|
-
this._baseEndpoint = endpoint;
|
|
13
|
-
this.headers = {};
|
|
14
|
-
this.bodyParameters = {};
|
|
15
|
-
this.queryParameters = {};
|
|
16
|
-
}
|
|
17
|
-
computeUri() {
|
|
18
|
-
const parameterBuilder = new RequestParameterBuilder();
|
|
19
|
-
if (this.queryParameters) {
|
|
20
|
-
parameterBuilder.addExtraQueryParameters(this.queryParameters);
|
|
21
|
-
}
|
|
22
|
-
const queryParametersString = parameterBuilder.createQueryString();
|
|
23
|
-
return UrlString.appendQueryString(this._baseEndpoint, queryParametersString);
|
|
24
|
-
}
|
|
25
|
-
computeParametersBodyString() {
|
|
26
|
-
const parameterBuilder = new RequestParameterBuilder();
|
|
27
|
-
if (this.bodyParameters) {
|
|
28
|
-
parameterBuilder.addExtraQueryParameters(this.bodyParameters);
|
|
29
|
-
}
|
|
30
|
-
return parameterBuilder.createQueryString();
|
|
31
|
-
}
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
|
+
* Licensed under the MIT License.
|
|
8
|
+
*/
|
|
9
|
+
class ManagedIdentityRequestParameters {
|
|
10
|
+
constructor(httpMethod, endpoint) {
|
|
11
|
+
this.httpMethod = httpMethod;
|
|
12
|
+
this._baseEndpoint = endpoint;
|
|
13
|
+
this.headers = {};
|
|
14
|
+
this.bodyParameters = {};
|
|
15
|
+
this.queryParameters = {};
|
|
16
|
+
}
|
|
17
|
+
computeUri() {
|
|
18
|
+
const parameterBuilder = new RequestParameterBuilder();
|
|
19
|
+
if (this.queryParameters) {
|
|
20
|
+
parameterBuilder.addExtraQueryParameters(this.queryParameters);
|
|
21
|
+
}
|
|
22
|
+
const queryParametersString = parameterBuilder.createQueryString();
|
|
23
|
+
return UrlString.appendQueryString(this._baseEndpoint, queryParametersString);
|
|
24
|
+
}
|
|
25
|
+
computeParametersBodyString() {
|
|
26
|
+
const parameterBuilder = new RequestParameterBuilder();
|
|
27
|
+
if (this.bodyParameters) {
|
|
28
|
+
parameterBuilder.addExtraQueryParameters(this.bodyParameters);
|
|
29
|
+
}
|
|
30
|
+
return parameterBuilder.createQueryString();
|
|
31
|
+
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export { ManagedIdentityRequestParameters };
|