@azure/msal-node 2.6.0 → 2.7.0-alpha.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.
Files changed (210) hide show
  1. package/dist/cache/ITokenCache.d.ts +15 -15
  2. package/dist/cache/NodeStorage.cjs +423 -423
  3. package/dist/cache/NodeStorage.cjs.map +1 -1
  4. package/dist/cache/NodeStorage.d.ts +193 -193
  5. package/dist/cache/NodeStorage.d.ts.map +1 -1
  6. package/dist/cache/NodeStorage.mjs +424 -424
  7. package/dist/cache/NodeStorage.mjs.map +1 -1
  8. package/dist/cache/TokenCache.cjs +265 -265
  9. package/dist/cache/TokenCache.d.ts +90 -90
  10. package/dist/cache/TokenCache.mjs +265 -265
  11. package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
  12. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  13. package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
  14. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  15. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  16. package/dist/cache/serializer/Deserializer.cjs +170 -170
  17. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  18. package/dist/cache/serializer/Deserializer.mjs +170 -170
  19. package/dist/cache/serializer/Serializer.cjs +137 -137
  20. package/dist/cache/serializer/Serializer.d.ts +39 -39
  21. package/dist/cache/serializer/Serializer.mjs +137 -137
  22. package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
  23. package/dist/client/ClientApplication.cjs +333 -333
  24. package/dist/client/ClientApplication.d.ts +142 -142
  25. package/dist/client/ClientApplication.mjs +333 -333
  26. package/dist/client/ClientAssertion.cjs +116 -116
  27. package/dist/client/ClientAssertion.d.ts +46 -46
  28. package/dist/client/ClientAssertion.mjs +116 -116
  29. package/dist/client/ClientCredentialClient.cjs +194 -190
  30. package/dist/client/ClientCredentialClient.cjs.map +1 -1
  31. package/dist/client/ClientCredentialClient.d.ts +33 -33
  32. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  33. package/dist/client/ClientCredentialClient.mjs +195 -191
  34. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  35. package/dist/client/ConfidentialClientApplication.cjs +163 -163
  36. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  37. package/dist/client/ConfidentialClientApplication.mjs +163 -163
  38. package/dist/client/DeviceCodeClient.cjs +207 -207
  39. package/dist/client/DeviceCodeClient.d.ts +53 -53
  40. package/dist/client/DeviceCodeClient.mjs +207 -207
  41. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  42. package/dist/client/IPublicClientApplication.d.ts +42 -42
  43. package/dist/client/ManagedIdentityApplication.cjs +96 -0
  44. package/dist/client/ManagedIdentityApplication.cjs.map +1 -0
  45. package/dist/client/ManagedIdentityApplication.d.ts +24 -0
  46. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -0
  47. package/dist/client/ManagedIdentityApplication.mjs +94 -0
  48. package/dist/client/ManagedIdentityApplication.mjs.map +1 -0
  49. package/dist/client/ManagedIdentityClient.cjs +49 -0
  50. package/dist/client/ManagedIdentityClient.cjs.map +1 -0
  51. package/dist/client/ManagedIdentityClient.d.ts +25 -0
  52. package/dist/client/ManagedIdentityClient.d.ts.map +1 -0
  53. package/dist/client/ManagedIdentityClient.mjs +47 -0
  54. package/dist/client/ManagedIdentityClient.mjs.map +1 -0
  55. package/dist/client/ManagedIdentitySources/AppService.cjs +79 -0
  56. package/dist/client/ManagedIdentitySources/AppService.cjs.map +1 -0
  57. package/dist/client/ManagedIdentitySources/AppService.d.ts +17 -0
  58. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -0
  59. package/dist/client/ManagedIdentitySources/AppService.mjs +77 -0
  60. package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -0
  61. package/dist/client/ManagedIdentitySources/AzureArc.cjs +107 -0
  62. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -0
  63. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +19 -0
  64. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -0
  65. package/dist/client/ManagedIdentitySources/AzureArc.mjs +104 -0
  66. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -0
  67. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +87 -0
  68. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -0
  69. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +19 -0
  70. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -0
  71. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +85 -0
  72. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -0
  73. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +7 -0
  74. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -0
  75. package/dist/client/ManagedIdentitySources/Imds.cjs +63 -0
  76. package/dist/client/ManagedIdentitySources/Imds.cjs.map +1 -0
  77. package/dist/client/ManagedIdentitySources/Imds.d.ts +13 -0
  78. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -0
  79. package/dist/client/ManagedIdentitySources/Imds.mjs +61 -0
  80. package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -0
  81. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +7 -0
  82. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -0
  83. package/dist/client/OnBehalfOfClient.cjs +202 -202
  84. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  85. package/dist/client/OnBehalfOfClient.mjs +202 -202
  86. package/dist/client/PublicClientApplication.cjs +229 -229
  87. package/dist/client/PublicClientApplication.d.ts +71 -71
  88. package/dist/client/PublicClientApplication.mjs +229 -229
  89. package/dist/client/UsernamePasswordClient.cjs +95 -95
  90. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  91. package/dist/client/UsernamePasswordClient.mjs +95 -95
  92. package/dist/config/Configuration.cjs +88 -72
  93. package/dist/config/Configuration.cjs.map +1 -1
  94. package/dist/config/Configuration.d.ts +122 -107
  95. package/dist/config/Configuration.d.ts.map +1 -1
  96. package/dist/config/Configuration.mjs +88 -73
  97. package/dist/config/Configuration.mjs.map +1 -1
  98. package/dist/config/ManagedIdentityId.cjs +59 -0
  99. package/dist/config/ManagedIdentityId.cjs.map +1 -0
  100. package/dist/config/ManagedIdentityId.d.ts +12 -0
  101. package/dist/config/ManagedIdentityId.d.ts.map +1 -0
  102. package/dist/config/ManagedIdentityId.mjs +57 -0
  103. package/dist/config/ManagedIdentityId.mjs.map +1 -0
  104. package/dist/config/ManagedIdentityRequestParameters.cjs +38 -0
  105. package/dist/config/ManagedIdentityRequestParameters.cjs.map +1 -0
  106. package/dist/config/ManagedIdentityRequestParameters.d.ts +12 -0
  107. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -0
  108. package/dist/config/ManagedIdentityRequestParameters.mjs +36 -0
  109. package/dist/config/ManagedIdentityRequestParameters.mjs.map +1 -0
  110. package/dist/crypto/CryptoProvider.cjs +75 -75
  111. package/dist/crypto/CryptoProvider.d.ts +52 -52
  112. package/dist/crypto/CryptoProvider.mjs +75 -75
  113. package/dist/crypto/GuidGenerator.cjs +22 -22
  114. package/dist/crypto/GuidGenerator.d.ts +14 -14
  115. package/dist/crypto/GuidGenerator.mjs +22 -22
  116. package/dist/crypto/HashUtils.cjs +13 -13
  117. package/dist/crypto/HashUtils.d.ts +8 -8
  118. package/dist/crypto/HashUtils.mjs +13 -13
  119. package/dist/crypto/PkceGenerator.cjs +49 -49
  120. package/dist/crypto/PkceGenerator.d.ts +22 -22
  121. package/dist/crypto/PkceGenerator.mjs +49 -49
  122. package/dist/error/ManagedIdentityError.cjs +40 -0
  123. package/dist/error/ManagedIdentityError.cjs.map +1 -0
  124. package/dist/error/ManagedIdentityError.d.ts +22 -0
  125. package/dist/error/ManagedIdentityError.d.ts.map +1 -0
  126. package/dist/error/ManagedIdentityError.mjs +36 -0
  127. package/dist/error/ManagedIdentityError.mjs.map +1 -0
  128. package/dist/error/ManagedIdentityErrorCodes.cjs +28 -0
  129. package/dist/error/ManagedIdentityErrorCodes.cjs.map +1 -0
  130. package/dist/error/ManagedIdentityErrorCodes.d.ts +10 -0
  131. package/dist/error/ManagedIdentityErrorCodes.d.ts.map +1 -0
  132. package/dist/error/ManagedIdentityErrorCodes.mjs +18 -0
  133. package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -0
  134. package/dist/error/NodeAuthError.cjs +85 -85
  135. package/dist/error/NodeAuthError.d.ts +65 -65
  136. package/dist/error/NodeAuthError.mjs +85 -85
  137. package/dist/index.cjs +3 -1
  138. package/dist/index.cjs.map +1 -1
  139. package/dist/index.d.ts +44 -42
  140. package/dist/index.d.ts.map +1 -1
  141. package/dist/index.mjs +2 -1
  142. package/dist/index.mjs.map +1 -1
  143. package/dist/internals.cjs +8 -8
  144. package/dist/internals.d.ts +6 -6
  145. package/dist/internals.mjs +8 -8
  146. package/dist/network/HttpClient.cjs +283 -276
  147. package/dist/network/HttpClient.cjs.map +1 -1
  148. package/dist/network/HttpClient.d.ts +26 -25
  149. package/dist/network/HttpClient.d.ts.map +1 -1
  150. package/dist/network/HttpClient.mjs +283 -276
  151. package/dist/network/HttpClient.mjs.map +1 -1
  152. package/dist/network/ILoopbackClient.d.ts +10 -10
  153. package/dist/network/LoopbackClient.cjs +77 -77
  154. package/dist/network/LoopbackClient.d.ts +21 -21
  155. package/dist/network/LoopbackClient.mjs +77 -77
  156. package/dist/packageMetadata.cjs +4 -4
  157. package/dist/packageMetadata.d.ts +2 -2
  158. package/dist/packageMetadata.d.ts.map +1 -1
  159. package/dist/packageMetadata.mjs +4 -4
  160. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  161. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  162. package/dist/request/ClientCredentialRequest.d.ts +14 -14
  163. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  164. package/dist/request/InteractiveRequest.d.ts +22 -22
  165. package/dist/request/ManagedIdentityRequest.d.ts +9 -0
  166. package/dist/request/ManagedIdentityRequest.d.ts.map +1 -0
  167. package/dist/request/ManagedIdentityRequestParams.d.ts +10 -0
  168. package/dist/request/ManagedIdentityRequestParams.d.ts.map +1 -0
  169. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  170. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  171. package/dist/request/SignOutRequest.d.ts +5 -5
  172. package/dist/request/SilentFlowRequest.d.ts +16 -16
  173. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  174. package/dist/response/ManagedIdentityTokenResponse.d.ts +25 -0
  175. package/dist/response/ManagedIdentityTokenResponse.d.ts.map +1 -0
  176. package/dist/utils/Constants.cjs +109 -80
  177. package/dist/utils/Constants.cjs.map +1 -1
  178. package/dist/utils/Constants.d.ts +106 -86
  179. package/dist/utils/Constants.d.ts.map +1 -1
  180. package/dist/utils/Constants.mjs +100 -81
  181. package/dist/utils/Constants.mjs.map +1 -1
  182. package/dist/utils/EncodingUtils.cjs +44 -44
  183. package/dist/utils/EncodingUtils.d.ts +26 -26
  184. package/dist/utils/EncodingUtils.mjs +44 -44
  185. package/dist/utils/NetworkUtils.cjs +38 -38
  186. package/dist/utils/NetworkUtils.d.ts +5 -5
  187. package/dist/utils/NetworkUtils.mjs +38 -38
  188. package/package.json +3 -3
  189. package/src/cache/NodeStorage.ts +1 -4
  190. package/src/client/ClientCredentialClient.ts +65 -25
  191. package/src/client/ManagedIdentityApplication.ts +194 -0
  192. package/src/client/ManagedIdentityClient.ts +111 -0
  193. package/src/client/ManagedIdentitySources/AppService.ts +151 -0
  194. package/src/client/ManagedIdentitySources/AzureArc.ts +208 -0
  195. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +169 -0
  196. package/src/client/ManagedIdentitySources/CloudShell.ts +19 -0
  197. package/src/client/ManagedIdentitySources/Imds.ts +112 -0
  198. package/src/client/ManagedIdentitySources/ServiceFabric.ts +19 -0
  199. package/src/config/Configuration.ts +47 -1
  200. package/src/config/ManagedIdentityId.ts +73 -0
  201. package/src/config/ManagedIdentityRequestParameters.ts +53 -0
  202. package/src/error/ManagedIdentityError.ts +46 -0
  203. package/src/error/ManagedIdentityErrorCodes.ts +15 -0
  204. package/src/index.ts +4 -0
  205. package/src/network/HttpClient.ts +17 -5
  206. package/src/packageMetadata.ts +1 -1
  207. package/src/request/ManagedIdentityRequest.ts +15 -0
  208. package/src/request/ManagedIdentityRequestParams.ts +14 -0
  209. package/src/response/ManagedIdentityTokenResponse.ts +33 -0
  210. package/src/utils/Constants.ts +27 -0
