@azure/msal-node 2.12.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/cache/ITokenCache.d.ts +15 -15
  2. package/dist/cache/NodeStorage.cjs +423 -423
  3. package/dist/cache/NodeStorage.d.ts +193 -193
  4. package/dist/cache/NodeStorage.mjs +423 -423
  5. package/dist/cache/TokenCache.cjs +265 -265
  6. package/dist/cache/TokenCache.d.ts +90 -90
  7. package/dist/cache/TokenCache.mjs +265 -265
  8. package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
  9. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  10. package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
  11. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  12. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  13. package/dist/cache/serializer/Deserializer.cjs +167 -167
  14. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  15. package/dist/cache/serializer/Deserializer.mjs +167 -167
  16. package/dist/cache/serializer/Serializer.cjs +137 -137
  17. package/dist/cache/serializer/Serializer.d.ts +39 -39
  18. package/dist/cache/serializer/Serializer.mjs +137 -137
  19. package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
  20. package/dist/client/ClientApplication.cjs +334 -334
  21. package/dist/client/ClientApplication.d.ts +143 -143
  22. package/dist/client/ClientApplication.mjs +334 -334
  23. package/dist/client/ClientAssertion.cjs +143 -143
  24. package/dist/client/ClientAssertion.d.ts +55 -55
  25. package/dist/client/ClientAssertion.mjs +143 -143
  26. package/dist/client/ClientCredentialClient.cjs +194 -194
  27. package/dist/client/ClientCredentialClient.d.ts +33 -33
  28. package/dist/client/ClientCredentialClient.mjs +194 -194
  29. package/dist/client/ConfidentialClientApplication.cjs +169 -169
  30. package/dist/client/ConfidentialClientApplication.cjs.map +1 -1
  31. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  32. package/dist/client/ConfidentialClientApplication.mjs +169 -169
  33. package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
  34. package/dist/client/DeviceCodeClient.cjs +207 -207
  35. package/dist/client/DeviceCodeClient.d.ts +53 -53
  36. package/dist/client/DeviceCodeClient.mjs +207 -207
  37. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  38. package/dist/client/IPublicClientApplication.d.ts +42 -42
  39. package/dist/client/ManagedIdentityApplication.cjs +84 -84
  40. package/dist/client/ManagedIdentityApplication.d.ts +30 -30
  41. package/dist/client/ManagedIdentityApplication.mjs +84 -84
  42. package/dist/client/ManagedIdentityClient.cjs +60 -60
  43. package/dist/client/ManagedIdentityClient.d.ts +27 -27
  44. package/dist/client/ManagedIdentityClient.mjs +60 -60
  45. package/dist/client/ManagedIdentitySources/AppService.cjs +45 -45
  46. package/dist/client/ManagedIdentitySources/AppService.d.ts +17 -17
  47. package/dist/client/ManagedIdentitySources/AppService.mjs +45 -45
  48. package/dist/client/ManagedIdentitySources/AzureArc.cjs +155 -120
  49. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
  50. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +27 -23
  51. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  52. package/dist/client/ManagedIdentitySources/AzureArc.mjs +155 -122
  53. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
  54. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +122 -122
  55. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -1
  56. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +30 -30
  57. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +122 -122
  58. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
  59. package/dist/client/ManagedIdentitySources/CloudShell.cjs +38 -38
  60. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +16 -16
  61. package/dist/client/ManagedIdentitySources/CloudShell.mjs +38 -38
  62. package/dist/client/ManagedIdentitySources/Imds.cjs +43 -43
  63. package/dist/client/ManagedIdentitySources/Imds.d.ts +12 -12
  64. package/dist/client/ManagedIdentitySources/Imds.mjs +43 -43
  65. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +54 -54
  66. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +17 -17
  67. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +54 -54
  68. package/dist/client/OnBehalfOfClient.cjs +202 -202
  69. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  70. package/dist/client/OnBehalfOfClient.mjs +202 -202
  71. package/dist/client/PublicClientApplication.cjs +237 -237
  72. package/dist/client/PublicClientApplication.d.ts +72 -72
  73. package/dist/client/PublicClientApplication.mjs +237 -237
  74. package/dist/client/UsernamePasswordClient.cjs +95 -95
  75. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  76. package/dist/client/UsernamePasswordClient.mjs +95 -95
  77. package/dist/config/Configuration.cjs +106 -106
  78. package/dist/config/Configuration.d.ts +131 -131
  79. package/dist/config/Configuration.mjs +106 -106
  80. package/dist/config/ManagedIdentityId.cjs +48 -48
  81. package/dist/config/ManagedIdentityId.d.ts +11 -11
  82. package/dist/config/ManagedIdentityId.mjs +48 -48
  83. package/dist/config/ManagedIdentityRequestParameters.cjs +28 -28
  84. package/dist/config/ManagedIdentityRequestParameters.d.ts +11 -11
  85. package/dist/config/ManagedIdentityRequestParameters.mjs +28 -28
  86. package/dist/crypto/CryptoProvider.cjs +89 -89
  87. package/dist/crypto/CryptoProvider.d.ts +62 -62
  88. package/dist/crypto/CryptoProvider.mjs +89 -89
  89. package/dist/crypto/GuidGenerator.cjs +22 -22
  90. package/dist/crypto/GuidGenerator.d.ts +14 -14
  91. package/dist/crypto/GuidGenerator.mjs +22 -22
  92. package/dist/crypto/HashUtils.cjs +13 -13
  93. package/dist/crypto/HashUtils.d.ts +8 -8
  94. package/dist/crypto/HashUtils.mjs +13 -13
  95. package/dist/crypto/PkceGenerator.cjs +49 -49
  96. package/dist/crypto/PkceGenerator.d.ts +22 -22
  97. package/dist/crypto/PkceGenerator.mjs +49 -49
  98. package/dist/error/ManagedIdentityError.cjs +41 -41
  99. package/dist/error/ManagedIdentityError.d.ts +30 -30
  100. package/dist/error/ManagedIdentityError.mjs +41 -41
  101. package/dist/error/ManagedIdentityErrorCodes.cjs +24 -24
  102. package/dist/error/ManagedIdentityErrorCodes.d.ts +22 -22
  103. package/dist/error/ManagedIdentityErrorCodes.mjs +24 -24
  104. package/dist/error/NodeAuthError.cjs +95 -95
  105. package/dist/error/NodeAuthError.d.ts +73 -73
  106. package/dist/error/NodeAuthError.mjs +95 -95
  107. package/dist/index.cjs +1 -1
  108. package/dist/index.d.ts +45 -45
  109. package/dist/index.mjs +1 -1
  110. package/dist/internals.cjs +8 -8
  111. package/dist/internals.d.ts +6 -6
  112. package/dist/internals.mjs +8 -8
  113. package/dist/network/HttpClient.cjs +281 -281
  114. package/dist/network/HttpClient.d.ts +25 -25
  115. package/dist/network/HttpClient.mjs +281 -281
  116. package/dist/network/HttpClientWithRetries.cjs +34 -34
  117. package/dist/network/HttpClientWithRetries.d.ts +11 -11
  118. package/dist/network/HttpClientWithRetries.mjs +34 -34
  119. package/dist/network/ILoopbackClient.d.ts +10 -10
  120. package/dist/network/LoopbackClient.cjs +81 -77
  121. package/dist/network/LoopbackClient.cjs.map +1 -1
  122. package/dist/network/LoopbackClient.d.ts +21 -21
  123. package/dist/network/LoopbackClient.d.ts.map +1 -1
  124. package/dist/network/LoopbackClient.mjs +81 -77
  125. package/dist/network/LoopbackClient.mjs.map +1 -1
  126. package/dist/packageMetadata.cjs +4 -4
  127. package/dist/packageMetadata.d.ts +2 -2
  128. package/dist/packageMetadata.mjs +4 -4
  129. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  130. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  131. package/dist/request/ClientCredentialRequest.d.ts +14 -14
  132. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  133. package/dist/request/InteractiveRequest.d.ts +22 -22
  134. package/dist/request/ManagedIdentityRequest.d.ts +8 -8
  135. package/dist/request/ManagedIdentityRequestParams.d.ts +9 -9
  136. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  137. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  138. package/dist/request/SignOutRequest.d.ts +5 -5
  139. package/dist/request/SilentFlowRequest.d.ts +16 -16
  140. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  141. package/dist/response/ManagedIdentityTokenResponse.d.ts +34 -34
  142. package/dist/retry/IHttpRetryPolicy.d.ts +5 -5
  143. package/dist/retry/LinearRetryPolicy.cjs +40 -40
  144. package/dist/retry/LinearRetryPolicy.d.ts +11 -11
  145. package/dist/retry/LinearRetryPolicy.mjs +40 -40
  146. package/dist/utils/Constants.cjs +136 -136
  147. package/dist/utils/Constants.d.ts +141 -141
  148. package/dist/utils/Constants.mjs +136 -136
  149. package/dist/utils/EncodingUtils.cjs +44 -44
  150. package/dist/utils/EncodingUtils.d.ts +26 -26
  151. package/dist/utils/EncodingUtils.mjs +44 -44
  152. package/dist/utils/NetworkUtils.cjs +38 -38
  153. package/dist/utils/NetworkUtils.d.ts +5 -5
  154. package/dist/utils/NetworkUtils.mjs +38 -38
  155. package/package.json +2 -2
  156. package/src/client/ConfidentialClientApplication.ts +3 -3
  157. package/src/client/ManagedIdentitySources/AzureArc.ts +80 -25
  158. package/src/network/LoopbackClient.ts +7 -1
  159. package/src/packageMetadata.ts +1 -1
