@azure/msal-node 2.7.0-alpha.0 → 2.7.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 (225) hide show
  1. package/dist/cache/ITokenCache.d.ts +15 -15
  2. package/dist/cache/NodeStorage.cjs +423 -423
  3. package/dist/cache/NodeStorage.cjs.map +1 -1
  4. package/dist/cache/NodeStorage.d.ts +193 -193
  5. package/dist/cache/NodeStorage.d.ts.map +1 -1
  6. package/dist/cache/NodeStorage.mjs +424 -424
  7. package/dist/cache/NodeStorage.mjs.map +1 -1
  8. package/dist/cache/TokenCache.cjs +265 -265
  9. package/dist/cache/TokenCache.d.ts +90 -90
  10. package/dist/cache/TokenCache.mjs +265 -265
  11. package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
  12. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  13. package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
  14. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  15. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  16. package/dist/cache/serializer/Deserializer.cjs +167 -170
  17. package/dist/cache/serializer/Deserializer.cjs.map +1 -1
  18. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  19. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  20. package/dist/cache/serializer/Deserializer.mjs +168 -171
  21. package/dist/cache/serializer/Deserializer.mjs.map +1 -1
  22. package/dist/cache/serializer/Serializer.cjs +137 -137
  23. package/dist/cache/serializer/Serializer.d.ts +39 -39
  24. package/dist/cache/serializer/Serializer.mjs +137 -137
  25. package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
  26. package/dist/client/ClientApplication.cjs +333 -333
  27. package/dist/client/ClientApplication.cjs.map +1 -1
  28. package/dist/client/ClientApplication.d.ts +142 -142
  29. package/dist/client/ClientApplication.d.ts.map +1 -1
  30. package/dist/client/ClientApplication.mjs +333 -333
  31. package/dist/client/ClientApplication.mjs.map +1 -1
  32. package/dist/client/ClientAssertion.cjs +116 -116
  33. package/dist/client/ClientAssertion.d.ts +46 -46
  34. package/dist/client/ClientAssertion.mjs +116 -116
  35. package/dist/client/ClientCredentialClient.cjs +194 -194
  36. package/dist/client/ClientCredentialClient.d.ts +33 -33
  37. package/dist/client/ClientCredentialClient.mjs +194 -194
  38. package/dist/client/ConfidentialClientApplication.cjs +163 -163
  39. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  40. package/dist/client/ConfidentialClientApplication.mjs +163 -163
  41. package/dist/client/DeviceCodeClient.cjs +207 -207
  42. package/dist/client/DeviceCodeClient.d.ts +53 -53
  43. package/dist/client/DeviceCodeClient.mjs +207 -207
  44. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  45. package/dist/client/IPublicClientApplication.d.ts +42 -42
  46. package/dist/client/ManagedIdentityApplication.cjs +79 -78
  47. package/dist/client/ManagedIdentityApplication.cjs.map +1 -1
  48. package/dist/client/ManagedIdentityApplication.d.ts +23 -23
  49. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  50. package/dist/client/ManagedIdentityApplication.mjs +79 -78
  51. package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
  52. package/dist/client/ManagedIdentityClient.cjs +40 -36
  53. package/dist/client/ManagedIdentityClient.cjs.map +1 -1
  54. package/dist/client/ManagedIdentityClient.d.ts +19 -24
  55. package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
  56. package/dist/client/ManagedIdentityClient.mjs +40 -36
  57. package/dist/client/ManagedIdentityClient.mjs.map +1 -1
  58. package/dist/client/ManagedIdentitySources/AppService.cjs +42 -69
  59. package/dist/client/ManagedIdentitySources/AppService.cjs.map +1 -1
  60. package/dist/client/ManagedIdentitySources/AppService.d.ts +16 -16
  61. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  62. package/dist/client/ManagedIdentitySources/AppService.mjs +43 -70
  63. package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -1
  64. package/dist/client/ManagedIdentitySources/AzureArc.cjs +81 -92
  65. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
  66. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +18 -18
  67. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  68. package/dist/client/ManagedIdentitySources/AzureArc.mjs +84 -95
  69. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
  70. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +112 -77
  71. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -1
  72. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +30 -18
  73. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  74. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +114 -80
  75. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
  76. package/dist/client/ManagedIdentitySources/CloudShell.cjs +47 -0
  77. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +1 -0
  78. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +15 -6
  79. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  80. package/dist/client/ManagedIdentitySources/CloudShell.mjs +45 -0
  81. package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +1 -0
  82. package/dist/client/ManagedIdentitySources/Imds.cjs +43 -52
  83. package/dist/client/ManagedIdentitySources/Imds.cjs.map +1 -1
  84. package/dist/client/ManagedIdentitySources/Imds.d.ts +12 -12
  85. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  86. package/dist/client/ManagedIdentitySources/Imds.mjs +44 -53
  87. package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
  88. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +61 -0
  89. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +1 -0
  90. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +16 -6
  91. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  92. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +59 -0
  93. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +1 -0
  94. package/dist/client/OnBehalfOfClient.cjs +202 -202
  95. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  96. package/dist/client/OnBehalfOfClient.mjs +202 -202
  97. package/dist/client/PublicClientApplication.cjs +229 -229
  98. package/dist/client/PublicClientApplication.d.ts +71 -71
  99. package/dist/client/PublicClientApplication.mjs +229 -229
  100. package/dist/client/UsernamePasswordClient.cjs +95 -95
  101. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  102. package/dist/client/UsernamePasswordClient.mjs +95 -95
  103. package/dist/config/Configuration.cjs +102 -86
  104. package/dist/config/Configuration.cjs.map +1 -1
  105. package/dist/config/Configuration.d.ts +123 -122
  106. package/dist/config/Configuration.d.ts.map +1 -1
  107. package/dist/config/Configuration.mjs +102 -86
  108. package/dist/config/Configuration.mjs.map +1 -1
  109. package/dist/config/ManagedIdentityId.cjs +48 -48
  110. package/dist/config/ManagedIdentityId.d.ts +11 -11
  111. package/dist/config/ManagedIdentityId.mjs +48 -48
  112. package/dist/config/ManagedIdentityRequestParameters.cjs +28 -29
  113. package/dist/config/ManagedIdentityRequestParameters.cjs.map +1 -1
  114. package/dist/config/ManagedIdentityRequestParameters.d.ts +11 -11
  115. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
  116. package/dist/config/ManagedIdentityRequestParameters.mjs +28 -29
  117. package/dist/config/ManagedIdentityRequestParameters.mjs.map +1 -1
  118. package/dist/crypto/CryptoProvider.cjs +75 -75
  119. package/dist/crypto/CryptoProvider.d.ts +52 -52
  120. package/dist/crypto/CryptoProvider.mjs +75 -75
  121. package/dist/crypto/GuidGenerator.cjs +22 -22
  122. package/dist/crypto/GuidGenerator.d.ts +14 -14
  123. package/dist/crypto/GuidGenerator.mjs +22 -22
  124. package/dist/crypto/HashUtils.cjs +13 -13
  125. package/dist/crypto/HashUtils.d.ts +8 -8
  126. package/dist/crypto/HashUtils.mjs +13 -13
  127. package/dist/crypto/PkceGenerator.cjs +49 -49
  128. package/dist/crypto/PkceGenerator.d.ts +22 -22
  129. package/dist/crypto/PkceGenerator.mjs +49 -49
  130. package/dist/error/ManagedIdentityError.cjs +39 -28
  131. package/dist/error/ManagedIdentityError.cjs.map +1 -1
  132. package/dist/error/ManagedIdentityError.d.ts +27 -21
  133. package/dist/error/ManagedIdentityError.d.ts.map +1 -1
  134. package/dist/error/ManagedIdentityError.mjs +40 -29
  135. package/dist/error/ManagedIdentityError.mjs.map +1 -1
  136. package/dist/error/ManagedIdentityErrorCodes.cjs +27 -14
  137. package/dist/error/ManagedIdentityErrorCodes.cjs.map +1 -1
  138. package/dist/error/ManagedIdentityErrorCodes.d.ts +19 -9
  139. package/dist/error/ManagedIdentityErrorCodes.d.ts.map +1 -1
  140. package/dist/error/ManagedIdentityErrorCodes.mjs +24 -14
  141. package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
  142. package/dist/error/NodeAuthError.cjs +85 -85
  143. package/dist/error/NodeAuthError.d.ts +65 -65
  144. package/dist/error/NodeAuthError.mjs +85 -85
  145. package/dist/index.cjs +1 -1
  146. package/dist/index.d.ts +44 -44
  147. package/dist/index.mjs +1 -1
  148. package/dist/internals.cjs +8 -8
  149. package/dist/internals.d.ts +6 -6
  150. package/dist/internals.mjs +8 -8
  151. package/dist/network/HttpClient.cjs +283 -283
  152. package/dist/network/HttpClient.cjs.map +1 -1
  153. package/dist/network/HttpClient.d.ts +25 -26
  154. package/dist/network/HttpClient.d.ts.map +1 -1
  155. package/dist/network/HttpClient.mjs +283 -283
  156. package/dist/network/HttpClient.mjs.map +1 -1
  157. package/dist/network/HttpClientWithRetries.cjs +44 -0
  158. package/dist/network/HttpClientWithRetries.cjs.map +1 -0
  159. package/dist/network/HttpClientWithRetries.d.ts +12 -0
  160. package/dist/network/HttpClientWithRetries.d.ts.map +1 -0
  161. package/dist/network/HttpClientWithRetries.mjs +42 -0
  162. package/dist/network/HttpClientWithRetries.mjs.map +1 -0
  163. package/dist/network/ILoopbackClient.d.ts +10 -10
  164. package/dist/network/LoopbackClient.cjs +77 -77
  165. package/dist/network/LoopbackClient.d.ts +21 -21
  166. package/dist/network/LoopbackClient.mjs +77 -77
  167. package/dist/packageMetadata.cjs +4 -4
  168. package/dist/packageMetadata.d.ts +2 -2
  169. package/dist/packageMetadata.d.ts.map +1 -1
  170. package/dist/packageMetadata.mjs +4 -4
  171. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  172. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  173. package/dist/request/ClientCredentialRequest.d.ts +14 -14
  174. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  175. package/dist/request/InteractiveRequest.d.ts +22 -22
  176. package/dist/request/ManagedIdentityRequest.d.ts +8 -8
  177. package/dist/request/ManagedIdentityRequestParams.d.ts +9 -9
  178. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  179. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  180. package/dist/request/SignOutRequest.d.ts +5 -5
  181. package/dist/request/SilentFlowRequest.d.ts +16 -16
  182. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  183. package/dist/response/ManagedIdentityTokenResponse.d.ts +24 -24
  184. package/dist/retry/IHttpRetryPolicy.d.ts +6 -0
  185. package/dist/retry/IHttpRetryPolicy.d.ts.map +1 -0
  186. package/dist/retry/LinearRetryPolicy.cjs +47 -0
  187. package/dist/retry/LinearRetryPolicy.cjs.map +1 -0
  188. package/dist/retry/LinearRetryPolicy.d.ts +12 -0
  189. package/dist/retry/LinearRetryPolicy.d.ts.map +1 -0
  190. package/dist/retry/LinearRetryPolicy.mjs +45 -0
  191. package/dist/retry/LinearRetryPolicy.mjs.map +1 -0
  192. package/dist/utils/Constants.cjs +141 -103
  193. package/dist/utils/Constants.cjs.map +1 -1
  194. package/dist/utils/Constants.d.ts +131 -106
  195. package/dist/utils/Constants.d.ts.map +1 -1
  196. package/dist/utils/Constants.mjs +133 -100
  197. package/dist/utils/Constants.mjs.map +1 -1
  198. package/dist/utils/EncodingUtils.cjs +44 -44
  199. package/dist/utils/EncodingUtils.d.ts +26 -26
  200. package/dist/utils/EncodingUtils.mjs +44 -44
  201. package/dist/utils/NetworkUtils.cjs +38 -38
  202. package/dist/utils/NetworkUtils.d.ts +5 -5
  203. package/dist/utils/NetworkUtils.mjs +38 -38
  204. package/package.json +5 -5
  205. package/src/cache/NodeStorage.ts +4 -9
  206. package/src/cache/serializer/Deserializer.ts +1 -5
  207. package/src/client/ClientApplication.ts +5 -4
  208. package/src/client/ManagedIdentityApplication.ts +3 -3
  209. package/src/client/ManagedIdentityClient.ts +23 -11
  210. package/src/client/ManagedIdentitySources/AppService.ts +68 -97
  211. package/src/client/ManagedIdentitySources/AzureArc.ts +59 -68
  212. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +70 -2
  213. package/src/client/ManagedIdentitySources/CloudShell.ts +93 -8
  214. package/src/client/ManagedIdentitySources/Imds.ts +54 -40
  215. package/src/client/ManagedIdentitySources/ServiceFabric.ts +126 -5
  216. package/src/config/Configuration.ts +44 -16
  217. package/src/config/ManagedIdentityRequestParameters.ts +1 -6
  218. package/src/error/ManagedIdentityError.ts +15 -2
  219. package/src/error/ManagedIdentityErrorCodes.ts +19 -0
  220. package/src/network/HttpClient.ts +6 -11
  221. package/src/network/HttpClientWithRetries.ts +80 -0
  222. package/src/packageMetadata.ts +1 -1
  223. package/src/retry/IHttpRetryPolicy.ts +18 -0
  224. package/src/retry/LinearRetryPolicy.ts +71 -0
  225. package/src/utils/Constants.ts +43 -7