@@ -1,108 +1,123 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry, INativeBrokerPlugin } from "@azure/msal-common";
4
- import http from "http";
5
- import https from "https";
6
- /**
7
- * - clientId - Client id of the application.
8
- * - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common.
9
- * - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in.
10
- * - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal.
11
- * - clientAssertion - Assertion string that the application uses when requesting a token. Only used in confidential client applications. Assertion should be of type urn:ietf:params:oauth:client-assertion-type:jwt-bearer.
12
- * - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 thumbprint of the certificiate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- )
13
- * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
14
- * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
15
- * @public
16
- */
17
- export type NodeAuthOptions = {
18
- clientId: string;
19
- authority?: string;
20
- clientSecret?: string;
21
- clientAssertion?: string;
22
- clientCertificate?: {
23
- thumbprint: string;
24
- privateKey: string;
25
- x5c?: string;
26
- };
27
- knownAuthorities?: Array<string>;
28
- cloudDiscoveryMetadata?: string;
29
- authorityMetadata?: string;
30
- clientCapabilities?: Array<string>;
31
- protocolMode?: ProtocolMode;
32
- azureCloudOptions?: AzureCloudOptions;
33
- skipAuthorityMetadataCache?: boolean;
34
- };
35
- /**
36
- * Use this to configure the below cache configuration options:
37
- *
38
- * - cachePlugin - Plugin for reading and writing token cache to disk.
39
- * @public
40
- */
41
- export type CacheOptions = {
42
- cachePlugin?: ICachePlugin;
43
- claimsBasedCachingEnabled?: boolean;
44
- };
45
- /**
46
- * Use this to configure the below broker options:
47
- * - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions)
48
- *
49
- * Note: These options are only available for PublicClientApplications using the Authorization Code Flow
50
- * @public
51
- */
52
- export type BrokerOptions = {
53
- nativeBrokerPlugin?: INativeBrokerPlugin;
54
- };
55
- /**
56
- * Type for configuring logger and http client options
57
- *
58
- * - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger
59
- * - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client.
60
- * @public
61
- */
62
- export type NodeSystemOptions = {
63
- loggerOptions?: LoggerOptions;
64
- networkClient?: INetworkModule;
65
- proxyUrl?: string;
66
- customAgentOptions?: http.AgentOptions | https.AgentOptions;
67
- };
68
- export type NodeTelemetryOptions = {
69
- application?: ApplicationTelemetry;
70
- };
71
- /**
72
- * Use the configuration object to configure MSAL and initialize the client application object
73
- *
74
- * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
75
- * - broker: this is where you configure broker options
76
- * - cache: this is where you configure cache location
77
- * - system: this is where you can configure the network client, logger
78
- * - telemetry: this is where you can configure telemetry options
79
- * @public
80
- */
81
- export type Configuration = {
82
- auth: NodeAuthOptions;
83
- broker?: BrokerOptions;
84
- cache?: CacheOptions;
85
- system?: NodeSystemOptions;
86
- telemetry?: NodeTelemetryOptions;
87
- };
88
- /** @internal */
89
- export type NodeConfiguration = {
90
- auth: Required<NodeAuthOptions>;
91
- broker: BrokerOptions;
92
- cache: CacheOptions;
93
- system: Required<NodeSystemOptions>;
94
- telemetry: Required<NodeTelemetryOptions>;
95
- };
96
- /**
97
- * Sets the default options when not explicitly configured from app developer
98
- *
99
- * @param auth - Authentication options
100
- * @param cache - Cache options
101
- * @param system - System options
102
- * @param telemetry - Telemetry options
103
- *
104
- * @returns Configuration
105
- * @internal
106
- */
107
- export declare function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration;
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry, INativeBrokerPlugin } from "@azure/msal-common";
4
+ import http from "http";
5
+ import https from "https";
6
+ import { ManagedIdentityId } from "./ManagedIdentityId.js";
7
+ /**
8
+ * - clientId - Client id of the application.
9
+ * - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common.
10
+ * - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in.
11
+ * - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal.
12
+ * - clientAssertion - Assertion string that the application uses when requesting a token. Only used in confidential client applications. Assertion should be of type urn:ietf:params:oauth:client-assertion-type:jwt-bearer.
13
+ * - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 thumbprint of the certificiate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- )
14
+ * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
15
+ * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
16
+ * @public
17
+ */
18
+ export type NodeAuthOptions = {
19
+ clientId: string;
20
+ authority?: string;
21
+ clientSecret?: string;
22
+ clientAssertion?: string;
23
+ clientCertificate?: {
24
+ thumbprint: string;
25
+ privateKey: string;
26
+ x5c?: string;
27
+ };
28
+ knownAuthorities?: Array<string>;
29
+ cloudDiscoveryMetadata?: string;
30
+ authorityMetadata?: string;
31
+ clientCapabilities?: Array<string>;
32
+ protocolMode?: ProtocolMode;
33
+ azureCloudOptions?: AzureCloudOptions;
34
+ skipAuthorityMetadataCache?: boolean;
35
+ };
36
+ /**
37
+ * Use this to configure the below cache configuration options:
38
+ *
39
+ * - cachePlugin - Plugin for reading and writing token cache to disk.
40
+ * @public
41
+ */
42
+ export type CacheOptions = {
43
+ cachePlugin?: ICachePlugin;
44
+ claimsBasedCachingEnabled?: boolean;
45
+ };
46
+ /**
47
+ * Use this to configure the below broker options:
48
+ * - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions)
49
+ *
50
+ * Note: These options are only available for PublicClientApplications using the Authorization Code Flow
51
+ * @public
52
+ */
53
+ export type BrokerOptions = {
54
+ nativeBrokerPlugin?: INativeBrokerPlugin;
55
+ };
56
+ /**
57
+ * Type for configuring logger and http client options
58
+ *
59
+ * - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger
60
+ * - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client.
61
+ * @public
62
+ */
63
+ export type NodeSystemOptions = {
64
+ loggerOptions?: LoggerOptions;
65
+ networkClient?: INetworkModule;
66
+ proxyUrl?: string;
67
+ customAgentOptions?: http.AgentOptions | https.AgentOptions;
68
+ };
69
+ export type NodeTelemetryOptions = {
70
+ application?: ApplicationTelemetry;
71
+ };
72
+ /**
73
+ * Use the configuration object to configure MSAL and initialize the client application object
74
+ *
75
+ * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
76
+ * - broker: this is where you configure broker options
77
+ * - cache: this is where you configure cache location
78
+ * - system: this is where you can configure the network client, logger
79
+ * - telemetry: this is where you can configure telemetry options
80
+ * @public
81
+ */
82
+ export type Configuration = {
83
+ auth: NodeAuthOptions;
84
+ broker?: BrokerOptions;
85
+ cache?: CacheOptions;
86
+ system?: NodeSystemOptions;
87
+ telemetry?: NodeTelemetryOptions;
88
+ };
89
+ export type ManagedIdentityIdParams = {
90
+ userAssignedClientId?: string;
91
+ userAssignedResourceId?: string;
92
+ userAssignedObjectId?: string;
93
+ };
94
+ export type ManagedIdentityConfiguration = {
95
+ managedIdentityIdParams?: ManagedIdentityIdParams;
96
+ system?: NodeSystemOptions;
97
+ };
98
+ /** @internal */
99
+ export type NodeConfiguration = {
100
+ auth: Required<NodeAuthOptions>;
101
+ broker: BrokerOptions;
102
+ cache: CacheOptions;
103
+ system: Required<NodeSystemOptions>;
104
+ telemetry: Required<NodeTelemetryOptions>;
105
+ };
106
+ /**
107
+ * Sets the default options when not explicitly configured from app developer
108
+ *
109
+ * @param auth - Authentication options
110
+ * @param cache - Cache options
111
+ * @param system - System options
112
+ * @param telemetry - Telemetry options
113
+ *
114
+ * @returns Configuration
115
+ * @internal
116
+ */
117
+ export declare function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration;
118
+ export type ManagedIdentityNodeConfiguration = {
119
+ managedIdentityId: ManagedIdentityId;
120
+ system: Required<NodeSystemOptions>;
121
+ };
122
+ export declare function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }: ManagedIdentityConfiguration): ManagedIdentityNodeConfiguration;
108
123
  //# sourceMappingURL=Configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../src/config/Configuration.ts"],"names":[],"mappings":";;AAKA,OAAO,EACH,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,YAAY,EAGZ,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,MAAM,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AE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACvC,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAkDF,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACpC,SAAS,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,GACZ,EAAE,aAAa,GAAG,iBAAiB,CAoBnC;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC3C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,iCAAiC,CAAC,EAC9C,uBAAuB,EACvB,MAAM,GACT,EAAE,4BAA4B,GAAG,gCAAgC,CAqBjE"}
