@azure/msal-node 2.6.5-alpha.0 → 2.6.6

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 (193) hide show
  1. package/dist/cache/NodeStorage.cjs +1 -1
  2. package/dist/cache/NodeStorage.mjs +1 -1
  3. package/dist/cache/TokenCache.cjs +1 -1
  4. package/dist/cache/TokenCache.mjs +1 -1
  5. package/dist/cache/distributed/DistributedCachePlugin.cjs +1 -1
  6. package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
  7. package/dist/cache/serializer/Deserializer.cjs +1 -1
  8. package/dist/cache/serializer/Deserializer.mjs +1 -1
  9. package/dist/cache/serializer/Serializer.cjs +1 -1
  10. package/dist/cache/serializer/Serializer.mjs +1 -1
  11. package/dist/client/ClientApplication.cjs +1 -1
  12. package/dist/client/ClientApplication.mjs +1 -1
  13. package/dist/client/ClientAssertion.cjs +1 -1
  14. package/dist/client/ClientAssertion.mjs +1 -1
  15. package/dist/client/ClientCredentialClient.cjs +23 -27
  16. package/dist/client/ClientCredentialClient.cjs.map +1 -1
  17. package/dist/client/ClientCredentialClient.d.ts +3 -3
  18. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  19. package/dist/client/ClientCredentialClient.mjs +24 -28
  20. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  21. package/dist/client/ConfidentialClientApplication.cjs +1 -1
  22. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  23. package/dist/client/DeviceCodeClient.cjs +1 -1
  24. package/dist/client/DeviceCodeClient.mjs +1 -1
  25. package/dist/client/OnBehalfOfClient.cjs +1 -1
  26. package/dist/client/OnBehalfOfClient.mjs +1 -1
  27. package/dist/client/PublicClientApplication.cjs +1 -1
  28. package/dist/client/PublicClientApplication.mjs +1 -1
  29. package/dist/client/UsernamePasswordClient.cjs +1 -1
  30. package/dist/client/UsernamePasswordClient.mjs +1 -1
  31. package/dist/config/Configuration.cjs +2 -36
  32. package/dist/config/Configuration.cjs.map +1 -1
  33. package/dist/config/Configuration.d.ts +0 -16
  34. package/dist/config/Configuration.d.ts.map +1 -1
  35. package/dist/config/Configuration.mjs +3 -36
  36. package/dist/config/Configuration.mjs.map +1 -1
  37. package/dist/crypto/CryptoProvider.cjs +1 -1
  38. package/dist/crypto/CryptoProvider.mjs +1 -1
  39. package/dist/crypto/GuidGenerator.cjs +1 -1
  40. package/dist/crypto/GuidGenerator.mjs +1 -1
  41. package/dist/crypto/HashUtils.cjs +1 -1
  42. package/dist/crypto/HashUtils.mjs +1 -1
  43. package/dist/crypto/PkceGenerator.cjs +1 -1
  44. package/dist/crypto/PkceGenerator.mjs +1 -1
  45. package/dist/error/NodeAuthError.cjs +1 -1
  46. package/dist/error/NodeAuthError.mjs +1 -1
  47. package/dist/index.cjs +1 -3
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.d.ts +1 -3
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.mjs +1 -2
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/internals.cjs +1 -1
  54. package/dist/internals.mjs +1 -1
  55. package/dist/network/HttpClient.cjs +6 -13
  56. package/dist/network/HttpClient.cjs.map +1 -1
  57. package/dist/network/HttpClient.d.ts +1 -2
  58. package/dist/network/HttpClient.d.ts.map +1 -1
  59. package/dist/network/HttpClient.mjs +6 -13
  60. package/dist/network/HttpClient.mjs.map +1 -1
  61. package/dist/network/LoopbackClient.cjs +1 -1
  62. package/dist/network/LoopbackClient.mjs +1 -1
  63. package/dist/packageMetadata.cjs +2 -2
  64. package/dist/packageMetadata.d.ts +1 -1
  65. package/dist/packageMetadata.d.ts.map +1 -1
  66. package/dist/packageMetadata.mjs +2 -2
  67. package/dist/utils/Constants.cjs +1 -68
  68. package/dist/utils/Constants.cjs.map +1 -1
  69. package/dist/utils/Constants.d.ts +0 -45
  70. package/dist/utils/Constants.d.ts.map +1 -1
  71. package/dist/utils/Constants.mjs +2 -54
  72. package/dist/utils/Constants.mjs.map +1 -1
  73. package/dist/utils/EncodingUtils.cjs +1 -1
  74. package/dist/utils/EncodingUtils.mjs +1 -1
  75. package/dist/utils/NetworkUtils.cjs +1 -1
  76. package/dist/utils/NetworkUtils.mjs +1 -1
  77. package/package.json +2 -2
  78. package/src/client/ClientCredentialClient.ts +25 -65
  79. package/src/config/Configuration.ts +1 -81
  80. package/src/index.ts +0 -4
  81. package/src/network/HttpClient.ts +5 -17
  82. package/src/packageMetadata.ts +1 -1
  83. package/src/utils/Constants.ts +0 -63
  84. package/dist/client/ManagedIdentityApplication.cjs +0 -97
  85. package/dist/client/ManagedIdentityApplication.cjs.map +0 -1
  86. package/dist/client/ManagedIdentityApplication.d.ts +0 -24
  87. package/dist/client/ManagedIdentityApplication.d.ts.map +0 -1
  88. package/dist/client/ManagedIdentityApplication.mjs +0 -95
  89. package/dist/client/ManagedIdentityApplication.mjs.map +0 -1
  90. package/dist/client/ManagedIdentityClient.cjs +0 -53
  91. package/dist/client/ManagedIdentityClient.cjs.map +0 -1
  92. package/dist/client/ManagedIdentityClient.d.ts +0 -25
  93. package/dist/client/ManagedIdentityClient.d.ts.map +0 -1
  94. package/dist/client/ManagedIdentityClient.mjs +0 -51
  95. package/dist/client/ManagedIdentityClient.mjs.map +0 -1
  96. package/dist/client/ManagedIdentitySources/AppService.cjs +0 -52
  97. package/dist/client/ManagedIdentitySources/AppService.cjs.map +0 -1
  98. package/dist/client/ManagedIdentitySources/AppService.d.ts +0 -17
  99. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +0 -1
  100. package/dist/client/ManagedIdentitySources/AppService.mjs +0 -50
  101. package/dist/client/ManagedIdentitySources/AppService.mjs.map +0 -1
  102. package/dist/client/ManagedIdentitySources/AzureArc.cjs +0 -96
  103. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +0 -1
  104. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +0 -19
  105. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +0 -1
  106. package/dist/client/ManagedIdentitySources/AzureArc.mjs +0 -93
  107. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +0 -1
  108. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +0 -122
  109. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +0 -1
  110. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +0 -31
  111. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +0 -1
  112. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +0 -119
  113. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +0 -1
  114. package/dist/client/ManagedIdentitySources/CloudShell.cjs +0 -47
  115. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +0 -1
  116. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +0 -16
  117. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +0 -1
  118. package/dist/client/ManagedIdentitySources/CloudShell.mjs +0 -45
  119. package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +0 -1
  120. package/dist/client/ManagedIdentitySources/Imds.cjs +0 -54
  121. package/dist/client/ManagedIdentitySources/Imds.cjs.map +0 -1
  122. package/dist/client/ManagedIdentitySources/Imds.d.ts +0 -13
  123. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +0 -1
  124. package/dist/client/ManagedIdentitySources/Imds.mjs +0 -52
  125. package/dist/client/ManagedIdentitySources/Imds.mjs.map +0 -1
  126. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +0 -61
  127. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +0 -1
  128. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +0 -17
  129. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +0 -1
  130. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +0 -59
  131. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +0 -1
  132. package/dist/config/ManagedIdentityId.cjs +0 -59
  133. package/dist/config/ManagedIdentityId.cjs.map +0 -1
  134. package/dist/config/ManagedIdentityId.d.ts +0 -12
  135. package/dist/config/ManagedIdentityId.d.ts.map +0 -1
  136. package/dist/config/ManagedIdentityId.mjs +0 -57
  137. package/dist/config/ManagedIdentityId.mjs.map +0 -1
  138. package/dist/config/ManagedIdentityRequestParameters.cjs +0 -37
  139. package/dist/config/ManagedIdentityRequestParameters.cjs.map +0 -1
  140. package/dist/config/ManagedIdentityRequestParameters.d.ts +0 -12
  141. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +0 -1
  142. package/dist/config/ManagedIdentityRequestParameters.mjs +0 -35
  143. package/dist/config/ManagedIdentityRequestParameters.mjs.map +0 -1
  144. package/dist/error/ManagedIdentityError.cjs +0 -51
  145. package/dist/error/ManagedIdentityError.cjs.map +0 -1
  146. package/dist/error/ManagedIdentityError.d.ts +0 -28
  147. package/dist/error/ManagedIdentityError.d.ts.map +0 -1
  148. package/dist/error/ManagedIdentityError.mjs +0 -47
  149. package/dist/error/ManagedIdentityError.mjs.map +0 -1
  150. package/dist/error/ManagedIdentityErrorCodes.cjs +0 -41
  151. package/dist/error/ManagedIdentityErrorCodes.cjs.map +0 -1
  152. package/dist/error/ManagedIdentityErrorCodes.d.ts +0 -20
  153. package/dist/error/ManagedIdentityErrorCodes.d.ts.map +0 -1
  154. package/dist/error/ManagedIdentityErrorCodes.mjs +0 -28
  155. package/dist/error/ManagedIdentityErrorCodes.mjs.map +0 -1
  156. package/dist/network/HttpClientWithRetries.cjs +0 -44
  157. package/dist/network/HttpClientWithRetries.cjs.map +0 -1
  158. package/dist/network/HttpClientWithRetries.d.ts +0 -12
  159. package/dist/network/HttpClientWithRetries.d.ts.map +0 -1
  160. package/dist/network/HttpClientWithRetries.mjs +0 -42
  161. package/dist/network/HttpClientWithRetries.mjs.map +0 -1
  162. package/dist/request/ManagedIdentityRequest.d.ts +0 -9
  163. package/dist/request/ManagedIdentityRequest.d.ts.map +0 -1
  164. package/dist/request/ManagedIdentityRequestParams.d.ts +0 -10
  165. package/dist/request/ManagedIdentityRequestParams.d.ts.map +0 -1
  166. package/dist/response/ManagedIdentityTokenResponse.d.ts +0 -25
  167. package/dist/response/ManagedIdentityTokenResponse.d.ts.map +0 -1
  168. package/dist/retry/IHttpRetryPolicy.d.ts +0 -6
  169. package/dist/retry/IHttpRetryPolicy.d.ts.map +0 -1
  170. package/dist/retry/LinearRetryPolicy.cjs +0 -47
  171. package/dist/retry/LinearRetryPolicy.cjs.map +0 -1
  172. package/dist/retry/LinearRetryPolicy.d.ts +0 -12
  173. package/dist/retry/LinearRetryPolicy.d.ts.map +0 -1
  174. package/dist/retry/LinearRetryPolicy.mjs +0 -45
  175. package/dist/retry/LinearRetryPolicy.mjs.map +0 -1
  176. package/src/client/ManagedIdentityApplication.ts +0 -194
  177. package/src/client/ManagedIdentityClient.ts +0 -128
  178. package/src/client/ManagedIdentitySources/AppService.ts +0 -122
  179. package/src/client/ManagedIdentitySources/AzureArc.ts +0 -199
  180. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +0 -237
  181. package/src/client/ManagedIdentitySources/CloudShell.ts +0 -104
  182. package/src/client/ManagedIdentitySources/Imds.ts +0 -126
  183. package/src/client/ManagedIdentitySources/ServiceFabric.ts +0 -140
  184. package/src/config/ManagedIdentityId.ts +0 -73
  185. package/src/config/ManagedIdentityRequestParameters.ts +0 -48
  186. package/src/error/ManagedIdentityError.ts +0 -59
  187. package/src/error/ManagedIdentityErrorCodes.ts +0 -34
  188. package/src/network/HttpClientWithRetries.ts +0 -80
  189. package/src/request/ManagedIdentityRequest.ts +0 -15
  190. package/src/request/ManagedIdentityRequestParams.ts +0 -14
  191. package/src/response/ManagedIdentityTokenResponse.ts +0 -33
  192. package/src/retry/IHttpRetryPolicy.ts +0 -18
  193. package/src/retry/LinearRetryPolicy.ts +0 -71
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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;CAS/C"}
@@ -1,35 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- import { RequestParameterBuilder, UrlString } from '@azure/msal-common';
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
- }
32
- }
33
-
34
- export { ManagedIdentityRequestParameters };
35
- //# sourceMappingURL=ManagedIdentityRequestParameters.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityRequestParameters.mjs","sources":["../../src/config/ManagedIdentityRequestParameters.ts"],"sourcesContent":[null],"names":[],"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,IAAI,uBAAuB,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,OAAO,SAAS,CAAC,iBAAiB,CAC9B,IAAI,CAAC,aAAa,EAClB,qBAAqB,CACxB,CAAC;KACL;IAEM,2BAA2B,GAAA;AAC9B,QAAA,MAAM,gBAAgB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAEvD,IAAI,IAAI,CAAC,cAAc,EAAE;AACrB,YAAA,gBAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACjE,SAAA;AAED,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"}
@@ -1,51 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var msalCommon = require('@azure/msal-common');
6
- var ManagedIdentityErrorCodes = require('./ManagedIdentityErrorCodes.cjs');
7
- var Constants = require('../utils/Constants.cjs');
8
-
9
- /*
10
- * Copyright (c) Microsoft Corporation. All rights reserved.
11
- * Licensed under the MIT License.
12
- */
13
- /**
14
- * ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
15
- */
16
- const ManagedIdentityErrorMessages = {
17
- [ManagedIdentityErrorCodes.invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.",
18
- [ManagedIdentityErrorCodes.invalidResource]: "The supplied resource is an invalid URL.",
19
- [ManagedIdentityErrorCodes.missingId]: "A ManagedIdentityId id was not provided.",
20
- [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes
21
- .AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${Constants.ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,
22
- [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes
23
- .IDENTITY_ENDPOINT]: `The Managed Identity's '${Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`,
24
- [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes
25
- .IMDS_ENDPOINT]: `The Managed Identity's '${Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`,
26
- [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes
27
- .MSI_ENDPOINT]: `The Managed Identity's '${Constants.ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`,
28
- [ManagedIdentityErrorCodes.networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.",
29
- [ManagedIdentityErrorCodes.unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.",
30
- [ManagedIdentityErrorCodes.unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.",
31
- [ManagedIdentityErrorCodes.unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.",
32
- [ManagedIdentityErrorCodes.unableToReadSecretFile]: "Unable to read the secret file.",
33
- [ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",
34
- [ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",
35
- [ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
36
- };
37
- class ManagedIdentityError extends msalCommon.AuthError {
38
- constructor(errorCode) {
39
- super(errorCode, ManagedIdentityErrorMessages[errorCode]);
40
- this.name = "ManagedIdentityError";
41
- Object.setPrototypeOf(this, ManagedIdentityError.prototype);
42
- }
43
- }
44
- function createManagedIdentityError(errorCode) {
45
- return new ManagedIdentityError(errorCode);
46
- }
47
-
48
- exports.ManagedIdentityError = ManagedIdentityError;
49
- exports.ManagedIdentityErrorMessages = ManagedIdentityErrorMessages;
50
- exports.createManagedIdentityError = createManagedIdentityError;
51
- //# sourceMappingURL=ManagedIdentityError.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityError.cjs","sources":["../../src/error/ManagedIdentityError.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityErrorCodes.invalidResource","ManagedIdentityErrorCodes.missingId","ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes","ManagedIdentityEnvironmentVariableNames","ManagedIdentityErrorCodes.networkUnavailable","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.unableToCreateCloudShell","ManagedIdentityErrorCodes.unableToCreateSource","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","AuthError"],"mappings":";;;;;;;;AAAA;;;AAGG;AAOH;;AAEG;AACU,MAAA,4BAA4B,GAAG;AACxC,IAAA,CAACA,sDAAsD,GACnD,mDAAmD;AACvD,IAAA,CAACC,yCAAyC,GACtC,0CAA0C;AAC9C,IAAA,CAACC,mCAAmC,GAChC,0CAA0C;IAC9C,CAACC,sEAAsE;AAClE,SAAA,iCAAiC,GAAG,CAAA,wBAAA,EAA2BC,iDAAuC,CAAC,iCAAiC,CAAsC,oCAAA,CAAA;IACnL,CAACD,sEAAsE;AAClE,SAAA,iBAAiB,GAAG,CAAA,wBAAA,EAA2BC,iDAAuC,CAAC,iBAAiB,CAAsC,oCAAA,CAAA;IACnJ,CAACD,sEAAsE;AAClE,SAAA,aAAa,GAAG,CAAA,wBAAA,EAA2BC,iDAAuC,CAAC,aAAa,CAAsC,oCAAA,CAAA;IAC3I,CAACD,sEAAsE;AAClE,SAAA,YAAY,GAAG,CAAA,wBAAA,EAA2BC,iDAAuC,CAAC,YAAY,CAAsC,oCAAA,CAAA;AACzI,IAAA,CAACC,4CAA4C,GACzC,qFAAqF;AACzF,IAAA,CAACC,gDAAgD,GAC7C,2DAA2D;AAC/D,IAAA,CAACC,kDAAkD,GAC/C,6DAA6D;AACjE,IAAA,CAACC,8CAA8C,GAC3C,4EAA4E;AAChF,IAAA,CAACC,gDAAgD,GAC7C,iCAAiC;AACrC,IAAA,CAACC,2DAA2D,GACxD,sGAAsG;AAC1G,IAAA,CAACC,sDAAsD,GACnD,8GAA8G;AAClH,IAAA,CAACC,gEAAgE,GAC7D,+HAA+H;EACrI;AAEI,MAAO,oBAAqB,SAAQC,oBAAS,CAAA;AAC/C,IAAA,WAAA,CAAY,SAAiB,EAAA;QACzB,KAAK,CAAC,SAAS,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1D,QAAA,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;KAC/D;AACJ,CAAA;AAEK,SAAU,0BAA0B,CACtC,SAAiB,EAAA;AAEjB,IAAA,OAAO,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC/C;;;;;;"}
@@ -1,28 +0,0 @@
1
- import { AuthError } from "@azure/msal-common";
2
- import * as ManagedIdentityErrorCodes from "./ManagedIdentityErrorCodes";
3
- export { ManagedIdentityErrorCodes };
4
- /**
5
- * ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
6
- */
7
- export declare const ManagedIdentityErrorMessages: {
8
- invalid_managed_identity_id_type: string;
9
- invalid_resource: string;
10
- missing_client_id: string;
11
- azure_pod_identity_authority_host_url_malformed: string;
12
- identity_endpoint_url_malformed: string;
13
- imds_endpoint_url_malformed: string;
14
- msi_endpoint_url_malformed: string;
15
- network_unavailable: string;
16
- unable_to_create_azure_arc: string;
17
- unable_to_create_cloud_shell: string;
18
- unable_to_create_source: string;
19
- unable_to_read_secret_file: string;
20
- user_assigned_not_available_at_runtime: string;
21
- www_authenticate_header_missing: string;
22
- www_authenticate_header_unsupported_format: string;
23
- };
24
- export declare class ManagedIdentityError extends AuthError {
25
- constructor(errorCode: string);
26
- }
27
- export declare function createManagedIdentityError(errorCode: string): ManagedIdentityError;
28
- //# sourceMappingURL=ManagedIdentityError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityError.d.ts","sourceRoot":"","sources":["../../src/error/ManagedIdentityError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,yBAAyB,MAAM,6BAA6B,CAAC;AAEzE,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;CA+BxC,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,SAAS;gBACnC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,0BAA0B,CACtC,SAAS,EAAE,MAAM,GAClB,oBAAoB,CAEtB"}
@@ -1,47 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- import { AuthError } from '@azure/msal-common';
4
- import { invalidManagedIdentityIdType, invalidResource, missingId, MsiEnvironmentVariableUrlMalformedErrorCodes, networkUnavailable, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat } from './ManagedIdentityErrorCodes.mjs';
5
- import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
6
-
7
- /*
8
- * Copyright (c) Microsoft Corporation. All rights reserved.
9
- * Licensed under the MIT License.
10
- */
11
- /**
12
- * ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
13
- */
14
- const ManagedIdentityErrorMessages = {
15
- [invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.",
16
- [invalidResource]: "The supplied resource is an invalid URL.",
17
- [missingId]: "A ManagedIdentityId id was not provided.",
18
- [MsiEnvironmentVariableUrlMalformedErrorCodes
19
- .AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,
20
- [MsiEnvironmentVariableUrlMalformedErrorCodes
21
- .IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`,
22
- [MsiEnvironmentVariableUrlMalformedErrorCodes
23
- .IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`,
24
- [MsiEnvironmentVariableUrlMalformedErrorCodes
25
- .MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`,
26
- [networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.",
27
- [unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.",
28
- [unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.",
29
- [unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.",
30
- [unableToReadSecretFile]: "Unable to read the secret file.",
31
- [userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",
32
- [wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",
33
- [wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
34
- };
35
- class ManagedIdentityError extends AuthError {
36
- constructor(errorCode) {
37
- super(errorCode, ManagedIdentityErrorMessages[errorCode]);
38
- this.name = "ManagedIdentityError";
39
- Object.setPrototypeOf(this, ManagedIdentityError.prototype);
40
- }
41
- }
42
- function createManagedIdentityError(errorCode) {
43
- return new ManagedIdentityError(errorCode);
44
- }
45
-
46
- export { ManagedIdentityError, ManagedIdentityErrorMessages, createManagedIdentityError };
47
- //# sourceMappingURL=ManagedIdentityError.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityError.mjs","sources":["../../src/error/ManagedIdentityError.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityErrorCodes.invalidResource","ManagedIdentityErrorCodes.missingId","ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes","ManagedIdentityErrorCodes.networkUnavailable","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.unableToCreateCloudShell","ManagedIdentityErrorCodes.unableToCreateSource","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat"],"mappings":";;;;;;AAAA;;;AAGG;AAOH;;AAEG;AACU,MAAA,4BAA4B,GAAG;AACxC,IAAA,CAACA,4BAAsD,GACnD,mDAAmD;AACvD,IAAA,CAACC,eAAyC,GACtC,0CAA0C;AAC9C,IAAA,CAACC,SAAmC,GAChC,0CAA0C;IAC9C,CAACC,4CAAsE;AAClE,SAAA,iCAAiC,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,iCAAiC,CAAsC,oCAAA,CAAA;IACnL,CAACA,4CAAsE;AAClE,SAAA,iBAAiB,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,iBAAiB,CAAsC,oCAAA,CAAA;IACnJ,CAACA,4CAAsE;AAClE,SAAA,aAAa,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,aAAa,CAAsC,oCAAA,CAAA;IAC3I,CAACA,4CAAsE;AAClE,SAAA,YAAY,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,YAAY,CAAsC,oCAAA,CAAA;AACzI,IAAA,CAACC,kBAA4C,GACzC,qFAAqF;AACzF,IAAA,CAACC,sBAAgD,GAC7C,2DAA2D;AAC/D,IAAA,CAACC,wBAAkD,GAC/C,6DAA6D;AACjE,IAAA,CAACC,oBAA8C,GAC3C,4EAA4E;AAChF,IAAA,CAACC,sBAAgD,GAC7C,iCAAiC;AACrC,IAAA,CAACC,iCAA2D,GACxD,sGAAsG;AAC1G,IAAA,CAACC,4BAAsD,GACnD,8GAA8G;AAClH,IAAA,CAACC,sCAAgE,GAC7D,+HAA+H;EACrI;AAEI,MAAO,oBAAqB,SAAQ,SAAS,CAAA;AAC/C,IAAA,WAAA,CAAY,SAAiB,EAAA;QACzB,KAAK,CAAC,SAAS,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1D,QAAA,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;KAC/D;AACJ,CAAA;AAEK,SAAU,0BAA0B,CACtC,SAAiB,EAAA;AAEjB,IAAA,OAAO,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC/C;;;;"}
@@ -1,41 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var Constants = require('../utils/Constants.cjs');
6
-
7
- /*
8
- * Copyright (c) Microsoft Corporation. All rights reserved.
9
- * Licensed under the MIT License.
10
- */
11
- const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
12
- const invalidResource = "invalid_resource";
13
- const missingId = "missing_client_id";
14
- const networkUnavailable = "network_unavailable";
15
- const unableToCreateAzureArc = "unable_to_create_azure_arc";
16
- const unableToCreateCloudShell = "unable_to_create_cloud_shell";
17
- const unableToCreateSource = "unable_to_create_source";
18
- const unableToReadSecretFile = "unable_to_read_secret_file";
19
- const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
20
- const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
21
- const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
22
- const MsiEnvironmentVariableUrlMalformedErrorCodes = {
23
- [Constants.ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
24
- [Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
25
- [Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
26
- [Constants.ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
27
- };
28
-
29
- exports.MsiEnvironmentVariableUrlMalformedErrorCodes = MsiEnvironmentVariableUrlMalformedErrorCodes;
30
- exports.invalidManagedIdentityIdType = invalidManagedIdentityIdType;
31
- exports.invalidResource = invalidResource;
32
- exports.missingId = missingId;
33
- exports.networkUnavailable = networkUnavailable;
34
- exports.unableToCreateAzureArc = unableToCreateAzureArc;
35
- exports.unableToCreateCloudShell = unableToCreateCloudShell;
36
- exports.unableToCreateSource = unableToCreateSource;
37
- exports.unableToReadSecretFile = unableToReadSecretFile;
38
- exports.userAssignedNotAvailableAtRuntime = userAssignedNotAvailableAtRuntime;
39
- exports.wwwAuthenticateHeaderMissing = wwwAuthenticateHeaderMissing;
40
- exports.wwwAuthenticateHeaderUnsupportedFormat = wwwAuthenticateHeaderUnsupportedFormat;
41
- //# sourceMappingURL=ManagedIdentityErrorCodes.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityErrorCodes.cjs","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"sourcesContent":[null],"names":["ManagedIdentityEnvironmentVariableNames"],"mappings":";;;;;;AAAA;;;AAGG;AAII,MAAM,4BAA4B,GAAG,mCAAmC;AACxE,MAAM,eAAe,GAAG,mBAAmB;AAC3C,MAAM,SAAS,GAAG,oBAAoB;AACtC,MAAM,kBAAkB,GAAG,sBAAsB;AACjD,MAAM,sBAAsB,GAAG,6BAA6B;AAC5D,MAAM,wBAAwB,GAAG,+BAA+B;AAChE,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,sBAAsB,GAAG,6BAA6B;AAE5D,MAAM,iCAAiC,GAC1C,yCAAyC;AACtC,MAAM,4BAA4B,GAAG,kCAAkC;AACvE,MAAM,sCAAsC,GAC/C,6CAA6C;AAEpC,MAAA,4CAA4C,GAAG;AACxD,IAAA,CAACA,iDAAuC,CAAC,iCAAiC,GACtE,iDAAiD;AACrD,IAAA,CAACA,iDAAuC,CAAC,iBAAiB,GACtD,iCAAiC;AACrC,IAAA,CAACA,iDAAuC,CAAC,aAAa,GAClD,6BAA6B;AACjC,IAAA,CAACA,iDAAuC,CAAC,YAAY,GACjD,4BAA4B;;;;;;;;;;;;;;;;"}
@@ -1,20 +0,0 @@
1
- export declare const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
2
- export declare const invalidResource = "invalid_resource";
3
- export declare const missingId = "missing_client_id";
4
- export declare const networkUnavailable = "network_unavailable";
5
- export declare const unableToCreateAzureArc = "unable_to_create_azure_arc";
6
- export declare const unableToCreateCloudShell = "unable_to_create_cloud_shell";
7
- export declare const unableToCreateSource = "unable_to_create_source";
8
- export declare const unableToReadSecretFile = "unable_to_read_secret_file";
9
- export declare const urlParseError = "url_parse_error";
10
- export declare const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
11
- export declare const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
12
- export declare const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
13
- export declare const MsiEnvironmentVariableUrlMalformedErrorCodes: {
14
- readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "azure_pod_identity_authority_host_url_malformed";
15
- readonly IDENTITY_ENDPOINT: "identity_endpoint_url_malformed";
16
- readonly IMDS_ENDPOINT: "imds_endpoint_url_malformed";
17
- readonly MSI_ENDPOINT: "msi_endpoint_url_malformed";
18
- };
19
- export type MsiEnvironmentVariableErrorCodes = (typeof MsiEnvironmentVariableUrlMalformedErrorCodes)[keyof typeof MsiEnvironmentVariableUrlMalformedErrorCodes];
20
- //# sourceMappingURL=ManagedIdentityErrorCodes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,4BAA4B,qCAAqC,CAAC;AAC/E,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAC7C,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AACvE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,iCAAiC,2CACF,CAAC;AAC7C,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,sCAAsC,+CACH,CAAC;AAEjD,eAAO,MAAM,4CAA4C;;;;;CAS/C,CAAC;AACX,MAAM,MAAM,gCAAgC,GACxC,CAAC,OAAO,4CAA4C,CAAC,CAAC,MAAM,OAAO,4CAA4C,CAAC,CAAC"}
@@ -1,28 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
4
-
5
- /*
6
- * Copyright (c) Microsoft Corporation. All rights reserved.
7
- * Licensed under the MIT License.
8
- */
9
- const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
10
- const invalidResource = "invalid_resource";
11
- const missingId = "missing_client_id";
12
- const networkUnavailable = "network_unavailable";
13
- const unableToCreateAzureArc = "unable_to_create_azure_arc";
14
- const unableToCreateCloudShell = "unable_to_create_cloud_shell";
15
- const unableToCreateSource = "unable_to_create_source";
16
- const unableToReadSecretFile = "unable_to_read_secret_file";
17
- const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
18
- const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
19
- const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
20
- const MsiEnvironmentVariableUrlMalformedErrorCodes = {
21
- [ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
22
- [ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
23
- [ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
24
- [ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
25
- };
26
-
27
- export { MsiEnvironmentVariableUrlMalformedErrorCodes, invalidManagedIdentityIdType, invalidResource, missingId, networkUnavailable, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat };
28
- //# sourceMappingURL=ManagedIdentityErrorCodes.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityErrorCodes.mjs","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAII,MAAM,4BAA4B,GAAG,mCAAmC;AACxE,MAAM,eAAe,GAAG,mBAAmB;AAC3C,MAAM,SAAS,GAAG,oBAAoB;AACtC,MAAM,kBAAkB,GAAG,sBAAsB;AACjD,MAAM,sBAAsB,GAAG,6BAA6B;AAC5D,MAAM,wBAAwB,GAAG,+BAA+B;AAChE,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,sBAAsB,GAAG,6BAA6B;AAE5D,MAAM,iCAAiC,GAC1C,yCAAyC;AACtC,MAAM,4BAA4B,GAAG,kCAAkC;AACvE,MAAM,sCAAsC,GAC/C,6CAA6C;AAEpC,MAAA,4CAA4C,GAAG;AACxD,IAAA,CAAC,uCAAuC,CAAC,iCAAiC,GACtE,iDAAiD;AACrD,IAAA,CAAC,uCAAuC,CAAC,iBAAiB,GACtD,iCAAiC;AACrC,IAAA,CAAC,uCAAuC,CAAC,aAAa,GAClD,6BAA6B;AACjC,IAAA,CAAC,uCAAuC,CAAC,YAAY,GACjD,4BAA4B;;;;;"}
@@ -1,44 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var msalCommon = require('@azure/msal-common');
6
- var Constants = require('../utils/Constants.cjs');
7
-
8
- /*
9
- * Copyright (c) Microsoft Corporation. All rights reserved.
10
- * Licensed under the MIT License.
11
- */
12
- class HttpClientWithRetries {
13
- constructor(httpClientNoRetries, retryPolicy) {
14
- this.httpClientNoRetries = httpClientNoRetries;
15
- this.retryPolicy = retryPolicy;
16
- }
17
- async sendNetworkRequestAsyncHelper(httpMethod, url, options) {
18
- if (httpMethod === Constants.HttpMethod.GET) {
19
- return this.httpClientNoRetries.sendGetRequestAsync(url, options);
20
- }
21
- else {
22
- return this.httpClientNoRetries.sendPostRequestAsync(url, options);
23
- }
24
- }
25
- async sendNetworkRequestAsync(httpMethod, url, options) {
26
- // the underlying network module (custom or HttpClient) will make the call
27
- let response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
28
- let currentRetry = 0;
29
- while (await this.retryPolicy.pauseForRetry(response.status, currentRetry, response.headers[msalCommon.HeaderNames.RETRY_AFTER])) {
30
- response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
31
- currentRetry++;
32
- }
33
- return response;
34
- }
35
- async sendGetRequestAsync(url, options) {
36
- return this.sendNetworkRequestAsync(Constants.HttpMethod.GET, url, options);
37
- }
38
- async sendPostRequestAsync(url, options) {
39
- return this.sendNetworkRequestAsync(Constants.HttpMethod.POST, url, options);
40
- }
41
- }
42
-
43
- exports.HttpClientWithRetries = HttpClientWithRetries;
44
- //# sourceMappingURL=HttpClientWithRetries.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpClientWithRetries.cjs","sources":["../../src/network/HttpClientWithRetries.ts"],"sourcesContent":[null],"names":["HttpMethod","HeaderNames"],"mappings":";;;;;;;AAAA;;;AAGG;MAWU,qBAAqB,CAAA;IAI9B,WACI,CAAA,mBAAmC,EACnC,WAA6B,EAAA;AAE7B,QAAA,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;KAClC;AAEO,IAAA,MAAM,6BAA6B,CACvC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,IAAI,UAAU,KAAKA,oBAAU,CAAC,GAAG,EAAE;YAC/B,OAAO,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACrE,SAAA;AAAM,aAAA;YACH,OAAO,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACtE,SAAA;KACJ;AAEO,IAAA,MAAM,uBAAuB,CACjC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;;AAG/B,QAAA,IAAI,QAAQ,GACR,MAAM,IAAI,CAAC,6BAA6B,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QAEvE,IAAI,YAAY,GAAW,CAAC,CAAC;QAC7B,OACI,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAChC,QAAQ,CAAC,MAAM,EACf,YAAY,EACZ,QAAQ,CAAC,OAAO,CAACC,sBAAW,CAAC,WAAW,CAAC,CAC5C,EACH;AACE,YAAA,QAAQ,GAAG,MAAM,IAAI,CAAC,6BAA6B,CAC/C,UAAU,EACV,GAAG,EACH,OAAO,CACV,CAAC;AACF,YAAA,YAAY,EAAE,CAAC;AAClB,SAAA;AAED,QAAA,OAAO,QAAQ,CAAC;KACnB;AAED,IAAA,MAAM,mBAAmB,CACrB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAACD,oBAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACrE;AAED,IAAA,MAAM,oBAAoB,CACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAACA,oBAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACtE;AACJ;;;;"}
@@ -1,12 +0,0 @@
1
- import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common";
2
- import { IHttpRetryPolicy } from "../retry/IHttpRetryPolicy";
3
- export declare class HttpClientWithRetries implements INetworkModule {
4
- private httpClientNoRetries;
5
- private retryPolicy;
6
- constructor(httpClientNoRetries: INetworkModule, retryPolicy: IHttpRetryPolicy);
7
- private sendNetworkRequestAsyncHelper;
8
- private sendNetworkRequestAsync;
9
- sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;
10
- sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;
11
- }
12
- //# sourceMappingURL=HttpClientWithRetries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpClientWithRetries.d.ts","sourceRoot":"","sources":["../../src/network/HttpClientWithRetries.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D,qBAAa,qBAAsB,YAAW,cAAc;IACxD,OAAO,CAAC,mBAAmB,CAAiB;IAC5C,OAAO,CAAC,WAAW,CAAmB;gBAGlC,mBAAmB,EAAE,cAAc,EACnC,WAAW,EAAE,gBAAgB;YAMnB,6BAA6B;YAY7B,uBAAuB;IA4B/B,mBAAmB,CAAC,CAAC,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAIxB,oBAAoB,CAAC,CAAC,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAGjC"}
@@ -1,42 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- import { HeaderNames } from '@azure/msal-common';
4
- import { HttpMethod } from '../utils/Constants.mjs';
5
-
6
- /*
7
- * Copyright (c) Microsoft Corporation. All rights reserved.
8
- * Licensed under the MIT License.
9
- */
10
- class HttpClientWithRetries {
11
- constructor(httpClientNoRetries, retryPolicy) {
12
- this.httpClientNoRetries = httpClientNoRetries;
13
- this.retryPolicy = retryPolicy;
14
- }
15
- async sendNetworkRequestAsyncHelper(httpMethod, url, options) {
16
- if (httpMethod === HttpMethod.GET) {
17
- return this.httpClientNoRetries.sendGetRequestAsync(url, options);
18
- }
19
- else {
20
- return this.httpClientNoRetries.sendPostRequestAsync(url, options);
21
- }
22
- }
23
- async sendNetworkRequestAsync(httpMethod, url, options) {
24
- // the underlying network module (custom or HttpClient) will make the call
25
- let response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
26
- let currentRetry = 0;
27
- while (await this.retryPolicy.pauseForRetry(response.status, currentRetry, response.headers[HeaderNames.RETRY_AFTER])) {
28
- response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options);
29
- currentRetry++;
30
- }
31
- return response;
32
- }
33
- async sendGetRequestAsync(url, options) {
34
- return this.sendNetworkRequestAsync(HttpMethod.GET, url, options);
35
- }
36
- async sendPostRequestAsync(url, options) {
37
- return this.sendNetworkRequestAsync(HttpMethod.POST, url, options);
38
- }
39
- }
40
-
41
- export { HttpClientWithRetries };
42
- //# sourceMappingURL=HttpClientWithRetries.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpClientWithRetries.mjs","sources":["../../src/network/HttpClientWithRetries.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAWU,qBAAqB,CAAA;IAI9B,WACI,CAAA,mBAAmC,EACnC,WAA6B,EAAA;AAE7B,QAAA,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;KAClC;AAEO,IAAA,MAAM,6BAA6B,CACvC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,IAAI,UAAU,KAAK,UAAU,CAAC,GAAG,EAAE;YAC/B,OAAO,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACrE,SAAA;AAAM,aAAA;YACH,OAAO,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACtE,SAAA;KACJ;AAEO,IAAA,MAAM,uBAAuB,CACjC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;;AAG/B,QAAA,IAAI,QAAQ,GACR,MAAM,IAAI,CAAC,6BAA6B,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QAEvE,IAAI,YAAY,GAAW,CAAC,CAAC;QAC7B,OACI,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAChC,QAAQ,CAAC,MAAM,EACf,YAAY,EACZ,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAC5C,EACH;AACE,YAAA,QAAQ,GAAG,MAAM,IAAI,CAAC,6BAA6B,CAC/C,UAAU,EACV,GAAG,EACH,OAAO,CACV,CAAC;AACF,YAAA,YAAY,EAAE,CAAC;AAClB,SAAA;AAED,QAAA,OAAO,QAAQ,CAAC;KACnB;AAED,IAAA,MAAM,mBAAmB,CACrB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACrE;AAED,IAAA,MAAM,oBAAoB,CACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACtE;AACJ;;;;"}
@@ -1,9 +0,0 @@
1
- import { CommonClientCredentialRequest } from "@azure/msal-common";
2
- import { ManagedIdentityRequestParams } from "./ManagedIdentityRequestParams";
3
- /**
4
- * ManagedIdentityRequest
5
- * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true
6
- * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default
7
- */
8
- export type ManagedIdentityRequest = ManagedIdentityRequestParams & CommonClientCredentialRequest;
9
- //# sourceMappingURL=ManagedIdentityRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityRequest.d.ts","sourceRoot":"","sources":["../../src/request/ManagedIdentityRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAC7D,6BAA6B,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * ManagedIdentityRequest
3
- * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true
4
- * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default
5
- */
6
- export type ManagedIdentityRequestParams = {
7
- forceRefresh?: boolean;
8
- resource: string;
9
- };
10
- //# sourceMappingURL=ManagedIdentityRequestParams.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityRequestParams.d.ts","sourceRoot":"","sources":["../../src/request/ManagedIdentityRequestParams.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,25 +0,0 @@
1
- import { AuthenticationScheme } from "@azure/msal-common";
2
- /**
3
- * Deserialized response object from server managed identity request.
4
- *
5
- * In case of success:
6
- * - access_token - The requested access token. When called via a secured REST API, the token is embedded in the Authorization request header field as a "bearer" token, allowing the API to authenticate the caller
7
- * - client_id - A unique identifier generated by Azure AD for the Azure Resource. The Client ID is a GUID value that uniquely identifies the application and its configuration within the identity platform
8
- * - expires_on - The timespan when the access token expires. The date is represented as the number of seconds from "1970-01-01T0:0:0Z UTC" (corresponds to the token's exp claim)
9
- * - resource - The resource the access token was requested for. It matches the resource query string parameter of the request
10
- * - token_type - The type of token returned by the Managed Identity endpoint. It's a "Bearer" access token, which means the resource can give access to the bearer of this token
11
- *
12
- * In case of error:
13
- * - message: A specific error message that can help a developer identify the root cause of an authentication error.
14
- * - correlationId: A unique identifier for the request that can help in diagnostics across components.
15
- */
16
- export type ManagedIdentityTokenResponse = {
17
- access_token?: string;
18
- client_id?: string;
19
- expires_on?: number;
20
- resource?: string;
21
- token_type?: AuthenticationScheme;
22
- message?: string;
23
- correlationId?: string;
24
- };
25
- //# sourceMappingURL=ManagedIdentityTokenResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityTokenResponse.d.ts","sourceRoot":"","sources":["../../src/response/ManagedIdentityTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,4BAA4B,GAAG;IAEvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAGlC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -1,6 +0,0 @@
1
- /// <reference types="node" />
2
- import http from "http";
3
- export interface IHttpRetryPolicy {
4
- pauseForRetry(httpStatusCode: number, currentRetry: number, retryAfterHeader: http.IncomingHttpHeaders["retry-after"]): Promise<boolean>;
5
- }
6
- //# sourceMappingURL=IHttpRetryPolicy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IHttpRetryPolicy.d.ts","sourceRoot":"","sources":["../../src/retry/IHttpRetryPolicy.ts"],"names":[],"mappings":";AAKA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,WAAW,gBAAgB;IAK7B,aAAa,CACT,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB"}
@@ -1,47 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- /*
6
- * Copyright (c) Microsoft Corporation. All rights reserved.
7
- * Licensed under the MIT License.
8
- */
9
- class LinearRetryPolicy {
10
- constructor(maxRetries, retryDelay, httpStatusCodesToRetryOn) {
11
- this.maxRetries = maxRetries;
12
- this.retryDelay = retryDelay;
13
- this.httpStatusCodesToRetryOn = httpStatusCodesToRetryOn;
14
- }
15
- retryAfterMillisecondsToSleep(retryHeader) {
16
- if (!retryHeader) {
17
- return 0;
18
- }
19
- // retry-after header is in seconds
20
- let millisToSleep = Math.round(parseFloat(retryHeader) * 1000);
21
- /*
22
- * retry-after header is in HTTP Date format
23
- * <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
24
- */
25
- if (isNaN(millisToSleep)) {
26
- millisToSleep = Math.max(0,
27
- // .valueOf() is needed to subtract dates in TypeScript
28
- new Date(retryHeader).valueOf() - new Date().valueOf());
29
- }
30
- return millisToSleep;
31
- }
32
- async pauseForRetry(httpStatusCode, currentRetry, retryAfterHeader) {
33
- if (this.httpStatusCodesToRetryOn.includes(httpStatusCode) &&
34
- currentRetry < this.maxRetries) {
35
- const retryAfterDelay = this.retryAfterMillisecondsToSleep(retryAfterHeader);
36
- await new Promise((resolve) => {
37
- // retryAfterHeader value of 0 evaluates to false, and this.retryDelay will be used
38
- return setTimeout(resolve, retryAfterDelay || this.retryDelay);
39
- });
40
- return true;
41
- }
42
- return false;
43
- }
44
- }
45
-
46
- exports.LinearRetryPolicy = LinearRetryPolicy;
47
- //# sourceMappingURL=LinearRetryPolicy.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinearRetryPolicy.cjs","sources":["../../src/retry/LinearRetryPolicy.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;MAKU,iBAAiB,CAAA;AAK1B,IAAA,WAAA,CACI,UAAkB,EAClB,UAAkB,EAClB,wBAAuC,EAAA;AAEvC,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;KAC5D;AAEO,IAAA,6BAA6B,CACjC,WAAoD,EAAA;QAEpD,IAAI,CAAC,WAAW,EAAE;AACd,YAAA,OAAO,CAAC,CAAC;AACZ,SAAA;;AAGD,QAAA,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC;AAE/D;;;AAGG;AACH,QAAA,IAAI,KAAK,CAAC,aAAa,CAAC,EAAE;AACtB,YAAA,aAAa,GAAG,IAAI,CAAC,GAAG,CACpB,CAAC;;AAED,YAAA,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CACzD,CAAC;AACL,SAAA;AAED,QAAA,OAAO,aAAa,CAAC;KACxB;AAED,IAAA,MAAM,aAAa,CACf,cAAsB,EACtB,YAAoB,EACpB,gBAAyD,EAAA;AAEzD,QAAA,IACI,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,cAAc,CAAC;AACtD,YAAA,YAAY,GAAG,IAAI,CAAC,UAAU,EAChC;YACE,MAAM,eAAe,GACjB,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,CAAC;AAEzD,YAAA,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAI;;gBAE1B,OAAO,UAAU,CAAC,OAAO,EAAE,eAAe,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;AACnE,aAAC,CAAC,CAAC;AAEH,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AAED,QAAA,OAAO,KAAK,CAAC;KAChB;AACJ;;;;"}
@@ -1,12 +0,0 @@
1
- /// <reference types="node" />
2
- import http from "http";
3
- import { IHttpRetryPolicy } from "./IHttpRetryPolicy";
4
- export declare class LinearRetryPolicy implements IHttpRetryPolicy {
5
- maxRetries: number;
6
- retryDelay: number;
7
- httpStatusCodesToRetryOn: Array<number>;
8
- constructor(maxRetries: number, retryDelay: number, httpStatusCodesToRetryOn: Array<number>);
9
- private retryAfterMillisecondsToSleep;
10
- pauseForRetry(httpStatusCode: number, currentRetry: number, retryAfterHeader: http.IncomingHttpHeaders["retry-after"]): Promise<boolean>;
11
- }
12
- //# sourceMappingURL=LinearRetryPolicy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinearRetryPolicy.d.ts","sourceRoot":"","sources":["../../src/retry/LinearRetryPolicy.ts"],"names":[],"mappings":";AAKA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,iBAAkB,YAAW,gBAAgB;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBAGpC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC;IAO3C,OAAO,CAAC,6BAA6B;IAyB/B,aAAa,CACf,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC;CAkBtB"}
@@ -1,45 +0,0 @@
1
- /*! @azure/msal-node v2.6.5-alpha.0 2024-03-04 */
2
- 'use strict';
3
- /*
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Licensed under the MIT License.
6
- */
7
- class LinearRetryPolicy {
8
- constructor(maxRetries, retryDelay, httpStatusCodesToRetryOn) {
9
- this.maxRetries = maxRetries;
10
- this.retryDelay = retryDelay;
11
- this.httpStatusCodesToRetryOn = httpStatusCodesToRetryOn;
12
- }
13
- retryAfterMillisecondsToSleep(retryHeader) {
14
- if (!retryHeader) {
15
- return 0;
16
- }
17
- // retry-after header is in seconds
18
- let millisToSleep = Math.round(parseFloat(retryHeader) * 1000);
19
- /*
20
- * retry-after header is in HTTP Date format
21
- * <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
22
- */
23
- if (isNaN(millisToSleep)) {
24
- millisToSleep = Math.max(0,
25
- // .valueOf() is needed to subtract dates in TypeScript
26
- new Date(retryHeader).valueOf() - new Date().valueOf());
27
- }
28
- return millisToSleep;
29
- }
30
- async pauseForRetry(httpStatusCode, currentRetry, retryAfterHeader) {
31
- if (this.httpStatusCodesToRetryOn.includes(httpStatusCode) &&
32
- currentRetry < this.maxRetries) {
33
- const retryAfterDelay = this.retryAfterMillisecondsToSleep(retryAfterHeader);
34
- await new Promise((resolve) => {
35
- // retryAfterHeader value of 0 evaluates to false, and this.retryDelay will be used
36
- return setTimeout(resolve, retryAfterDelay || this.retryDelay);
37
- });
38
- return true;
39
- }
40
- return false;
41
- }
42
- }
43
-
44
- export { LinearRetryPolicy };
45
- //# sourceMappingURL=LinearRetryPolicy.mjs.map