@@ -1,12 +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
- }
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
12
  //# sourceMappingURL=HttpClientWithRetries.d.ts.map
@@ -1,41 +1,41 @@
1
- /*! @azure/msal-node v2.12.0 2024-07-23 */
1
+ /*! @azure/msal-node v2.13.1 2024-08-29 */
2
2
  'use strict';
3
3
  import { HeaderNames } from '@azure/msal-common';
4
4
  import { HttpMethod } from '../utils/Constants.mjs';
5
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
- }
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
39
  }
40
40
 
41
41
  export { HttpClientWithRetries };
@@ -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.12.0 2024-07-23 */
1
+ /*! @azure/msal-node v2.13.1 2024-08-29 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -7,82 +7,86 @@ 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
+ if (authCodeResponse.error) {
49
+ res.end(errorTemplate ||
50
+ `Error occurred: ${authCodeResponse.error}`);
51
+ }
52
+ resolve(authCodeResponse);
53
+ });
54
+ this.server.listen(0, "127.0.0.1"); // Listen on any available port
55
+ });
56
+ }
57
+ /**
58
+ * Get the port that the loopback server is running on
59
+ * @returns
60
+ */
61
+ getRedirectUri() {
62
+ if (!this.server || !this.server.listening) {
63
+ throw NodeAuthError.NodeAuthError.createNoLoopbackServerExistsError();
64
+ }
65
+ const address = this.server.address();
66
+ if (!address || typeof address === "string" || !address.port) {
67
+ this.closeServer();
68
+ throw NodeAuthError.NodeAuthError.createInvalidLoopbackAddressTypeError();
69
+ }
70
+ const port = address && address.port;
71
+ return `${Constants.Constants.HTTP_PROTOCOL}${Constants.Constants.LOCALHOST}:${port}`;
72
+ }
73
+ /**
74
+ * Close the loopback server
75
+ */
76
+ closeServer() {
77
+ if (this.server) {
78
+ // Only stops accepting new connections, server will close once open/idle connections are closed.
79
+ this.server.close();
80
+ if (typeof this.server.closeAllConnections === "function") {
81
+ /*
82
+ * Close open/idle connections. This API is available in Node versions 18.2 and higher
83
+ */
84
+ this.server.closeAllConnections();
85
+ }
86
+ this.server.unref();
87
+ this.server = undefined;
88
+ }
89
+ }
86
90
  }