@@ -1,80 +1,95 @@
1
- /*! @azure/msal-node v2.6.0 2023-12-01 */
1
+ /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
2
2
  'use strict';
3
3
  import { Constants, ProtocolMode, AzureCloudInstance, LogLevel } from '@azure/msal-common';
4
4
  import { HttpClient } from '../network/HttpClient.mjs';
5
+ import { ManagedIdentityId } from './ManagedIdentityId.mjs';
5
6
 
6
- /*
7
- * Copyright (c) Microsoft Corporation. All rights reserved.
8
- * Licensed under the MIT License.
9
- */
10
- const DEFAULT_AUTH_OPTIONS = {
11
- clientId: Constants.EMPTY_STRING,
12
- authority: Constants.DEFAULT_AUTHORITY,
13
- clientSecret: Constants.EMPTY_STRING,
14
- clientAssertion: Constants.EMPTY_STRING,
15
- clientCertificate: {
16
- thumbprint: Constants.EMPTY_STRING,
17
- privateKey: Constants.EMPTY_STRING,
18
- x5c: Constants.EMPTY_STRING,
19
- },
20
- knownAuthorities: [],
21
- cloudDiscoveryMetadata: Constants.EMPTY_STRING,
22
- authorityMetadata: Constants.EMPTY_STRING,
23
- clientCapabilities: [],
24
- protocolMode: ProtocolMode.AAD,
25
- azureCloudOptions: {
26
- azureCloudInstance: AzureCloudInstance.None,
27
- tenant: Constants.EMPTY_STRING,
28
- },
29
- skipAuthorityMetadataCache: false,
30
- };
31
- const DEFAULT_CACHE_OPTIONS = {
32
- claimsBasedCachingEnabled: false,
33
- };
34
- const DEFAULT_LOGGER_OPTIONS = {
35
- loggerCallback: () => {
36
- // allow users to not set logger call back
37
- },
38
- piiLoggingEnabled: false,
39
- logLevel: LogLevel.Info,
40
- };
41
- const DEFAULT_SYSTEM_OPTIONS = {
42
- loggerOptions: DEFAULT_LOGGER_OPTIONS,
43
- networkClient: new HttpClient(),
44
- proxyUrl: Constants.EMPTY_STRING,
45
- customAgentOptions: {},
46
- };
47
- const DEFAULT_TELEMETRY_OPTIONS = {
48
- application: {
49
- appName: Constants.EMPTY_STRING,
50
- appVersion: Constants.EMPTY_STRING,
51
- },
52
- };
53
- /**
54
- * Sets the default options when not explicitly configured from app developer
55
- *
56
- * @param auth - Authentication options
57
- * @param cache - Cache options
58
- * @param system - System options
59
- * @param telemetry - Telemetry options
60
- *
61
- * @returns Configuration
62
- * @internal
63
- */
64
- function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) {
65
- const systemOptions = {
66
- ...DEFAULT_SYSTEM_OPTIONS,
67
- networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions),
68
- loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
69
- };
70
- return {
71
- auth: { ...DEFAULT_AUTH_OPTIONS, ...auth },
72
- broker: { ...broker },
73
- cache: { ...DEFAULT_CACHE_OPTIONS, ...cache },
74
- system: { ...systemOptions, ...system },
75
- telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
76
- };
7
+ /*
8
+ * Copyright (c) Microsoft Corporation. All rights reserved.
9
+ * Licensed under the MIT License.
10
+ */
11
+ const DEFAULT_AUTH_OPTIONS = {
12
+ clientId: Constants.EMPTY_STRING,
13
+ authority: Constants.DEFAULT_AUTHORITY,
14
+ clientSecret: Constants.EMPTY_STRING,
15
+ clientAssertion: Constants.EMPTY_STRING,
16
+ clientCertificate: {
17
+ thumbprint: Constants.EMPTY_STRING,
18
+ privateKey: Constants.EMPTY_STRING,
19
+ x5c: Constants.EMPTY_STRING,
20
+ },
21
+ knownAuthorities: [],
22
+ cloudDiscoveryMetadata: Constants.EMPTY_STRING,
23
+ authorityMetadata: Constants.EMPTY_STRING,
24
+ clientCapabilities: [],
25
+ protocolMode: ProtocolMode.AAD,
26
+ azureCloudOptions: {
27
+ azureCloudInstance: AzureCloudInstance.None,
28
+ tenant: Constants.EMPTY_STRING,
29
+ },
30
+ skipAuthorityMetadataCache: false,
31
+ };
32
+ const DEFAULT_CACHE_OPTIONS = {
33
+ claimsBasedCachingEnabled: false,
34
+ };
35
+ const DEFAULT_LOGGER_OPTIONS = {
36
+ loggerCallback: () => {
37
+ // allow users to not set logger call back
38
+ },
39
+ piiLoggingEnabled: false,
40
+ logLevel: LogLevel.Info,
41
+ };
42
+ const DEFAULT_SYSTEM_OPTIONS = {
43
+ loggerOptions: DEFAULT_LOGGER_OPTIONS,
44
+ networkClient: new HttpClient(),
45
+ proxyUrl: Constants.EMPTY_STRING,
46
+ customAgentOptions: {},
47
+ };
48
+ const DEFAULT_TELEMETRY_OPTIONS = {
49
+ application: {
50
+ appName: Constants.EMPTY_STRING,
51
+ appVersion: Constants.EMPTY_STRING,
52
+ },
53
+ };
54
+ /**
55
+ * Sets the default options when not explicitly configured from app developer
56
+ *
57
+ * @param auth - Authentication options
58
+ * @param cache - Cache options
59
+ * @param system - System options
60
+ * @param telemetry - Telemetry options
61
+ *
62
+ * @returns Configuration
63
+ * @internal
64
+ */
65
+ function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) {
66
+ const systemOptions = {
67
+ ...DEFAULT_SYSTEM_OPTIONS,
68
+ networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions, false // Managed Identity
69
+ ),
70
+ loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
71
+ };
72
+ return {
73
+ auth: { ...DEFAULT_AUTH_OPTIONS, ...auth },
74
+ broker: { ...broker },
75
+ cache: { ...DEFAULT_CACHE_OPTIONS, ...cache },
76
+ system: { ...systemOptions, ...system },
77
+ telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
78
+ };
79
+ }
80
+ function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }) {
81
+ const managedIdentityId = new ManagedIdentityId(managedIdentityIdParams);
82
+ const systemOptions = {
83
+ ...DEFAULT_SYSTEM_OPTIONS,
84
+ loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
85
+ networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions, true // Managed Identity
86
+ ),
87
+ };
88
+ return {
89
+ managedIdentityId: managedIdentityId,
90
+ system: { ...systemOptions, ...system },
91
+ };
77
92
  }
