@azure/msal-node 3.7.4 → 5.0.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 (316) hide show
  1. package/README.md +2 -1
  2. package/dist/cache/CacheHelpers.d.ts.map +1 -1
  3. package/dist/cache/CacheHelpers.mjs +4 -5
  4. package/dist/cache/CacheHelpers.mjs.map +1 -1
  5. package/dist/cache/NodeStorage.d.ts.map +1 -1
  6. package/dist/cache/NodeStorage.mjs +17 -18
  7. package/dist/cache/NodeStorage.mjs.map +1 -1
  8. package/dist/cache/TokenCache.d.ts.map +1 -1
  9. package/dist/cache/TokenCache.mjs +15 -15
  10. package/dist/cache/TokenCache.mjs.map +1 -1
  11. package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
  12. package/dist/cache/distributed/DistributedCachePlugin.mjs +3 -3
  13. package/dist/cache/distributed/DistributedCachePlugin.mjs.map +1 -1
  14. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  15. package/dist/cache/serializer/Deserializer.mjs +3 -5
  16. package/dist/cache/serializer/Deserializer.mjs.map +1 -1
  17. package/dist/cache/serializer/Serializer.d.ts.map +1 -1
  18. package/dist/cache/serializer/Serializer.mjs +1 -3
  19. package/dist/cache/serializer/Serializer.mjs.map +1 -1
  20. package/dist/cache/serializer/SerializerTypes.d.ts +0 -2
  21. package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -1
  22. package/dist/client/ClientApplication.d.ts.map +1 -1
  23. package/dist/client/ClientApplication.mjs +33 -43
  24. package/dist/client/ClientApplication.mjs.map +1 -1
  25. package/dist/client/ClientAssertion.d.ts.map +1 -1
  26. package/dist/client/ClientAssertion.mjs +6 -5
  27. package/dist/client/ClientAssertion.mjs.map +1 -1
  28. package/dist/client/ClientCredentialClient.d.ts +3 -2
  29. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  30. package/dist/client/ClientCredentialClient.mjs +23 -22
  31. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  32. package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
  33. package/dist/client/ConfidentialClientApplication.mjs +10 -9
  34. package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
  35. package/dist/client/DeviceCodeClient.d.ts +2 -1
  36. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  37. package/dist/client/DeviceCodeClient.mjs +19 -18
  38. package/dist/client/DeviceCodeClient.mjs.map +1 -1
  39. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  40. package/dist/client/ManagedIdentityApplication.mjs +7 -6
  41. package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
  42. package/dist/client/ManagedIdentityClient.mjs +1 -1
  43. package/dist/client/ManagedIdentityClient.mjs.map +1 -1
  44. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  45. package/dist/client/ManagedIdentitySources/AppService.mjs +3 -3
  46. package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -1
  47. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  48. package/dist/client/ManagedIdentitySources/AzureArc.mjs +8 -8
  49. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
  50. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  51. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +12 -11
  52. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
  53. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  54. package/dist/client/ManagedIdentitySources/CloudShell.mjs +3 -3
  55. package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +1 -1
  56. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  57. package/dist/client/ManagedIdentitySources/Imds.mjs +3 -3
  58. package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
  59. package/dist/client/ManagedIdentitySources/MachineLearning.d.ts.map +1 -1
  60. package/dist/client/ManagedIdentitySources/MachineLearning.mjs +3 -3
  61. package/dist/client/ManagedIdentitySources/MachineLearning.mjs.map +1 -1
  62. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  63. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +4 -4
  64. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +1 -1
  65. package/dist/client/OnBehalfOfClient.d.ts +2 -1
  66. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  67. package/dist/client/OnBehalfOfClient.mjs +19 -19
  68. package/dist/client/OnBehalfOfClient.mjs.map +1 -1
  69. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  70. package/dist/client/PublicClientApplication.mjs +12 -27
  71. package/dist/client/PublicClientApplication.mjs.map +1 -1
  72. package/dist/client/UsernamePasswordClient.d.ts +2 -1
  73. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  74. package/dist/client/UsernamePasswordClient.mjs +8 -8
  75. package/dist/client/UsernamePasswordClient.mjs.map +1 -1
  76. package/dist/config/Configuration.d.ts +2 -13
  77. package/dist/config/Configuration.d.ts.map +1 -1
  78. package/dist/config/Configuration.mjs +17 -22
  79. package/dist/config/Configuration.mjs.map +1 -1
  80. package/dist/config/ManagedIdentityId.mjs +1 -1
  81. package/dist/config/ManagedIdentityId.mjs.map +1 -1
  82. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  83. package/dist/config/ManagedIdentityRequestParameters.mjs.map +1 -1
  84. package/dist/crypto/CryptoProvider.d.ts.map +1 -1
  85. package/dist/crypto/CryptoProvider.mjs +5 -3
  86. package/dist/crypto/CryptoProvider.mjs.map +1 -1
  87. package/dist/crypto/GuidGenerator.mjs +1 -1
  88. package/dist/crypto/GuidGenerator.mjs.map +1 -1
  89. package/dist/crypto/HashUtils.mjs +1 -1
  90. package/dist/crypto/HashUtils.mjs.map +1 -1
  91. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  92. package/dist/crypto/PkceGenerator.mjs +6 -4
  93. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  94. package/dist/error/ClientAuthErrorCodes.d.ts +8 -0
  95. package/dist/error/ClientAuthErrorCodes.d.ts.map +1 -0
  96. package/dist/error/ClientAuthErrorCodes.mjs +16 -0
  97. package/dist/error/ClientAuthErrorCodes.mjs.map +1 -0
  98. package/dist/error/ManagedIdentityError.mjs +1 -1
  99. package/dist/error/ManagedIdentityError.mjs.map +1 -1
  100. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  101. package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
  102. package/dist/error/NodeAuthError.d.ts +0 -8
  103. package/dist/error/NodeAuthError.d.ts.map +1 -1
  104. package/dist/error/NodeAuthError.mjs +1 -11
  105. package/dist/error/NodeAuthError.mjs.map +1 -1
  106. package/dist/index.d.ts +15 -5
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.mjs +20 -2
  109. package/dist/index.mjs.map +1 -1
  110. package/dist/internals.mjs +1 -1
  111. package/dist/network/HttpClient.d.ts.map +1 -1
  112. package/dist/network/HttpClient.mjs +15 -13
  113. package/dist/network/HttpClient.mjs.map +1 -1
  114. package/dist/network/HttpClientWithRetries.mjs +3 -3
  115. package/dist/network/HttpClientWithRetries.mjs.map +1 -1
  116. package/dist/network/LoopbackClient.d.ts.map +1 -1
  117. package/dist/network/LoopbackClient.mjs +3 -3
  118. package/dist/network/LoopbackClient.mjs.map +1 -1
  119. package/dist/packageMetadata.d.ts +1 -1
  120. package/dist/packageMetadata.d.ts.map +1 -1
  121. package/dist/packageMetadata.mjs +2 -2
  122. package/dist/protocol/Authorize.d.ts.map +1 -1
  123. package/dist/protocol/Authorize.mjs +5 -5
  124. package/dist/protocol/Authorize.mjs.map +1 -1
  125. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  126. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  127. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  128. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  129. package/dist/request/ClientCredentialRequest.d.ts +4 -3
  130. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  131. package/dist/request/CommonClientCredentialRequest.d.ts +16 -0
  132. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -0
  133. package/dist/request/CommonDeviceCodeRequest.d.ts +20 -0
  134. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  135. package/dist/request/CommonOnBehalfOfRequest.d.ts +14 -0
  136. package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  137. package/dist/request/CommonUsernamePasswordRequest.d.ts +18 -0
  138. package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  139. package/dist/request/DeviceCodeRequest.d.ts +3 -2
  140. package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
  141. package/dist/request/InteractiveRequest.d.ts +1 -1
  142. package/dist/request/InteractiveRequest.d.ts.map +1 -1
  143. package/dist/request/ManagedIdentityRequest.d.ts +1 -1
  144. package/dist/request/ManagedIdentityRequest.d.ts.map +1 -1
  145. package/dist/request/OnBehalfOfRequest.d.ts +2 -2
  146. package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
  147. package/dist/request/RefreshTokenRequest.d.ts +1 -1
  148. package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
  149. package/dist/request/SilentFlowRequest.d.ts +1 -1
  150. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  151. package/dist/request/UsernamePasswordRequest.d.ts +2 -2
  152. package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
  153. package/dist/response/ManagedIdentityTokenResponse.d.ts +2 -2
  154. package/dist/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
  155. package/dist/retry/DefaultManagedIdentityRetryPolicy.d.ts +1 -1
  156. package/dist/retry/DefaultManagedIdentityRetryPolicy.d.ts.map +1 -1
  157. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +9 -9
  158. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs.map +1 -1
  159. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  160. package/dist/retry/ExponentialRetryStrategy.mjs.map +1 -1
  161. package/dist/retry/IHttpRetryPolicy.d.ts +1 -1
  162. package/dist/retry/IHttpRetryPolicy.d.ts.map +1 -1
  163. package/dist/retry/ImdsRetryPolicy.d.ts +1 -1
  164. package/dist/retry/ImdsRetryPolicy.d.ts.map +1 -1
  165. package/dist/retry/ImdsRetryPolicy.mjs +11 -11
  166. package/dist/retry/ImdsRetryPolicy.mjs.map +1 -1
  167. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  168. package/dist/retry/LinearRetryStrategy.mjs.map +1 -1
  169. package/dist/utils/Constants.d.ts +4 -4
  170. package/dist/utils/Constants.mjs +5 -5
  171. package/dist/utils/Constants.mjs.map +1 -1
  172. package/dist/utils/EncodingUtils.d.ts.map +1 -1
  173. package/dist/utils/EncodingUtils.mjs +5 -5
  174. package/dist/utils/EncodingUtils.mjs.map +1 -1
  175. package/dist/utils/NetworkUtils.mjs +1 -1
  176. package/dist/utils/NetworkUtils.mjs.map +1 -1
  177. package/dist/utils/TimeUtils.mjs +1 -1
  178. package/dist/utils/TimeUtils.mjs.map +1 -1
  179. package/lib/msal-node.cjs +1397 -2244
  180. package/lib/msal-node.cjs.map +1 -1
  181. package/lib/types/cache/CacheHelpers.d.ts.map +1 -1
  182. package/lib/types/cache/NodeStorage.d.ts.map +1 -1
  183. package/lib/types/cache/TokenCache.d.ts.map +1 -1
  184. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
  185. package/lib/types/cache/serializer/Deserializer.d.ts.map +1 -1
  186. package/lib/types/cache/serializer/Serializer.d.ts.map +1 -1
  187. package/lib/types/cache/serializer/SerializerTypes.d.ts +0 -2
  188. package/lib/types/cache/serializer/SerializerTypes.d.ts.map +1 -1
  189. package/lib/types/client/ClientApplication.d.ts.map +1 -1
  190. package/lib/types/client/ClientAssertion.d.ts.map +1 -1
  191. package/lib/types/client/ClientCredentialClient.d.ts +3 -2
  192. package/lib/types/client/ClientCredentialClient.d.ts.map +1 -1
  193. package/lib/types/client/ConfidentialClientApplication.d.ts.map +1 -1
  194. package/lib/types/client/DeviceCodeClient.d.ts +2 -1
  195. package/lib/types/client/DeviceCodeClient.d.ts.map +1 -1
  196. package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -1
  197. package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  198. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  199. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  200. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  201. package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  202. package/lib/types/client/ManagedIdentitySources/MachineLearning.d.ts.map +1 -1
  203. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  204. package/lib/types/client/OnBehalfOfClient.d.ts +2 -1
  205. package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -1
  206. package/lib/types/client/PublicClientApplication.d.ts.map +1 -1
  207. package/lib/types/client/UsernamePasswordClient.d.ts +2 -1
  208. package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -1
  209. package/lib/types/config/Configuration.d.ts +2 -13
  210. package/lib/types/config/Configuration.d.ts.map +1 -1
  211. package/lib/types/crypto/CryptoProvider.d.ts.map +1 -1
  212. package/lib/types/crypto/PkceGenerator.d.ts.map +1 -1
  213. package/lib/types/error/ClientAuthErrorCodes.d.ts +8 -0
  214. package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -0
  215. package/lib/types/error/NodeAuthError.d.ts +0 -8
  216. package/lib/types/error/NodeAuthError.d.ts.map +1 -1
  217. package/lib/types/index.d.ts +15 -5
  218. package/lib/types/index.d.ts.map +1 -1
  219. package/lib/types/network/HttpClient.d.ts.map +1 -1
  220. package/lib/types/network/LoopbackClient.d.ts.map +1 -1
  221. package/lib/types/packageMetadata.d.ts +1 -1
  222. package/lib/types/packageMetadata.d.ts.map +1 -1
  223. package/lib/types/protocol/Authorize.d.ts.map +1 -1
  224. package/lib/types/request/AuthorizationCodeRequest.d.ts +1 -1
  225. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -1
  226. package/lib/types/request/AuthorizationUrlRequest.d.ts +1 -1
  227. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -1
  228. package/lib/types/request/ClientCredentialRequest.d.ts +4 -3
  229. package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -1
  230. package/lib/types/request/CommonClientCredentialRequest.d.ts +16 -0
  231. package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -0
  232. package/lib/types/request/CommonDeviceCodeRequest.d.ts +20 -0
  233. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  234. package/lib/types/request/CommonOnBehalfOfRequest.d.ts +14 -0
  235. package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  236. package/lib/types/request/CommonUsernamePasswordRequest.d.ts +18 -0
  237. package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  238. package/lib/types/request/DeviceCodeRequest.d.ts +3 -2
  239. package/lib/types/request/DeviceCodeRequest.d.ts.map +1 -1
  240. package/lib/types/request/InteractiveRequest.d.ts +1 -1
  241. package/lib/types/request/InteractiveRequest.d.ts.map +1 -1
  242. package/lib/types/request/ManagedIdentityRequest.d.ts +1 -1
  243. package/lib/types/request/ManagedIdentityRequest.d.ts.map +1 -1
  244. package/lib/types/request/OnBehalfOfRequest.d.ts +2 -2
  245. package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -1
  246. package/lib/types/request/RefreshTokenRequest.d.ts +1 -1
  247. package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -1
  248. package/lib/types/request/SilentFlowRequest.d.ts +1 -1
  249. package/lib/types/request/SilentFlowRequest.d.ts.map +1 -1
  250. package/lib/types/request/UsernamePasswordRequest.d.ts +2 -2
  251. package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -1
  252. package/lib/types/response/ManagedIdentityTokenResponse.d.ts +2 -2
  253. package/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
  254. package/lib/types/retry/DefaultManagedIdentityRetryPolicy.d.ts +1 -1
  255. package/lib/types/retry/DefaultManagedIdentityRetryPolicy.d.ts.map +1 -1
  256. package/lib/types/retry/IHttpRetryPolicy.d.ts +1 -1
  257. package/lib/types/retry/IHttpRetryPolicy.d.ts.map +1 -1
  258. package/lib/types/retry/ImdsRetryPolicy.d.ts +1 -1
  259. package/lib/types/retry/ImdsRetryPolicy.d.ts.map +1 -1
  260. package/lib/types/utils/Constants.d.ts +4 -4
  261. package/lib/types/utils/EncodingUtils.d.ts.map +1 -1
  262. package/package.json +88 -90
  263. package/src/cache/CacheHelpers.ts +3 -5
  264. package/src/cache/NodeStorage.ts +21 -16
  265. package/src/cache/TokenCache.ts +18 -14
  266. package/src/cache/distributed/DistributedCachePlugin.ts +2 -1
  267. package/src/cache/serializer/Deserializer.ts +7 -9
  268. package/src/cache/serializer/Serializer.ts +0 -2
  269. package/src/cache/serializer/SerializerTypes.ts +0 -2
  270. package/src/client/ClientApplication.ts +50 -57
  271. package/src/client/ClientAssertion.ts +5 -6
  272. package/src/client/ClientCredentialClient.ts +33 -25
  273. package/src/client/ConfidentialClientApplication.ts +13 -13
  274. package/src/client/DeviceCodeClient.ts +32 -19
  275. package/src/client/ManagedIdentityApplication.ts +10 -7
  276. package/src/client/ManagedIdentitySources/AppService.ts +4 -2
  277. package/src/client/ManagedIdentitySources/AzureArc.ts +14 -8
  278. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +18 -9
  279. package/src/client/ManagedIdentitySources/CloudShell.ts +4 -2
  280. package/src/client/ManagedIdentitySources/Imds.ts +4 -2
  281. package/src/client/ManagedIdentitySources/MachineLearning.ts +4 -2
  282. package/src/client/ManagedIdentitySources/ServiceFabric.ts +6 -3
  283. package/src/client/OnBehalfOfClient.ts +28 -21
  284. package/src/client/PublicClientApplication.ts +13 -31
  285. package/src/client/UsernamePasswordClient.ts +15 -8
  286. package/src/config/Configuration.ts +18 -35
  287. package/src/crypto/CryptoProvider.ts +5 -3
  288. package/src/crypto/PkceGenerator.ts +6 -4
  289. package/src/error/ClientAuthErrorCodes.ts +12 -0
  290. package/src/error/NodeAuthError.ts +0 -14
  291. package/src/index.ts +5 -11
  292. package/src/network/HttpClient.ts +11 -9
  293. package/src/network/HttpClientWithRetries.ts +2 -2
  294. package/src/network/LoopbackClient.ts +2 -3
  295. package/src/packageMetadata.ts +1 -1
  296. package/src/protocol/Authorize.ts +7 -9
  297. package/src/request/AuthorizationCodeRequest.ts +0 -1
  298. package/src/request/AuthorizationUrlRequest.ts +0 -1
  299. package/src/request/ClientCredentialRequest.ts +3 -6
  300. package/src/request/CommonClientCredentialRequest.ts +25 -0
  301. package/src/request/CommonDeviceCodeRequest.ts +33 -0
  302. package/src/request/CommonOnBehalfOfRequest.ts +19 -0
  303. package/src/request/CommonUsernamePasswordRequest.ts +23 -0
  304. package/src/request/DeviceCodeRequest.ts +2 -5
  305. package/src/request/InteractiveRequest.ts +1 -1
  306. package/src/request/ManagedIdentityRequest.ts +1 -1
  307. package/src/request/OnBehalfOfRequest.ts +1 -2
  308. package/src/request/RefreshTokenRequest.ts +0 -1
  309. package/src/request/SilentFlowRequest.ts +1 -4
  310. package/src/request/UsernamePasswordRequest.ts +1 -2
  311. package/src/response/ManagedIdentityTokenResponse.ts +2 -2
  312. package/src/retry/DefaultManagedIdentityRetryPolicy.ts +9 -8
  313. package/src/retry/IHttpRetryPolicy.ts +1 -1
  314. package/src/retry/ImdsRetryPolicy.ts +11 -10
  315. package/src/utils/Constants.ts +5 -5
  316. package/src/utils/EncodingUtils.ts +8 -4