87
91
 
88
92
  exports.LoopbackClient = LoopbackClient;
@@ -1 +1 @@
1
- {"version":3,"file":"LoopbackClient.cjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["NodeAuthError","CommonConstants","UrlUtils","HttpStatus","Constants"],"mappings":";;;;;;;;;AAAA;;;AAGG;MAaU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAMA,2BAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,KAAI;AAChB,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACFA,2BAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,OAAO;AACV,iBAAA;AAAM,qBAAA,IAAI,GAAG,KAAKC,oBAAe,CAAC,aAAa,EAAE;oBAC9C,GAAG,CAAC,GAAG,CACH,eAAe;AACX,wBAAA,qEAAqE,CAC5E,CAAC;oBACF,OAAO;AACV,iBAAA;AAED,gBAAA,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;gBAC1C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAC5C,gBAAA,MAAM,gBAAgB,GAClBC,mBAAQ,CAAC,uBAAuB,CAC5B,SAAS,CAAC,MAAM,CACnB,IAAI,EAAE,CAAC;gBACZ,IAAI,gBAAgB,CAAC,IAAI,E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,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
1
+ {"version":3,"file":"LoopbackClient.cjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["NodeAuthError","CommonConstants","UrlUtils","HttpStatus","Constants"],"mappings":";;;;;;;;;AAAA;;;AAGG;MAaU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAMA,2BAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,KAAI;AAChB,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACFA,2BAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,OAAO;AACV,iBAAA;AAAM,qBAAA,IAAI,GAAG,KAAKC,oBAAe,CAAC,aAAa,EAAE;oBAC9C,GAAG,CAAC,GAAG,CACH,eAAe;AACX,wBAAA,qEAAqE,CAC5E,CAAC;oBACF,OAAO;AACV,iBAAA;AAED,gBAAA,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;gBAC1C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAC5C,gBAAA,MAAM,gBAAgB,GAClBC,mBAAQ,CAAC,uBAAuB,CAC5B,SAAS,CAAC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IAAI,IAAI,CAAC,MAAM,EAAE;;AAEb,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAEpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,KAAK,UAAU,EAAE;AACvD;;AAEG;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;AACrC,aAAA;AACD,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
@@ -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 +1 @@
1
- {"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,+BAA+B,EAGlC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAA0B;IAExC;;;;;OAKG;IACG,iBAAiB,CACnB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC;IA+C3C;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAetB"}
1
+ {"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,+BAA+B,EAGlC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAA0B;IAExC;;;;;OAKG;IACG,iBAAiB,CACnB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC;IAqD3C;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAetB"}
@@ -1,86 +1,90 @@
1
- /*! @azure/msal-node v2.12.0 2024-07-23 */
1
+ /*! @azure/msal-node v2.13.1 2024-08-29 */
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
+ if (authCodeResponse.error) {
47
+ res.end(errorTemplate ||
48
+ `Error occurred: ${authCodeResponse.error}`);
49
+ }
50
+ resolve(authCodeResponse);
51
+ });
52
+ this.server.listen(0, "127.0.0.1"); // Listen on any available port
53
+ });
54
+ }
55
+ /**
56
+ * Get the port that the loopback server is running on
57
+ * @returns
58
+ */
59
+ getRedirectUri() {
60
+ if (!this.server || !this.server.listening) {
61
+ throw NodeAuthError.createNoLoopbackServerExistsError();
62
+ }
63
+ const address = this.server.address();
64
+ if (!address || typeof address === "string" || !address.port) {
65
+ this.closeServer();
66
+ throw NodeAuthError.createInvalidLoopbackAddressTypeError();
67
+ }
68
+ const port = address && address.port;
69
+ return `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}:${port}`;
70
+ }
71
+ /**
72
+ * Close the loopback server
73
+ */
74
+ closeServer() {
75
+ if (this.server) {
76
+ // Only stops accepting new connections, server will close once open/idle connections are closed.
77
+ this.server.close();
78
+ if (typeof this.server.closeAllConnections === "function") {
79
+ /*
80
+ * Close open/idle connections. This API is available in Node versions 18.2 and higher
81
+ */
82
+ this.server.closeAllConnections();
83
+ }
84
+ this.server.unref();
85
+ this.server = undefined;
86
+ }
87
+ }
84
88
  }