78
93
 
79
- export { buildAppConfiguration };
94
+ export { buildAppConfiguration, buildManagedIdentityConfiguration };
80
95
  //# sourceMappingURL=Configuration.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.mjs","sources":["../../src/config/Configuration.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AA0GH,MAAM,oBAAoB,GAA8B;IACpD,QAAQ,EAAE,SAAS,CAAC,YAAY;IAChC,SAAS,EAAE,SAAS,CAAC,iBAAiB;IACtC,YAAY,EAAE,SAA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C,QAAA,SAAS,EAAE,EAAE,GAAG,yBAAyB,EAAE,GAAG,SAAS,EAAE;KAC5D,CAAC;AACN,CAAC;SAOe,iCAAiC,CAAC,EAC9C,uBAAuB,EACvB,MAAM,GACqB,EAAA;AAC3B,IAAA,MAAM,iBAAiB,GAAsB,IAAI,iBAAiB,CAC9D,uBAAuB,CAC1B,CAAC;AAEF,IAAA,MAAM,aAAa,GAAgC;AAC/C,QAAA,GAAG,sBAAsB;AACzB,QAAA,aAAa,EAAE,MAAM,EAAE,aAAa,IAAI,sBAAsB;AAC9D,QAAA,aAAa,EAAE,IAAI,UAAU,CACzB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,kBAEgB,EACxB,IAAI;AACP,SAAA;KACJ,CAAC;IAEF,OAAO;AACH,QAAA,iBAAiB,EAAE,iBAAiB;AACpC,QAAA,MAAM,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE;KAC1C,CAAC;AACN;;;;"}