package/src/index.ts CHANGED
@@ -13,6 +13,7 @@
13
13
  * Breaking changes to these APIs will be shipped under a minor version, instead of a major version.
14
14
  */
15
15
  import * as internals from "./internals.js";
16
+ import { Constants as CommonConstants } from "@azure/msal-common/node";
16
17
  export { internals };
17
18
 
18
19
  // Interfaces
@@ -78,36 +79,29 @@ export type { InteractiveRequest } from "./request/InteractiveRequest.js";
78
79
  export type { SignOutRequest } from "./request/SignOutRequest.js";
79
80
  export type { ManagedIdentityRequestParams } from "./request/ManagedIdentityRequestParams.js";
80
81
 
82
+ const PromptValue = CommonConstants.PromptValue;
83
+ const ResponseMode = CommonConstants.ResponseMode;
84
+ export { PromptValue, ResponseMode };
85
+
81
86
  // Common Object Formats
82
87
  export {
83
- // Request
84
- PromptValue,
85
- ResponseMode,
86
88
  AuthorizationCodePayload,
87
89
  // Response
88
90
  AuthenticationResult,
89
91
  AuthorizeResponse,
90
- /**
91
- * @deprecated Use AuthorizeResponse instead
92
- */
93
- AuthorizeResponse as ServerAuthorizationCodeResponse,
94
92
  IdTokenClaims,
95
93
  // Cache
96
94
  AccountInfo,
97
95
  ValidCacheType,
98
96
  // Error
99
97
  AuthError,
100
- AuthErrorMessage,
101
98
  AuthErrorCodes,
102
99
  ClientAuthError,
103
100
  ClientAuthErrorCodes,
104
- ClientAuthErrorMessage,
105
101
  ClientConfigurationError,
106
102
  ClientConfigurationErrorCodes,
107
- ClientConfigurationErrorMessage,
108
103
  InteractionRequiredAuthError,
109
104
  InteractionRequiredAuthErrorCodes,
110
- InteractionRequiredAuthErrorMessage,
111
105
  ServerError,
112
106
  // Network Interface
113
107
  INetworkModule,
@@ -4,10 +4,10 @@
4
4
  */
5
5
 
6
6
  import {
7
+ Constants as CommonConstants,
7
8
  INetworkModule,
8
9
  NetworkRequestOptions,
9
10
  NetworkResponse,
10
- HttpStatus,
11
11
  } from "@azure/msal-common/node";
12
12
  import { HttpMethod, Constants, ProxyStatus } from "../utils/Constants.js";
13
13
  import { NetworkUtils } from "../utils/NetworkUtils.js";
@@ -240,8 +240,10 @@ const networkRequestViaProxy = <T>(
240
240
  );
241
241
 
242
242
  if (
243
- (httpStatusCode < HttpStatus.SUCCESS_RANGE_START ||
244
- httpStatusCode > HttpStatus.SUCCESS_RANGE_END) &&
243
+ (httpStatusCode <
244
+ CommonConstants.HTTP_SUCCESS_RANGE_START ||
245
+ httpStatusCode >
246
+ CommonConstants.HTTP_SUCCESS_RANGE_END) &&
245
247
  // do not destroy the request for the device code flow
246
248
  networkResponse.body["error"] !==
247
249
  Constants.AUTHORIZATION_PENDING
@@ -349,8 +351,8 @@ const networkRequestViaHttps = <T>(
349
351
  );
350
352
 
351
353
  if (
352
- (statusCode < HttpStatus.SUCCESS_RANGE_START ||
353
- statusCode > HttpStatus.SUCCESS_RANGE_END) &&
354
+ (statusCode < CommonConstants.HTTP_SUCCESS_RANGE_START ||
355
+ statusCode > CommonConstants.HTTP_SUCCESS_RANGE_END) &&
354
356
  // do not destroy the request for the device code flow
355
357
  networkResponse.body["error"] !==
356
358
  Constants.AUTHORIZATION_PENDING
@@ -397,14 +399,14 @@ const parseBody = (
397
399
  let errorType;
398
400
  let errorDescriptionHelper;
399
401
  if (
400
- statusCode >= HttpStatus.CLIENT_ERROR_RANGE_START &&
401
- statusCode <= HttpStatus.CLIENT_ERROR_RANGE_END
402
+ statusCode >= CommonConstants.HTTP_CLIENT_ERROR_RANGE_START &&
403
+ statusCode <= CommonConstants.HTTP_CLIENT_ERROR_RANGE_END
402
404
  ) {
403
405
  errorType = "client_error";
404
406
  errorDescriptionHelper = "A client";
405
407
  } else if (
406
- statusCode >= HttpStatus.SERVER_ERROR_RANGE_START &&
407
- statusCode <= HttpStatus.SERVER_ERROR_RANGE_END
408
+ statusCode >= CommonConstants.HTTP_SERVER_ERROR_RANGE_START &&
409
+ statusCode <= CommonConstants.HTTP_SERVER_ERROR_RANGE_END
408
410
  ) {
409
411
  errorType = "server_error";
410
412
  errorDescriptionHelper = "A server";
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import {
7
- HeaderNames,
7
+ Constants,
8
8
  INetworkModule,
9
9
  Logger,
10
10
  NetworkRequestOptions,
@@ -59,7 +59,7 @@ export class HttpClientWithRetries implements INetworkModule {
59
59
  response.status,
60
60
  currentRetry,
61
61
  this.logger,
62
- response.headers[HeaderNames.RETRY_AFTER]
62
+ response.headers[Constants.HeaderNames.RETRY_AFTER]
63
63
  )
64
64
  ) {
65
65
  response = await this.sendNetworkRequestAsyncHelper(
@@ -4,9 +4,8 @@
4
4
  */
5
5
 
6
6
  import {
7
- Constants as CommonConstants,
8
7
  AuthorizeResponse,
9
- HttpStatus,
8
+ Constants as CommonConstants,
10
9
  UrlUtils,
11
10
  } from "@azure/msal-common/node";
12
11
  import http from "http";
@@ -58,7 +57,7 @@ export class LoopbackClient implements ILoopbackClient {
58
57
  UrlUtils.getDeserializedResponse(parsedUrl.search) ||
59
58
  {};
60
59
  if (authCodeResponse.code) {
61
- res.writeHead(HttpStatus.REDIRECT, {
60
+ res.writeHead(CommonConstants.HTTP_REDIRECT, {
62
61
  location: redirectUri,
63
62
  }); // Prevent auth code from being saved in the browser history
64
63
  res.end();
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable header/header */
2
2
  export const name = "@azure/msal-node";
3
- export const version = "3.7.4";
3
+ export const version = "5.0.0-alpha.0";
@@ -8,7 +8,7 @@ import {
8
8
  AuthorizeProtocol,
9
9
  CommonAuthorizationUrlRequest,
10
10
  Logger,
11
- OAuthResponseType,
11
+ Constants,
12
12
  ProtocolMode,
13
13
  RequestParameterBuilder,
14
14
  } from "@azure/msal-common/node";
@@ -45,13 +45,16 @@ export function getAuthCodeRequestUrl(
45
45
  cpu: process.arch || "",
46
46
  os: process.platform || "",
47
47
  });
48
- if (config.auth.protocolMode !== ProtocolMode.OIDC) {
48
+ if (config.system.protocolMode !== ProtocolMode.OIDC) {
49
49
  RequestParameterBuilder.addApplicationTelemetry(
50
50
  parameters,
51
51
  config.telemetry.application
52
52
  );
53
53
  }
54
- RequestParameterBuilder.addResponseType(parameters, OAuthResponseType.CODE);
54
+ RequestParameterBuilder.addResponseType(
55
+ parameters,
56
+ Constants.OAuthResponseType.CODE
57
+ );
55
58
  if (request.codeChallenge && request.codeChallengeMethod) {
56
59
  RequestParameterBuilder.addCodeChallengeParams(
57
60
  parameters,
@@ -65,10 +68,5 @@ export function getAuthCodeRequestUrl(
65
68
  request.extraQueryParameters || {}
66
69
  );
67
70
 
68
- return AuthorizeProtocol.getAuthorizeUrl(
69
- authority,
70
- parameters,
71
- config.auth.encodeExtraQueryParams,
72
- request.extraQueryParameters
73
- );
71
+ return AuthorizeProtocol.getAuthorizeUrl(authority, parameters);
74
72
  }
@@ -28,7 +28,6 @@ export type AuthorizationCodeRequest = Partial<
28
28
  | "authenticationScheme"
29
29
  | "resourceRequestMethod"
30
30
  | "resourceRequestUri"
31
- | "requestedClaimsHash"
32
31
  | "storeInCache"
33
32
  >
34
33
  > & {
@@ -41,7 +41,6 @@ export type AuthorizationUrlRequest = Partial<
41
41
  | "resourceRequestMethod"
42
42
  | "resourceRequestUri"
43
43
  | "authenticationScheme"
44
- | "requestedClaimsHash"
45
44
  | "storeInCache"
46
45
  >
47
46
  > & {
@@ -3,13 +3,11 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import {
7
- ClientAssertionCallback,
8
- CommonClientCredentialRequest,
9
- } from "@azure/msal-common/node";
6
+ import { ClientAssertionCallback } from "@azure/msal-common/node";
7
+ import { CommonClientCredentialRequest } from "./CommonClientCredentialRequest.js";
10
8
 
11
9
  /**
12
- * CommonClientCredentialRequest
10
+ * ClientCredentialRequest
13
11
  * - scopes - Array of scopes the application is requesting access to. Typically contains only the .default scope for a single resource. See: https://learn.microsoft.com/azure/active-directory/develop/scopes-oidc#the-default-scope
14
12
  * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
15
13
  * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
@@ -23,7 +21,6 @@ export type ClientCredentialRequest = Partial<
23
21
  CommonClientCredentialRequest,
24
22
  | "resourceRequestMethod"
25
23
  | "resourceRequestUri"
26
- | "requestedClaimsHash"
27
24
  | "clientAssertion"
28
25
  | "storeInCache"
29
26
  >
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import {
7
+ BaseAuthRequest,
8
+ AzureRegion,
9
+ ClientAssertion,
10
+ } from "@azure/msal-common/node";
11
+
12
+ /**
13
+ * CommonClientCredentialRequest
14
+ * - scopes - Array of scopes the application is requesting access to.
15
+ * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
16
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
17
+ * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
18
+ * - preferredAzureRegionOptions - Options of the user's preferred azure region
19
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
20
+ */
21
+ export type CommonClientCredentialRequest = BaseAuthRequest & {
22
+ skipCache?: boolean;
23
+ azureRegion?: AzureRegion;
24
+ clientAssertion?: ClientAssertion;
25
+ };
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import {
7
+ DeviceCodeResponse,
8
+ StringDict,
9
+ BaseAuthRequest,
10
+ } from "@azure/msal-common/node";
11
+
12
+ /**
13
+ * Parameters for Oauth2 device code flow.
14
+ * - scopes - Array of scopes the application is requesting access to.
15
+ * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests.
16
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
17
+ * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials.
18
+ * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true.
19
+ * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
20
+ * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
21
+ * - timeout - Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period.
22
+ * - extraQueryParameters - String to string map of custom query parameters added to the query string
23
+ */
24
+ // export type CommonDeviceCodeRequest = BaseAuthRequest & {
25
+ export type CommonDeviceCodeRequest = Omit<
26
+ BaseAuthRequest,
27
+ "tokenQueryParameters" | "tokenBodyParameters"
28
+ > & {
29
+ deviceCodeCallback: (response: DeviceCodeResponse) => void;
30
+ cancel?: boolean;
31
+ timeout?: number;
32
+ extraQueryParameters?: StringDict;
33
+ };
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { BaseAuthRequest } from "@azure/msal-common/node";
7
+
8
+ /**
9
+ * - scopes - Array of scopes the application is requesting access to.
10
+ * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
11
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
12
+ * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
13
+ * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
14
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
15
+ */
16
+ export type CommonOnBehalfOfRequest = BaseAuthRequest & {
17
+ oboAssertion: string;
18
+ skipCache?: boolean;
19
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { BaseAuthRequest } from "@azure/msal-common/node";
7
+
8
+ /**
9
+ * CommonUsernamePassword parameters passed by the user to retrieve credentials
10
+ * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing.
11
+ *
12
+ * - scopes - Array of scopes the application is requesting access to.
13
+ * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
14
+ * - authority - Url of the authority which the application acquires tokens from.
15
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
16
+ * - username - username of the client
17
+ * - password - credentials
18
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
19
+ */
20
+ export type CommonUsernamePasswordRequest = BaseAuthRequest & {
21
+ username: string;
22
+ password: string;
23
+ };
@@ -3,10 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import {
7
- CommonDeviceCodeRequest,
8
- DeviceCodeResponse,
9
- } from "@azure/msal-common/node";
6
+ import { DeviceCodeResponse } from "@azure/msal-common/node";
7
+ import { CommonDeviceCodeRequest } from "./CommonDeviceCodeRequest.js";
10
8
 
11
9
  /**
12
10
  * Parameters for Oauth2 device code flow.
@@ -25,7 +23,6 @@ export type DeviceCodeRequest = Partial<
25
23
  | "deviceCodeCallback"
26
24
  | "resourceRequestMethod"
27
25
  | "resourceRequestUri"
28
- | "requestedClaimsHash"
29
26
  | "storeInCache"
30
27
  >
31
28
  > & {
@@ -20,7 +20,7 @@ import { ILoopbackClient } from "../network/ILoopbackClient.js";
20
20
  export type InteractiveRequest = Partial<
21
21
  Omit<
22
22
  CommonAuthorizationUrlRequest,
23
- "scopes" | "requestedClaimsHash" | "storeInCache"
23
+ "scopes" | "redirectUri" | "storeInCache"
24
24
  >
25
25
  > & {
26
26
  openBrowser: (url: string) => Promise<void>;
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { CommonClientCredentialRequest } from "@azure/msal-common/node";
6
+ import { CommonClientCredentialRequest } from "./CommonClientCredentialRequest.js";
7
7
  import { ManagedIdentityRequestParams } from "./ManagedIdentityRequestParams.js";
8
8
 
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { CommonOnBehalfOfRequest } from "@azure/msal-common/node";
6
+ import { CommonOnBehalfOfRequest } from "./CommonOnBehalfOfRequest.js";
7
7
 
8
8
  /**
9
9
  * - scopes - Array of scopes the application is requesting access to.
@@ -21,7 +21,6 @@ export type OnBehalfOfRequest = Partial<
21
21
  | "scopes"
22
22
  | "resourceRequestMethod"
23
23
  | "resourceRequestUri"
24
- | "requestedClaimsHash"
25
24
  | "storeInCache"
26
25
  >
27
26
  > & {
@@ -24,7 +24,6 @@ export type RefreshTokenRequest = Partial<
24
24
  | "authenticationScheme"
25
25
  | "resourceRequestMethod"
26
26
  | "resourceRequestUri"
27
- | "requestedClaimsHash"
28
27
  | "storeInCache"
29
28
  >
30
29
  > & {
@@ -17,10 +17,7 @@ import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node";
17
17
  * @public
18
18
  */
19
19
  export type SilentFlowRequest = Partial<
20
- Omit<
21
- CommonSilentFlowRequest,
22
- "account" | "scopes" | "requestedClaimsHash" | "storeInCache"
23
- >
20
+ Omit<CommonSilentFlowRequest, "account" | "scopes" | "storeInCache">
24
21
  > & {
25
22
  account: AccountInfo;
26
23
  scopes: Array<string>;
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { CommonUsernamePasswordRequest } from "@azure/msal-common/node";
6
+ import { CommonUsernamePasswordRequest } from "./CommonUsernamePasswordRequest.js";
7
7
 
8
8
  /**
9
9
  * UsernamePassword parameters passed by the user to retrieve credentials
@@ -26,7 +26,6 @@ export type UsernamePasswordRequest = Partial<
26
26
  | "resourceRequestUri"
27
27
  | "username"
28
28
  | "password"
29
- | "requestedClaimsHash"
30
29
  | "storeInCache"
31
30
  >
32
31
  > & {
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { AuthenticationScheme } from "@azure/msal-common/node";
6
+ import { Constants } from "@azure/msal-common/node";
7
7
 
8
8
  /**
9
9
  * Deserialized response object from server managed identity request.
@@ -25,7 +25,7 @@ export type ManagedIdentityTokenResponse = {
25
25
  client_id?: string;
26
26
  expires_on?: number; // will be converted to expires_in
27
27
  resource?: string; // equivalent to ServerAuthorizationTokenResponse's "scope" field
28
- token_type?: AuthenticationScheme;
28
+ token_type?: Constants.AuthenticationScheme;
29
29
 
30
30
  // error
31
31
 
@@ -4,19 +4,19 @@
4
4
  */
5
5
 
6
6
  import { IncomingHttpHeaders } from "http";
7
- import { HttpStatus, Logger } from "@azure/msal-common";
7
+ import { Constants, Logger } from "@azure/msal-common/node";
8
8
  import { IHttpRetryPolicy } from "./IHttpRetryPolicy.js";
9
9
  import { LinearRetryStrategy } from "./LinearRetryStrategy.js";
10
10
 
11
11
  export const DEFAULT_MANAGED_IDENTITY_MAX_RETRIES: number = 3; // referenced in unit test
12
12
  const DEFAULT_MANAGED_IDENTITY_RETRY_DELAY_MS: number = 1000;
13
13
  const DEFAULT_MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON: Array<number> = [
14
- HttpStatus.NOT_FOUND,
15
- HttpStatus.REQUEST_TIMEOUT,
16
- HttpStatus.TOO_MANY_REQUESTS,
17
- HttpStatus.SERVER_ERROR,
18
- HttpStatus.SERVICE_UNAVAILABLE,
19
- HttpStatus.GATEWAY_TIMEOUT,
14
+ Constants.HTTP_NOT_FOUND,
15
+ Constants.HTTP_REQUEST_TIMEOUT,
16
+ Constants.HTTP_TOO_MANY_REQUESTS,
17
+ Constants.HTTP_SERVER_ERROR,
18
+ Constants.HTTP_SERVICE_UNAVAILABLE,
19
+ Constants.HTTP_GATEWAY_TIMEOUT,
20
20
  ];
21
21
 
22
22
  export class DefaultManagedIdentityRetryPolicy implements IHttpRetryPolicy {
@@ -52,7 +52,8 @@ export class DefaultManagedIdentityRetryPolicy implements IHttpRetryPolicy {
52
52
  logger.verbose(
53
53
  `Retrying request in ${retryAfterDelay}ms (retry attempt: ${
54
54
  currentRetry + 1
55
- })`
55
+ })`,
56
+ ""
56
57
  );
57
58
 
58
59
  // pause execution for the calculated delay
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import { IncomingHttpHeaders } from "http";
7
- import { Logger } from "@azure/msal-common";
7
+ import { Logger } from "@azure/msal-common/node";
8
8
 
9
9
  export interface IHttpRetryPolicy {
10
10
  _isNewRequest?: boolean;
@@ -3,15 +3,15 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { HttpStatus, Logger } from "@azure/msal-common";
6
+ import { Constants, Logger } from "@azure/msal-common/node";
7
7
  import { ExponentialRetryStrategy } from "./ExponentialRetryStrategy.js";
8
8
  import { IHttpRetryPolicy } from "./IHttpRetryPolicy.js";
9
9
 
10
10
  const HTTP_STATUS_400_CODES_FOR_EXPONENTIAL_STRATEGY: Array<number> = [
11
- HttpStatus.NOT_FOUND,
12
- HttpStatus.REQUEST_TIMEOUT,
13
- HttpStatus.GONE,
14
- HttpStatus.TOO_MANY_REQUESTS,
11
+ Constants.HTTP_NOT_FOUND,
12
+ Constants.HTTP_REQUEST_TIMEOUT,
13
+ Constants.HTTP_GONE,
14
+ Constants.HTTP_TOO_MANY_REQUESTS,
15
15
  ];
16
16
 
17
17
  const EXPONENTIAL_STRATEGY_NUM_RETRIES = 3;
@@ -73,7 +73,7 @@ export class ImdsRetryPolicy implements IHttpRetryPolicy {
73
73
 
74
74
  // calculate the maxRetries based on the status code, once per request
75
75
  this.maxRetries =
76
- httpStatusCode === HttpStatus.GONE
76
+ httpStatusCode === Constants.HTTP_GONE
77
77
  ? LINEAR_STRATEGY_NUM_RETRIES
78
78
  : EXPONENTIAL_STRATEGY_NUM_RETRIES;
79
79
  }
@@ -89,13 +89,13 @@ export class ImdsRetryPolicy implements IHttpRetryPolicy {
89
89
  (HTTP_STATUS_400_CODES_FOR_EXPONENTIAL_STRATEGY.includes(
90
90
  httpStatusCode
91
91
  ) ||
92
- (httpStatusCode >= HttpStatus.SERVER_ERROR_RANGE_START &&
93
- httpStatusCode <= HttpStatus.SERVER_ERROR_RANGE_END &&
92
+ (httpStatusCode >= Constants.HTTP_SERVER_ERROR_RANGE_START &&
93
+ httpStatusCode <= Constants.HTTP_SERVER_ERROR_RANGE_END &&
94
94
  currentRetry < this.maxRetries)) &&
95
95
  currentRetry < this.maxRetries
96
96
  ) {
97
97
  const retryAfterDelay: number =
98
- httpStatusCode === HttpStatus.GONE
98
+ httpStatusCode === Constants.HTTP_GONE
99
99
  ? ImdsRetryPolicy.HTTP_STATUS_GONE_RETRY_AFTER_MS
100
100
  : this.exponentialRetryStrategy.calculateDelay(
101
101
  currentRetry
@@ -104,7 +104,8 @@ export class ImdsRetryPolicy implements IHttpRetryPolicy {
104
104
  logger.verbose(
105
105
  `Retrying request in ${retryAfterDelay}ms (retry attempt: ${
106
106
  currentRetry + 1
107
- })`
107
+ })`,
108
+ ""
108
109
  );
109
110
 
110
111
  // pause execution for the calculated delay
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { HttpStatus } from "@azure/msal-common/node";
6
+ import { Constants as CommonConstants } from "@azure/msal-common/node";
7
7
  import { DefaultManagedIdentityRetryPolicy } from "../retry/DefaultManagedIdentityRetryPolicy.js";
8
8
  import { ImdsRetryPolicy } from "../retry/ImdsRetryPolicy.js";
9
9
 
@@ -94,10 +94,10 @@ export const HttpMethod = {
94
94
  export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];
95
95
 
96
96
  export const ProxyStatus = {
97
- SUCCESS: HttpStatus.SUCCESS,
98
- SUCCESS_RANGE_START: HttpStatus.SUCCESS_RANGE_START,
99
- SUCCESS_RANGE_END: HttpStatus.SUCCESS_RANGE_END,
100
- SERVER_ERROR: HttpStatus.SERVER_ERROR,
97
+ SUCCESS: CommonConstants.HTTP_SUCCESS,
98
+ SUCCESS_RANGE_START: CommonConstants.HTTP_SUCCESS_RANGE_START,
99
+ SUCCESS_RANGE_END: CommonConstants.HTTP_SUCCESS_RANGE_END,
100
+ SERVER_ERROR: CommonConstants.HTTP_SERVER_ERROR,
101
101
  } as const;
102
102
  export type ProxyStatus = (typeof ProxyStatus)[keyof typeof ProxyStatus];
103
103
 
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { Constants, EncodingTypes } from "@azure/msal-common/node";
6
+ import { Constants } from "@azure/msal-common/node";
7
7
 
8
8
  export class EncodingUtils {
9
9
  /**
@@ -13,7 +13,9 @@ export class EncodingUtils {
13
13
  * @param str text
14
14
  */
15
15
  static base64Encode(str: string, encoding?: BufferEncoding): string {
16
- return Buffer.from(str, encoding).toString(EncodingTypes.BASE64);
16
+ return Buffer.from(str, encoding).toString(
17
+ Constants.EncodingTypes.BASE64
18
+ );
17
19
  }
18
20
 
19
21
  /**
@@ -22,7 +24,7 @@ export class EncodingUtils {
22
24
  */
23
25
  static base64EncodeUrl(str: string, encoding?: BufferEncoding): string {
24
26
  return EncodingUtils.base64Encode(str, encoding)
25
- .replace(/=/g, Constants.EMPTY_STRING)
27
+ .replace(/=/g, "")
26
28
  .replace(/\+/g, "-")
27
29
  .replace(/\//g, "_");
28
30
  }
@@ -34,7 +36,9 @@ export class EncodingUtils {
34
36
  * @param base64Str Base64 encoded text
35
37
  */
36
38
  static base64Decode(base64Str: string): string {
37
- return Buffer.from(base64Str, EncodingTypes.BASE64).toString("utf8");
39
+ return Buffer.from(base64Str, Constants.EncodingTypes.BASE64).toString(
40
+ "utf8"
41
+ );
38
42
  }
39
43
 
40
44
  /**