85
89
 
86
90
  export { LoopbackClient };
@@ -1 +1 @@
1
- {"version":3,"file":"LoopbackClient.mjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA;;;AAGG;MAaU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAM,aAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,KAAI;AAChB,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACF,aAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,OAAO;AACV,iBAAA;AAAM,qBAAA,IAAI,GAAG,KAAKA,SAAe,CAAC,aAAa,EAAE;oBAC9C,GAAG,CAAC,GAAG,CACH,eAAe;AACX,wBAAA,qEAAq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I,IAAI,CAAA,CAAE,CAAC;KACrE;AAED;;AAEG;IACH,WAAW,GAAA;QACP,IAAI,IAAI,CAAC,MAAM,EAAE;;AAEb,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAEpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,KAAK,UAAU,EAAE;AACvD;;AAEG;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;AACrC,aAAA;AACD,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
1
+ {"version":3,"file":"LoopbackClient.mjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA;;;AAGG;MAaU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;QAEtB,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAM,aAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,OAAO,IAAI,OAAO,CACd,CAAC,OAAO,EAAE,MAAM,KAAI;AAChB,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAC3B,CAAC,GAAyB,EAAE,GAAwB,KAAI;AACpD,gBAAA,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBACpB,IAAI,CAAC,GAAG,EAAE;oBACN,GAAG,CAAC,GAAG,CACH,aAAa;AACT,wBAAA,oCAAoC,CAC3C,CAAC;AACF,oBAAA,MAAM,CACF,aAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,OAAO;AACV,iBAAA;AAAM,qBAAA,IAAI,GAAG,KAAKA,SAAe,CAAC,aAAa,EAAE;oBAC9C,GAAG,CAAC,GAAG,CACH,eAA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CAAC,qCAAqC,EAAE,CAAC;AAC/D,SAAA;AAED,QAAA,MAAM,IAAI,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QAErC,OAAO,CAAA,EAAGC,WAAS,CAAC,aAAa,CAAA,EAAGA,WAAS,CAAC,SAAS,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE,CAAC;KACrE;AAED;;AAEG;IACH,WAAW,GAAA;QACP,IAAI,IAAI,CAAC,MAAM,EAAE;;AAEb,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAEpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,KAAK,UAAU,EAAE;AACvD;;AAEG;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;AACrC,aAAA;AACD,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"}
@@ -1,10 +1,10 @@
1
- /*! @azure/msal-node v2.12.0 2024-07-23 */
1
+ /*! @azure/msal-node v2.13.1 2024-08-29 */
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.12.0";
5
+ /* eslint-disable header/header */
6
+ const name = "@azure/msal-node";
7
+ const version = "2.13.1";
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.12.0";
1
+ export declare const name = "@azure/msal-node";
2
+ export declare const version = "2.13.1";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-node v2.12.0 2024-07-23 */
1
+ /*! @azure/msal-node v2.13.1 2024-08-29 */
2
2
  'use strict';
3
- /* eslint-disable header/header */
4
- const name = "@azure/msal-node";
5
- const version = "2.12.0";
3
+ /* eslint-disable header/header */
4
+ const name = "@azure/msal-node";
5
+ const version = "2.13.1";
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