@@ -0,0 +1,59 @@
1
+ /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ var ManagedIdentityError = require('../error/ManagedIdentityError.cjs');
6
+ var Constants = require('../utils/Constants.cjs');
7
+ var ManagedIdentityErrorCodes = require('../error/ManagedIdentityErrorCodes.cjs');
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
+ }
56
+ }
57
+
58
+ exports.ManagedIdentityId = ManagedIdentityId;
59
+ //# sourceMappingURL=ManagedIdentityId.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManagedIdentityId.cjs","sources":["../../src/config/ManagedIdentityId.ts"],"sourcesContent":[null],"names":["createManagedIdentityError","ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityIdType","DEFAULT_MANAGED_IDENTITY_ID"],"mappings":";;;;;;;;AAAA;;;AAGG;MAYU,iBAAiB,CAAA;AAE1B,IAAA,IAAW,EAAE,GAAA;QACT,OAAO,IAAI,CAAC,GAAG,CAAC;KACnB;IACD,IAAY,EAAE,CAAC,KAAa,EAAA;AACxB,QAAA,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;KACpB;AAGD,IA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,GAAGC,qCAA2B,CAAC;AACtC,YAAA,IAAI,CAAC,MAAM,GAAGD,+BAAqB,CAAC,eAAe,CAAC;AACvD,SAAA;KACJ;AACJ;;;;"}
@@ -0,0 +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
+ }
12
+ //# sourceMappingURL=ManagedIdentityId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManagedIdentityId.d.ts","sourceRoot":"","sources":["../../src/config/ManagedIdentityId.ts"],"names":[],"mappings":"AASA,OAAO,EAEH,qBAAqB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,GAAG,CAAS;IACpB,IAAW,EAAE,IAAI,MAAM,CAEtB;IACD,OAAO,KAAK,EAAE,QAEb;IAED,OAAO,CAAC,OAAO,CAAwB;IACvC,IAAW,MAAM,IAAI,qBAAqB,CAEzC;IACD,OAAO,KAAK,MAAM,QAEjB;gBAEW,uBAAuB,CAAC,EAAE,uBAAuB;CAwChE"}
@@ -0,0 +1,57 @@
1
+ /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
2
+ 'use strict';
3
+ import { createManagedIdentityError } from '../error/ManagedIdentityError.mjs';
4
+ import { ManagedIdentityIdType, DEFAULT_MANAGED_IDENTITY_ID } from '../utils/Constants.mjs';
5
+ import { invalidManagedIdentityIdType } from '../error/ManagedIdentityErrorCodes.mjs';
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
+ }
54
+ }
55
+
56
+ export { ManagedIdentityId };
57
+ //# sourceMappingURL=ManagedIdentityId.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManagedIdentityId.mjs","sources":["../../src/config/ManagedIdentityId.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidManagedIdentityIdType"],"mappings":";;;;;;AAAA;;;AAGG;MAYU,iBAAiB,CAAA;AAE1B,IAAA,IAAW,EAAE,GAAA;QACT,OAAO,IAAI,CAAC,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A,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,uBAAuB,CAAC;AAC/D,SAAA;AAAM,aAAA;AACH,YAAA,IAAI,CAAC,EAAE,GAAG,2BAA2B,CAAC;AACtC,YAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,eAAe,CAAC;AACvD,SAAA;KACJ;AACJ;;;;"}
@@ -0,0 +1,38 @@
1
+ /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ var msalCommon = require('@azure/msal-common');
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
+ const bodyParametersString = parameterBuilder.createQueryString();
33
+ return msalCommon.UrlString.appendQueryString(this._baseEndpoint, bodyParametersString);
34
+ }
35
+ }
36
+
37
+ exports.ManagedIdentityRequestParameters = ManagedIdentityRequestParameters;
38
+ //# sourceMappingURL=ManagedIdentityRequestParameters.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManagedIdentityRequestParameters.cjs","sources":["../../src/config/ManagedIdentityRequestParameters.ts"],"sourcesContent":[null],"names":["RequestParameterBuilder","UrlString"],"mappings":";;;;;;AAAA;;;AAGG;MAKU,gCAAgC,CAAA;IAOzC,WAAY,CAAA,UAAsB,EAAE,QAAgB,EAAA;AAChD,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;AAC9B,QAAA,IAAI,CAAC,OAAO,GAAG,EAA4B,CAAC;AAC5C,QAAA,IAAI,CAAC,cAAc,GAAG,EAA4B,CAAC;AACnD,QAAA,IAAI,CAAC,eAAe,GAAG,EAA4B,CAAC;KACvD;IAEM,UAAU,GAAA;AACb,QAAA,MAAM,gBAAgB,GAAG,IAAIA,kCAAuB,EAAE,CAAC;QAEvD,IAAI,IAAI,CAAC,eAAe,EAAE;AACtB,YAAA,gBAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAClE,SAAA;AAED,QAAA,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;QAEnE,OAAOC,oBAAS,CAAC,iBAAiB,CAC9B,IAAI,CAAC,aAAa,EAClB,qBAAqB,CACxB,CAAC;KACL;IAEM,2BAA2B,GAAA;AAC9B,QAAA,MAAM,gBAAgB,GAAG,IAAID,kCAAuB,EAAE,CAAC;QAEvD,IAAI,IAAI,CAAC,cAAc,EAAE;AACrB,YAAA,gBAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACjE,SAAA;AAED,QAAA,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;QAElE,OAAOC,oBAAS,CAAC,iBAAiB,CAC9B,IAAI,CAAC,aAAa,EAClB,oBAAoB,CACvB,CAAC;KACL;AACJ;;;;"}
@@ -0,0 +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
+ }
12
+ //# sourceMappingURL=ManagedIdentityRequestParameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManagedIdentityRequestParameters.d.ts","sourceRoot":"","sources":["../../src/config/ManagedIdentityRequestParameters.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,qBAAa,gCAAgC;IACzC,OAAO,CAAC,aAAa,CAAS;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAEnC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM;IAQ7C,UAAU,IAAI,MAAM;IAepB,2BAA2B,IAAI,MAAM;CAc/C"}