@@ -0,0 +1,44 @@
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
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
@@ -0,0 +1 @@
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;AAEM,IAAA,MAAM,mBAAmB,CAC5B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAACD,oBAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACrE;AAEM,IAAA,MAAM,oBAAoB,CAC7B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAACA,oBAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACtE;AACJ;;;;"}
@@ -0,0 +1,12 @@
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
@@ -0,0 +1 @@
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;IA4BxB,mBAAmB,CAAC,CAAC,EAC9B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAIjB,oBAAoB,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAGjC"}
@@ -0,0 +1,42 @@
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
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
@@ -0,0 +1 @@
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;AAEM,IAAA,MAAM,mBAAmB,CAC5B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACrE;AAEM,IAAA,MAAM,oBAAoB,CAC7B,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,11 +1,11 @@
1
- import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
2
- /**
3
- * Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation.
4
- * @public
5
- */
6
- export interface ILoopbackClient {
7
- listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
8
- getRedirectUri(): string;
9
- closeServer(): void;
10
- }
1
+ import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
2
+ /**
3
+ * Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation.
4
+ * @public
5
+ */
6
+ export interface ILoopbackClient {
7
+ listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
8
+ getRedirectUri(): string;
9
+ closeServer(): void;
10
+ }
11
11
  //# sourceMappingURL=ILoopbackClient.d.ts.map
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -7,82 +7,82 @@ var http = require('http');
7
7
  var NodeAuthError = require('../error/NodeAuthError.cjs');
8
8
  var Constants = require('../utils/Constants.cjs');
9
9
 
10
- /*
11
- * Copyright (c) Microsoft Corporation. All rights reserved.
12
- * Licensed under the MIT License.
13
- */
14
- class LoopbackClient {
15
- /**
16
- * Spins up a loopback server which returns the server response when the localhost redirectUri is hit
17
- * @param successTemplate
18
- * @param errorTemplate
19
- * @returns
20
- */
21
- async listenForAuthCode(successTemplate, errorTemplate) {
22
- if (this.server) {
23
- throw NodeAuthError.NodeAuthError.createLoopbackServerAlreadyExistsError();
24
- }
25
- return new Promise((resolve, reject) => {
26
- this.server = http.createServer((req, res) => {
27
- const url = req.url;
28
- if (!url) {
29
- res.end(errorTemplate ||
30
- "Error occurred loading redirectUrl");
31
- reject(NodeAuthError.NodeAuthError.createUnableToLoadRedirectUrlError());
32
- return;
33
- }
34
- else if (url === msalCommon.Constants.FORWARD_SLASH) {
35
- res.end(successTemplate ||
36
- "Auth code was successfully acquired. You can close this window now.");
37
- return;
38
- }
39
- const redirectUri = this.getRedirectUri();
40
- const parsedUrl = new URL(url, redirectUri);
41
- const authCodeResponse = msalCommon.UrlUtils.getDeserializedResponse(parsedUrl.search) || {};
42
- if (authCodeResponse.code) {
43
- res.writeHead(msalCommon.HttpStatus.REDIRECT, {
44
- location: redirectUri,
45
- }); // Prevent auth code from being saved in the browser history
46
- res.end();
47
- }
48
- resolve(authCodeResponse);
49
- });
50
- this.server.listen(0); // Listen on any available port
51
- });
52
- }
53
- /**
54
- * Get the port that the loopback server is running on
55
- * @returns
56
- */
57
- getRedirectUri() {
58
- if (!this.server || !this.server.listening) {
59
- throw NodeAuthError.NodeAuthError.createNoLoopbackServerExistsError();
60
- }
61
- const address = this.server.address();
62
- if (!address || typeof address === "string" || !address.port) {
63
- this.closeServer();
64
- throw NodeAuthError.NodeAuthError.createInvalidLoopbackAddressTypeError();
65
- }
66
- const port = address && address.port;
67
- return `${Constants.Constants.HTTP_PROTOCOL}${Constants.Constants.LOCALHOST}:${port}`;
68
- }
69
- /**
70
- * Close the loopback server
71
- */
72
- closeServer() {
73
- if (this.server) {
74
- // Only stops accepting new connections, server will close once open/idle connections are closed.
75
- this.server.close();
76
- if (typeof this.server.closeAllConnections === "function") {
77
- /*
78
- * Close open/idle connections. This API is available in Node versions 18.2 and higher
79
- */
80
- this.server.closeAllConnections();
81
- }
82
- this.server.unref();
83
- this.server = undefined;
84
- }
85
- }
10
+ /*
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License.
13
+ */
14
+ class LoopbackClient {
15
+ /**
16
+ * Spins up a loopback server which returns the server response when the localhost redirectUri is hit
17
+ * @param successTemplate
18
+ * @param errorTemplate
19
+ * @returns
20
+ */
21
+ async listenForAuthCode(successTemplate, errorTemplate) {
22
+ if (this.server) {
23
+ throw NodeAuthError.NodeAuthError.createLoopbackServerAlreadyExistsError();
24
+ }
25
+ return new Promise((resolve, reject) => {
26
+ this.server = http.createServer((req, res) => {
27
+ const url = req.url;
28
+ if (!url) {
29
+ res.end(errorTemplate ||
30
+ "Error occurred loading redirectUrl");
31
+ reject(NodeAuthError.NodeAuthError.createUnableToLoadRedirectUrlError());
32
+ return;
33
+ }
34
+ else if (url === msalCommon.Constants.FORWARD_SLASH) {
35
+ res.end(successTemplate ||
36
+ "Auth code was successfully acquired. You can close this window now.");
37
+ return;
38
+ }
39
+ const redirectUri = this.getRedirectUri();
40
+ const parsedUrl = new URL(url, redirectUri);
41
+ const authCodeResponse = msalCommon.UrlUtils.getDeserializedResponse(parsedUrl.search) || {};
42
+ if (authCodeResponse.code) {
43
+ res.writeHead(msalCommon.HttpStatus.REDIRECT, {
44
+ location: redirectUri,
45
+ }); // Prevent auth code from being saved in the browser history
46
+ res.end();
47
+ }
48
+ resolve(authCodeResponse);
49
+ });
50
+ this.server.listen(0); // Listen on any available port
51
+ });
52
+ }
53
+ /**
54
+ * Get the port that the loopback server is running on
55
+ * @returns
56
+ */
57
+ getRedirectUri() {
58
+ if (!this.server || !this.server.listening) {
59
+ throw NodeAuthError.NodeAuthError.createNoLoopbackServerExistsError();
60
+ }
61
+ const address = this.server.address();
62
+ if (!address || typeof address === "string" || !address.port) {
63
+ this.closeServer();
64
+ throw NodeAuthError.NodeAuthError.createInvalidLoopbackAddressTypeError();
65
+ }
66
+ const port = address && address.port;
67
+ return `${Constants.Constants.HTTP_PROTOCOL}${Constants.Constants.LOCALHOST}:${port}`;
68
+ }
69
+ /**
70
+ * Close the loopback server
71
+ */
72
+ closeServer() {
73
+ if (this.server) {
74
+ // Only stops accepting new connections, server will close once open/idle connections are closed.
75
+ this.server.close();
76
+ if (typeof this.server.closeAllConnections === "function") {
77
+ /*
78
+ * Close open/idle connections. This API is available in Node versions 18.2 and higher
79
+ */
80
+ this.server.closeAllConnections();
81
+ }
82
+ this.server.unref();
83
+ this.server = undefined;
84
+ }
85
+ }
86
86
  }
87
87
 
88
88
  exports.LoopbackClient = LoopbackClient;
@@ -1,22 +1,22 @@
1
- import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
2
- import { ILoopbackClient } from "./ILoopbackClient.js";
3
- export declare class LoopbackClient implements ILoopbackClient {
4
- private server;
5
- /**
6
- * Spins up a loopback server which returns the server response when the localhost redirectUri is hit
7
- * @param successTemplate
8
- * @param errorTemplate
9
- * @returns
10
- */
11
- listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
12
- /**
13
- * Get the port that the loopback server is running on
14
- * @returns
15
- */
16
- getRedirectUri(): string;
17
- /**
18
- * Close the loopback server
19
- */
20
- closeServer(): void;
21
- }
1
+ import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
2
+ import { ILoopbackClient } from "./ILoopbackClient.js";
3
+ export declare class LoopbackClient implements ILoopbackClient {
4
+ private server;
5
+ /**
6
+ * Spins up a loopback server which returns the server response when the localhost redirectUri is hit
7
+ * @param successTemplate
8
+ * @param errorTemplate
9
+ * @returns
10
+ */
11
+ listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
12
+ /**
13
+ * Get the port that the loopback server is running on
14
+ * @returns
15
+ */
16
+ getRedirectUri(): string;
17
+ /**
18
+ * Close the loopback server
19
+ */
20
+ closeServer(): void;
21
+ }
22
22
  //# sourceMappingURL=LoopbackClient.d.ts.map
@@ -1,86 +1,86 @@
1
- /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
2
2
  'use strict';
3
3
  import { Constants, UrlUtils, HttpStatus } from '@azure/msal-common';
4
4
  import http from 'http';
5
5
  import { NodeAuthError } from '../error/NodeAuthError.mjs';
6
6
  import { Constants as Constants$1 } from '../utils/Constants.mjs';
7
7
 
8
- /*
9
- * Copyright (c) Microsoft Corporation. All rights reserved.
10
- * Licensed under the MIT License.
11
- */
12
- class LoopbackClient {
13
- /**
14
- * Spins up a loopback server which returns the server response when the localhost redirectUri is hit
15
- * @param successTemplate
16
- * @param errorTemplate
17
- * @returns
18
- */
19
- async listenForAuthCode(successTemplate, errorTemplate) {
20
- if (this.server) {
21
- throw NodeAuthError.createLoopbackServerAlreadyExistsError();
22
- }
23
- return new Promise((resolve, reject) => {
24
- this.server = http.createServer((req, res) => {
25
- const url = req.url;
26
- if (!url) {
27
- res.end(errorTemplate ||
28
- "Error occurred loading redirectUrl");
29
- reject(NodeAuthError.createUnableToLoadRedirectUrlError());
30
- return;
31
- }
32
- else if (url === Constants.FORWARD_SLASH) {
33
- res.end(successTemplate ||
34
- "Auth code was successfully acquired. You can close this window now.");
35
- return;
36
- }
37
- const redirectUri = this.getRedirectUri();
38
- const parsedUrl = new URL(url, redirectUri);
39
- const authCodeResponse = UrlUtils.getDeserializedResponse(parsedUrl.search) || {};
40
- if (authCodeResponse.code) {
41
- res.writeHead(HttpStatus.REDIRECT, {
42
- location: redirectUri,
43
- }); // Prevent auth code from being saved in the browser history
44
- res.end();
45
- }
46
- resolve(authCodeResponse);
47
- });
48
- this.server.listen(0); // Listen on any available port
49
- });
50
- }
51
- /**
52
- * Get the port that the loopback server is running on
53
- * @returns
54
- */
55
- getRedirectUri() {
56
- if (!this.server || !this.server.listening) {
57
- throw NodeAuthError.createNoLoopbackServerExistsError();
58
- }
59
- const address = this.server.address();
60
- if (!address || typeof address === "string" || !address.port) {
61
- this.closeServer();
62
- throw NodeAuthError.createInvalidLoopbackAddressTypeError();
63
- }
64
- const port = address && address.port;
65
- return `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}:${port}`;
66
- }
67
- /**
68
- * Close the loopback server
69
- */
70
- closeServer() {
71
- if (this.server) {
72
- // Only stops accepting new connections, server will close once open/idle connections are closed.
73
- this.server.close();
74
- if (typeof this.server.closeAllConnections === "function") {
75
- /*
76
- * Close open/idle connections. This API is available in Node versions 18.2 and higher
77
- */
78
- this.server.closeAllConnections();
79
- }
80
- this.server.unref();
81
- this.server = undefined;
82
- }
83
- }
8
+ /*
9
+ * Copyright (c) Microsoft Corporation. All rights reserved.
10
+ * Licensed under the MIT License.
11
+ */
12
+ class LoopbackClient {
13
+ /**
14
+ * Spins up a loopback server which returns the server response when the localhost redirectUri is hit
15
+ * @param successTemplate
16
+ * @param errorTemplate
17
+ * @returns
18
+ */
19
+ async listenForAuthCode(successTemplate, errorTemplate) {
20
+ if (this.server) {
21
+ throw NodeAuthError.createLoopbackServerAlreadyExistsError();
22
+ }
23
+ return new Promise((resolve, reject) => {
24
+ this.server = http.createServer((req, res) => {
25
+ const url = req.url;
26
+ if (!url) {
27
+ res.end(errorTemplate ||
28
+ "Error occurred loading redirectUrl");
29
+ reject(NodeAuthError.createUnableToLoadRedirectUrlError());
30
+ return;
31
+ }
32
+ else if (url === Constants.FORWARD_SLASH) {
33
+ res.end(successTemplate ||
34
+ "Auth code was successfully acquired. You can close this window now.");
35
+ return;
36
+ }
37
+ const redirectUri = this.getRedirectUri();
38
+ const parsedUrl = new URL(url, redirectUri);
39
+ const authCodeResponse = UrlUtils.getDeserializedResponse(parsedUrl.search) || {};
40
+ if (authCodeResponse.code) {
41
+ res.writeHead(HttpStatus.REDIRECT, {
42
+ location: redirectUri,
43
+ }); // Prevent auth code from being saved in the browser history
44
+ res.end();
45
+ }
46
+ resolve(authCodeResponse);
47
+ });
48
+ this.server.listen(0); // Listen on any available port
49
+ });
50
+ }
51
+ /**
52
+ * Get the port that the loopback server is running on
53
+ * @returns
54
+ */
55
+ getRedirectUri() {
56
+ if (!this.server || !this.server.listening) {
57
+ throw NodeAuthError.createNoLoopbackServerExistsError();
58
+ }
59
+ const address = this.server.address();
60
+ if (!address || typeof address === "string" || !address.port) {
61
+ this.closeServer();
62
+ throw NodeAuthError.createInvalidLoopbackAddressTypeError();
63
+ }
64
+ const port = address && address.port;
65
+ return `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}:${port}`;
66
+ }
67
+ /**
68
+ * Close the loopback server
69
+ */
70
+ closeServer() {
71
+ if (this.server) {
72
+ // Only stops accepting new connections, server will close once open/idle connections are closed.
73
+ this.server.close();
74
+ if (typeof this.server.closeAllConnections === "function") {
75
+ /*
76
+ * Close open/idle connections. This API is available in Node versions 18.2 and higher
77
+ */
78
+ this.server.closeAllConnections();
79
+ }
80
+ this.server.unref();
81
+ this.server = undefined;
82
+ }
83
+ }
84
84
  }
85
85
 
86
86
  export { LoopbackClient };
@@ -1,10 +1,10 @@
1
- /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
- /* eslint-disable header/header */
6
- const name = "@azure/msal-node";
7
- const version = "2.7.0-alpha.0";
5
+ /* eslint-disable header/header */
6
+ const name = "@azure/msal-node";
7
+ const version = "2.7.0";
8
8
 
9
9
  exports.name = name;
10
10
  exports.version = version;
@@ -1,3 +1,3 @@
1
- export declare const name = "@azure/msal-node";
2
- export declare const version = "2.7.0-alpha.0";
1
+ export declare const name = "@azure/msal-node";
2
+ export declare const version = "2.7.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
1
+ {"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC,eAAO,MAAM,OAAO,UAAU,CAAC"}
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
2
2
  'use strict';
3
- /* eslint-disable header/header */
4
- const name = "@azure/msal-node";
5
- const version = "2.7.0-alpha.0";
3
+ /* eslint-disable header/header */
4
+ const name = "@azure/msal-node";
5
+ const version = "2.7.0";
6
6
 
7
7
  export { name, version };
8
8
  //# sourceMappingURL=packageMetadata.mjs.map
@@ -1,22 +1,22 @@
1
- import { CommonAuthorizationCodeRequest } from "@azure/msal-common";
2
- /**
3
- * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow)
4
- *
5
- * - scopes - Array of scopes the application is requesting access to.
6
- * - claims - A stringified claims request which will be added to all /authorize and /token calls
7
- * - 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.
8
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
9
- * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal.
10
- * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
11
- * - code - The authorization_code that the user acquired in the first leg of the flow.
12
- * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636
13
- * - state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow. This string is sent back by the server with the authorization code. The user cached state is then compared with the state received from the server to mitigate the risk of CSRF attacks. See https://datatracker.ietf.org/doc/html/rfc6819#section-3.6.
14
- * @public
15
- */
16
- export type AuthorizationCodeRequest = Partial<Omit<CommonAuthorizationCodeRequest, "scopes" | "redirectUri" | "code" | "authenticationScheme" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash" | "storeInCache">> & {
17
- scopes: Array<string>;
18
- redirectUri: string;
19
- code: string;
20
- state?: string;
21
- };
1
+ import { CommonAuthorizationCodeRequest } from "@azure/msal-common";
2
+ /**
3
+ * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow)
4
+ *
5
+ * - scopes - Array of scopes the application is requesting access to.
6
+ * - claims - A stringified claims request which will be added to all /authorize and /token calls
7
+ * - 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.
8
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
9
+ * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal.
10
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
11
+ * - code - The authorization_code that the user acquired in the first leg of the flow.
12
+ * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636
13
+ * - state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow. This string is sent back by the server with the authorization code. The user cached state is then compared with the state received from the server to mitigate the risk of CSRF attacks. See https://datatracker.ietf.org/doc/html/rfc6819#section-3.6.
14
+ * @public
15
+ */
16
+ export type AuthorizationCodeRequest = Partial<Omit<CommonAuthorizationCodeRequest, "scopes" | "redirectUri" | "code" | "authenticationScheme" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash" | "storeInCache">> & {
17
+ scopes: Array<string>;
18
+ redirectUri: string;
19
+ code: string;
20
+ state?: string;
21
+ };
22
22
  //# sourceMappingURL=AuthorizationCodeRequest.d.ts.map