@azure/msal-node 1.17.2 → 2.0.0-alpha.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 (177) hide show
  1. package/README.md +1 -0
  2. package/dist/cache/ITokenCache.d.ts.map +1 -1
  3. package/dist/cache/NodeStorage.d.ts.map +1 -1
  4. package/dist/cache/NodeStorage.esm.js +410 -0
  5. package/dist/cache/NodeStorage.esm.js.map +1 -0
  6. package/dist/cache/NodeStorage.js +412 -0
  7. package/dist/cache/NodeStorage.js.map +1 -0
  8. package/dist/cache/TokenCache.d.ts.map +1 -1
  9. package/dist/cache/TokenCache.esm.js +278 -0
  10. package/dist/cache/TokenCache.esm.js.map +1 -0
  11. package/dist/cache/TokenCache.js +280 -0
  12. package/dist/cache/TokenCache.js.map +1 -0
  13. package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
  14. package/dist/cache/distributed/DistributedCachePlugin.esm.js +33 -0
  15. package/dist/cache/distributed/DistributedCachePlugin.esm.js.map +1 -0
  16. package/dist/cache/distributed/DistributedCachePlugin.js +35 -0
  17. package/dist/cache/distributed/DistributedCachePlugin.js.map +1 -0
  18. package/dist/cache/distributed/ICacheClient.d.ts.map +1 -1
  19. package/dist/cache/distributed/IPartitionManager.d.ts.map +1 -1
  20. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  21. package/dist/cache/serializer/Deserializer.esm.js +182 -0
  22. package/dist/cache/serializer/Deserializer.esm.js.map +1 -0
  23. package/dist/cache/serializer/Deserializer.js +184 -0
  24. package/dist/cache/serializer/Deserializer.js.map +1 -0
  25. package/dist/cache/serializer/Serializer.d.ts.map +1 -1
  26. package/dist/cache/serializer/Serializer.esm.js +139 -0
  27. package/dist/cache/serializer/Serializer.esm.js.map +1 -0
  28. package/dist/cache/serializer/Serializer.js +141 -0
  29. package/dist/cache/serializer/Serializer.js.map +1 -0
  30. package/dist/cache/serializer/SerializerTypes.d.ts +8 -8
  31. package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -1
  32. package/dist/client/ClientApplication.d.ts +1 -1
  33. package/dist/client/ClientApplication.d.ts.map +1 -1
  34. package/dist/client/ClientApplication.esm.js +342 -0
  35. package/dist/client/ClientApplication.esm.js.map +1 -0
  36. package/dist/client/ClientApplication.js +344 -0
  37. package/dist/client/ClientApplication.js.map +1 -0
  38. package/dist/client/ClientAssertion.d.ts.map +1 -1
  39. package/dist/client/ClientAssertion.esm.js +126 -0
  40. package/dist/client/ClientAssertion.esm.js.map +1 -0
  41. package/dist/client/ClientAssertion.js +128 -0
  42. package/dist/client/ClientAssertion.js.map +1 -0
  43. package/dist/client/ClientCredentialClient.d.ts +34 -0
  44. package/dist/client/ClientCredentialClient.d.ts.map +1 -0
  45. package/dist/client/ClientCredentialClient.esm.js +164 -0
  46. package/dist/client/ClientCredentialClient.esm.js.map +1 -0
  47. package/dist/client/ClientCredentialClient.js +166 -0
  48. package/dist/client/ClientCredentialClient.js.map +1 -0
  49. package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
  50. package/dist/client/ConfidentialClientApplication.esm.js +175 -0
  51. package/dist/client/ConfidentialClientApplication.esm.js.map +1 -0
  52. package/dist/client/ConfidentialClientApplication.js +177 -0
  53. package/dist/client/ConfidentialClientApplication.js.map +1 -0
  54. package/dist/client/DeviceCodeClient.d.ts +54 -0
  55. package/dist/client/DeviceCodeClient.d.ts.map +1 -0
  56. package/dist/client/DeviceCodeClient.esm.js +214 -0
  57. package/dist/client/DeviceCodeClient.esm.js.map +1 -0
  58. package/dist/client/DeviceCodeClient.js +216 -0
  59. package/dist/client/DeviceCodeClient.js.map +1 -0
  60. package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
  61. package/dist/client/IPublicClientApplication.d.ts +1 -1
  62. package/dist/client/IPublicClientApplication.d.ts.map +1 -1
  63. package/dist/client/OnBehalfOfClient.d.ts +48 -0
  64. package/dist/client/OnBehalfOfClient.d.ts.map +1 -0
  65. package/dist/client/OnBehalfOfClient.esm.js +211 -0
  66. package/dist/client/OnBehalfOfClient.esm.js.map +1 -0
  67. package/dist/client/OnBehalfOfClient.js +213 -0
  68. package/dist/client/OnBehalfOfClient.js.map +1 -0
  69. package/dist/client/PublicClientApplication.d.ts +1 -1
  70. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  71. package/dist/client/PublicClientApplication.esm.js +187 -0
  72. package/dist/client/PublicClientApplication.esm.js.map +1 -0
  73. package/dist/client/PublicClientApplication.js +189 -0
  74. package/dist/client/PublicClientApplication.js.map +1 -0
  75. package/dist/client/UsernamePasswordClient.d.ts +26 -0
  76. package/dist/client/UsernamePasswordClient.d.ts.map +1 -0
  77. package/dist/client/UsernamePasswordClient.esm.js +109 -0
  78. package/dist/client/UsernamePasswordClient.esm.js.map +1 -0
  79. package/dist/client/UsernamePasswordClient.js +111 -0
  80. package/dist/client/UsernamePasswordClient.js.map +1 -0
  81. package/dist/config/Configuration.d.ts +9 -8
  82. package/dist/config/Configuration.d.ts.map +1 -1
  83. package/dist/config/Configuration.esm.js +78 -0
  84. package/dist/config/Configuration.esm.js.map +1 -0
  85. package/dist/config/Configuration.js +80 -0
  86. package/dist/config/Configuration.js.map +1 -0
  87. package/dist/crypto/CryptoProvider.d.ts.map +1 -1
  88. package/dist/crypto/CryptoProvider.esm.js +85 -0
  89. package/dist/crypto/CryptoProvider.esm.js.map +1 -0
  90. package/dist/crypto/CryptoProvider.js +87 -0
  91. package/dist/crypto/CryptoProvider.js.map +1 -0
  92. package/dist/crypto/GuidGenerator.d.ts.map +1 -1
  93. package/dist/crypto/GuidGenerator.esm.js +29 -0
  94. package/dist/crypto/GuidGenerator.esm.js.map +1 -0
  95. package/dist/crypto/GuidGenerator.js +31 -0
  96. package/dist/crypto/GuidGenerator.js.map +1 -0
  97. package/dist/crypto/HashUtils.d.ts.map +1 -1
  98. package/dist/crypto/HashUtils.esm.js +21 -0
  99. package/dist/crypto/HashUtils.esm.js.map +1 -0
  100. package/dist/crypto/HashUtils.js +23 -0
  101. package/dist/crypto/HashUtils.js.map +1 -0
  102. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  103. package/dist/crypto/PkceGenerator.esm.js +60 -0
  104. package/dist/crypto/PkceGenerator.esm.js.map +1 -0
  105. package/dist/crypto/PkceGenerator.js +62 -0
  106. package/dist/crypto/PkceGenerator.js.map +1 -0
  107. package/dist/error/NodeAuthError.d.ts.map +1 -1
  108. package/dist/error/NodeAuthError.esm.js +92 -0
  109. package/dist/error/NodeAuthError.esm.js.map +1 -0
  110. package/dist/error/NodeAuthError.js +95 -0
  111. package/dist/error/NodeAuthError.js.map +1 -0
  112. package/dist/index.d.ts +13 -3
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.esm.js +20 -0
  115. package/dist/index.esm.js.map +1 -0
  116. package/dist/index.js +101 -6
  117. package/dist/index.js.map +1 -0
  118. package/dist/internals.d.ts +7 -0
  119. package/dist/internals.d.ts.map +1 -0
  120. package/dist/internals.esm.js +10 -0
  121. package/dist/internals.esm.js.map +1 -0
  122. package/dist/internals.js +15 -0
  123. package/dist/internals.js.map +1 -0
  124. package/dist/network/HttpClient.d.ts +1 -0
  125. package/dist/network/HttpClient.d.ts.map +1 -1
  126. package/dist/network/HttpClient.esm.js +286 -0
  127. package/dist/network/HttpClient.esm.js.map +1 -0
  128. package/dist/network/HttpClient.js +288 -0
  129. package/dist/network/HttpClient.js.map +1 -0
  130. package/dist/network/ILoopbackClient.d.ts.map +1 -1
  131. package/dist/network/LoopbackClient.d.ts.map +1 -1
  132. package/dist/network/LoopbackClient.esm.js +94 -0
  133. package/dist/network/LoopbackClient.esm.js.map +1 -0
  134. package/dist/network/LoopbackClient.js +96 -0
  135. package/dist/network/LoopbackClient.js.map +1 -0
  136. package/dist/packageMetadata.d.ts +1 -1
  137. package/dist/packageMetadata.d.ts.map +1 -1
  138. package/dist/packageMetadata.esm.js +8 -0
  139. package/dist/packageMetadata.esm.js.map +1 -0
  140. package/dist/packageMetadata.js +11 -0
  141. package/dist/packageMetadata.js.map +1 -0
  142. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  143. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  144. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  145. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  146. package/dist/request/ClientCredentialRequest.d.ts +1 -1
  147. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  148. package/dist/request/DeviceCodeRequest.d.ts +1 -1
  149. package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
  150. package/dist/request/InteractiveRequest.d.ts +1 -1
  151. package/dist/request/InteractiveRequest.d.ts.map +1 -1
  152. package/dist/request/OnBehalfOfRequest.d.ts +1 -1
  153. package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
  154. package/dist/request/RefreshTokenRequest.d.ts +1 -1
  155. package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
  156. package/dist/request/SignOutRequest.d.ts +1 -1
  157. package/dist/request/SignOutRequest.d.ts.map +1 -1
  158. package/dist/request/SilentFlowRequest.d.ts +1 -1
  159. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  160. package/dist/request/UsernamePasswordRequest.d.ts +1 -1
  161. package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
  162. package/dist/utils/Constants.d.ts.map +1 -1
  163. package/dist/utils/Constants.esm.js +98 -0
  164. package/dist/utils/Constants.esm.js.map +1 -0
  165. package/dist/utils/Constants.js +106 -0
  166. package/dist/utils/Constants.js.map +1 -0
  167. package/dist/utils/EncodingUtils.d.ts.map +1 -1
  168. package/dist/utils/EncodingUtils.esm.js +51 -0
  169. package/dist/utils/EncodingUtils.esm.js.map +1 -0
  170. package/dist/utils/EncodingUtils.js +53 -0
  171. package/dist/utils/EncodingUtils.js.map +1 -0
  172. package/dist/utils/NetworkUtils.d.ts.map +1 -1
  173. package/dist/utils/NetworkUtils.esm.js +43 -0
  174. package/dist/utils/NetworkUtils.esm.js.map +1 -0
  175. package/dist/utils/NetworkUtils.js +45 -0
  176. package/dist/utils/NetworkUtils.js.map +1 -0
  177. package/package.json +22 -16
@@ -0,0 +1,288 @@
1
+ /*! @azure/msal-node v2.0.0-alpha.1 2023-05-08 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ var Constants = require('../utils/Constants.js');
6
+ var NetworkUtils = require('../utils/NetworkUtils.js');
7
+ var http = require('http');
8
+ var https = require('https');
9
+
10
+ /*
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License.
13
+ */
14
+ /**
15
+ * This class implements the API for network requests.
16
+ */
17
+ class HttpClient {
18
+ constructor(proxyUrl, customAgentOptions) {
19
+ this.proxyUrl = proxyUrl || "";
20
+ this.customAgentOptions = customAgentOptions || {};
21
+ }
22
+ /**
23
+ * Http Get request
24
+ * @param url
25
+ * @param options
26
+ */
27
+ async sendGetRequestAsync(url, options) {
28
+ if (this.proxyUrl) {
29
+ return networkRequestViaProxy(url, this.proxyUrl, Constants.HttpMethod.GET, options, this.customAgentOptions);
30
+ }
31
+ else {
32
+ return networkRequestViaHttps(url, Constants.HttpMethod.GET, options, this.customAgentOptions);
33
+ }
34
+ }
35
+ /**
36
+ * Http Post request
37
+ * @param url
38
+ * @param options
39
+ */
40
+ async sendPostRequestAsync(url, options, cancellationToken) {
41
+ if (this.proxyUrl) {
42
+ return networkRequestViaProxy(url, this.proxyUrl, Constants.HttpMethod.POST, options, this.customAgentOptions, cancellationToken);
43
+ }
44
+ else {
45
+ return networkRequestViaHttps(url, Constants.HttpMethod.POST, options, this.customAgentOptions, cancellationToken);
46
+ }
47
+ }
48
+ }
49
+ const networkRequestViaProxy = (destinationUrlString, proxyUrlString, httpMethod, options, agentOptions, timeout) => {
50
+ const destinationUrl = new URL(destinationUrlString);
51
+ const proxyUrl = new URL(proxyUrlString);
52
+ // "method: connect" must be used to establish a connection to the proxy
53
+ const headers = options?.headers || {};
54
+ const tunnelRequestOptions = {
55
+ host: proxyUrl.hostname,
56
+ port: proxyUrl.port,
57
+ method: "CONNECT",
58
+ path: destinationUrl.hostname,
59
+ headers: headers,
60
+ };
61
+ if (timeout) {
62
+ tunnelRequestOptions.timeout = timeout;
63
+ }
64
+ if (agentOptions && Object.keys(agentOptions).length) {
65
+ tunnelRequestOptions.agent = new http.Agent(agentOptions);
66
+ }
67
+ // compose a request string for the socket
68
+ let postRequestStringContent = "";
69
+ if (httpMethod === Constants.HttpMethod.POST) {
70
+ const body = options?.body || "";
71
+ postRequestStringContent =
72
+ "Content-Type: application/x-www-form-urlencoded\r\n" +
73
+ `Content-Length: ${body.length}\r\n` +
74
+ `\r\n${body}`;
75
+ }
76
+ const outgoingRequestString = `${httpMethod.toUpperCase()} ${destinationUrl.href} HTTP/1.1\r\n` +
77
+ `Host: ${destinationUrl.host}\r\n` +
78
+ "Connection: close\r\n" +
79
+ postRequestStringContent +
80
+ "\r\n";
81
+ return new Promise((resolve, reject) => {
82
+ const request = http.request(tunnelRequestOptions);
83
+ if (tunnelRequestOptions.timeout) {
84
+ request.on("timeout", () => {
85
+ request.destroy();
86
+ reject(new Error("Request time out"));
87
+ });
88
+ }
89
+ request.end();
90
+ // establish connection to the proxy
91
+ request.on("connect", (response, socket) => {
92
+ const proxyStatusCode = response?.statusCode || Constants.ProxyStatus.SERVER_ERROR;
93
+ if (proxyStatusCode < Constants.ProxyStatus.SUCCESS_RANGE_START ||
94
+ proxyStatusCode > Constants.ProxyStatus.SUCCESS_RANGE_END) {
95
+ request.destroy();
96
+ socket.destroy();
97
+ reject(new Error(`Error connecting to proxy. Http status code: ${response.statusCode}. Http status message: ${response?.statusMessage || "Unknown"}`));
98
+ }
99
+ if (tunnelRequestOptions.timeout) {
100
+ socket.setTimeout(tunnelRequestOptions.timeout);
101
+ socket.on("timeout", () => {
102
+ request.destroy();
103
+ socket.destroy();
104
+ reject(new Error("Request time out"));
105
+ });
106
+ }
107
+ // make a request over an HTTP tunnel
108
+ socket.write(outgoingRequestString);
109
+ const data = [];
110
+ socket.on("data", (chunk) => {
111
+ data.push(chunk);
112
+ });
113
+ socket.on("end", () => {
114
+ // combine all received buffer streams into one buffer, and then into a string
115
+ const dataString = Buffer.concat([...data]).toString();
116
+ // separate each line into it's own entry in an arry
117
+ const dataStringArray = dataString.split("\r\n");
118
+ // the first entry will contain the statusCode and statusMessage
119
+ const httpStatusCode = parseInt(dataStringArray[0].split(" ")[1]);
120
+ // remove "HTTP/1.1" and the status code to get the status message
121
+ const statusMessage = dataStringArray[0]
122
+ .split(" ")
123
+ .slice(2)
124
+ .join(" ");
125
+ // the last entry will contain the body
126
+ const body = dataStringArray[dataStringArray.length - 1];
127
+ // everything in between the first and last entries are the headers
128
+ const headersArray = dataStringArray.slice(1, dataStringArray.length - 2);
129
+ // build an object out of all the headers
130
+ const entries = new Map();
131
+ headersArray.forEach((header) => {
132
+ /**
133
+ * the header might look like "Content-Length: 1531", but that is just a string
134
+ * it needs to be converted to a key/value pair
135
+ * split the string at the first instance of ":"
136
+ * there may be more than one ":" if the value of the header is supposed to be a JSON object
137
+ */
138
+ const headerKeyValue = header.split(new RegExp(/:\s(.*)/s));
139
+ const headerKey = headerKeyValue[0];
140
+ let headerValue = headerKeyValue[1];
141
+ // check if the value of the header is supposed to be a JSON object
142
+ try {
143
+ const object = JSON.parse(headerValue);
144
+ // if it is, then convert it from a string to a JSON object
145
+ if (object && typeof object === "object") {
146
+ headerValue = object;
147
+ }
148
+ }
149
+ catch (e) {
150
+ // otherwise, leave it as a string
151
+ }
152
+ entries.set(headerKey, headerValue);
153
+ });
154
+ const headers = Object.fromEntries(entries);
155
+ const parsedHeaders = headers;
156
+ const networkResponse = NetworkUtils.NetworkUtils.getNetworkResponse(parsedHeaders, parseBody(httpStatusCode, statusMessage, parsedHeaders, body), httpStatusCode);
157
+ if ((httpStatusCode < Constants.HttpStatus.SUCCESS_RANGE_START ||
158
+ httpStatusCode > Constants.HttpStatus.SUCCESS_RANGE_END) &&
159
+ // do not destroy the request for the device code flow
160
+ networkResponse.body["error"] !==
161
+ Constants.Constants.AUTHORIZATION_PENDING) {
162
+ request.destroy();
163
+ }
164
+ resolve(networkResponse);
165
+ });
166
+ socket.on("error", (chunk) => {
167
+ request.destroy();
168
+ socket.destroy();
169
+ reject(new Error(chunk.toString()));
170
+ });
171
+ });
172
+ request.on("error", (chunk) => {
173
+ request.destroy();
174
+ reject(new Error(chunk.toString()));
175
+ });
176
+ });
177
+ };
178
+ const networkRequestViaHttps = (urlString, httpMethod, options, agentOptions, timeout) => {
179
+ const isPostRequest = httpMethod === Constants.HttpMethod.POST;
180
+ const body = options?.body || "";
181
+ const url = new URL(urlString);
182
+ const headers = options?.headers || {};
183
+ const customOptions = {
184
+ method: httpMethod,
185
+ headers: headers,
186
+ ...NetworkUtils.NetworkUtils.urlToHttpOptions(url),
187
+ };
188
+ if (timeout) {
189
+ customOptions.timeout = timeout;
190
+ }
191
+ if (agentOptions && Object.keys(agentOptions).length) {
192
+ customOptions.agent = new https.Agent(agentOptions);
193
+ }
194
+ if (isPostRequest) {
195
+ // needed for post request to work
196
+ customOptions.headers = {
197
+ ...customOptions.headers,
198
+ "Content-Length": body.length,
199
+ };
200
+ }
201
+ return new Promise((resolve, reject) => {
202
+ const request = https.request(customOptions);
203
+ if (timeout) {
204
+ request.on("timeout", () => {
205
+ request.destroy();
206
+ reject(new Error("Request time out"));
207
+ });
208
+ }
209
+ if (isPostRequest) {
210
+ request.write(body);
211
+ }
212
+ request.end();
213
+ request.on("response", (response) => {
214
+ const headers = response.headers;
215
+ const statusCode = response.statusCode;
216
+ const statusMessage = response.statusMessage;
217
+ const data = [];
218
+ response.on("data", (chunk) => {
219
+ data.push(chunk);
220
+ });
221
+ response.on("end", () => {
222
+ // combine all received buffer streams into one buffer, and then into a string
223
+ const body = Buffer.concat([...data]).toString();
224
+ const parsedHeaders = headers;
225
+ const networkResponse = NetworkUtils.NetworkUtils.getNetworkResponse(parsedHeaders, parseBody(statusCode, statusMessage, parsedHeaders, body), statusCode);
226
+ if ((statusCode < Constants.HttpStatus.SUCCESS_RANGE_START ||
227
+ statusCode > Constants.HttpStatus.SUCCESS_RANGE_END) &&
228
+ // do not destroy the request for the device code flow
229
+ networkResponse.body["error"] !==
230
+ Constants.Constants.AUTHORIZATION_PENDING) {
231
+ request.destroy();
232
+ }
233
+ resolve(networkResponse);
234
+ });
235
+ });
236
+ request.on("error", (chunk) => {
237
+ request.destroy();
238
+ reject(new Error(chunk.toString()));
239
+ });
240
+ });
241
+ };
242
+ /**
243
+ * Check if extra parsing is needed on the repsonse from the server
244
+ * @param statusCode {number} the status code of the response from the server
245
+ * @param statusMessage {string | undefined} the status message of the response from the server
246
+ * @param headers {Record<string, string>} the headers of the response from the server
247
+ * @param body {string} the body from the response of the server
248
+ * @returns {Object} JSON parsed body or error object
249
+ */
250
+ const parseBody = (statusCode, statusMessage, headers, body) => {
251
+ /*
252
+ * Informational responses (100 – 199)
253
+ * Successful responses (200 – 299)
254
+ * Redirection messages (300 – 399)
255
+ * Client error responses (400 – 499)
256
+ * Server error responses (500 – 599)
257
+ */
258
+ let parsedBody;
259
+ try {
260
+ parsedBody = JSON.parse(body);
261
+ }
262
+ catch (error) {
263
+ let errorType;
264
+ let errorDescriptionHelper;
265
+ if (statusCode >= Constants.HttpStatus.CLIENT_ERROR_RANGE_START &&
266
+ statusCode <= Constants.HttpStatus.CLIENT_ERROR_RANGE_END) {
267
+ errorType = "client_error";
268
+ errorDescriptionHelper = "A client";
269
+ }
270
+ else if (statusCode >= Constants.HttpStatus.SERVER_ERROR_RANGE_START &&
271
+ statusCode <= Constants.HttpStatus.SERVER_ERROR_RANGE_END) {
272
+ errorType = "server_error";
273
+ errorDescriptionHelper = "A server";
274
+ }
275
+ else {
276
+ errorType = "unknown_error";
277
+ errorDescriptionHelper = "An unknown";
278
+ }
279
+ parsedBody = {
280
+ error: errorType,
281
+ error_description: `${errorDescriptionHelper} error occured.\nHttp status code: ${statusCode}\nHttp status message: ${statusMessage || "Unknown"}\nHeaders: ${JSON.stringify(headers)}`,
282
+ };
283
+ }
284
+ return parsedBody;
285
+ };
286
+
287
+ exports.HttpClient = HttpClient;
288
+ //# sourceMappingURL=HttpClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpClient.js","sources":["../../src/network/HttpClient.ts"],"sourcesContent":[null],"names":["HttpMethod","ProxyStatus","NetworkUtils","HttpStatus","Constants"],"mappings":";;;;;;;;;AAAA;;;AAGG;AAiBH;;AAEG;MACU,UAAU,CAAA;IAInB,WACI,CAAA,QAAiB,EACjB,kBAA2D,EAAA;AAE3D,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;AAC/B,QAAA,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,IAAI,EAAE,CAAC;KACtD;AAED;;;;AAIG;AACH,IAAA,MAAM,mBAAmB,CACrB,GAAW,EACX,OAA+B,EAAA;QAE/B,IAAI,IAAI,CAAC,QAAQ,EAAE;AACf,YAAA,OAAO,sBAAsB,CACzB,GAAG,EACH,IAAI,CAAC,QAAQ,EACbA,oBAAU,CAAC,GAAG,EACd,OAAO,EACP,IAAI,CAAC,kBAAuC,CAC/C,CAAC;AACL,SAAA;AAAM,aAAA;AACH,YAAA,OAAO,sBAAsB,CACzB,GAAG,EACHA,oBAAU,CAAC,GAAG,EACd,OAAO,EACP,IAAI,CAAC,kBAAwC,CAChD,CAAC;AACL,SAAA;KACJ;AAED;;;;AAIG;AACH,IAAA,MAAM,oBAAoB,CACtB,GAAW,EACX,OAA+B,EAC/B,iBAA0B,EAAA;QAE1B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,OAAO,sBAAsB,CACzB,GAAG,EACH,IAAI,CAAC,QAAQ,EACbA,oBAAU,CAAC,IAAI,EACf,OAAO,EACP,IAAI,CAAC,kBAAuC,EAC5C,iBAAiB,CACpB,CAAC;AACL,SAAA;AAAM,aAAA;AACH,YAAA,OAAO,sBAAsB,CACzB,GAAG,EACHA,oBAAU,CAAC,IAAI,EACf,O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;AACvC,SAAA;AAAM,aAAA,IACH,UAAU,IAAIA,oBAAU,CAAC,wBAAwB;AACjD,YAAA,UAAU,IAAIA,oBAAU,CAAC,sBAAsB,EACjD;YACE,SAAS,GAAG,cAAc,CAAC;YAC3B,sBAAsB,GAAG,UAAU,CAAC;AACvC,SAAA;AAAM,aAAA;YACH,SAAS,GAAG,eAAe,CAAC;YAC5B,sBAAsB,GAAG,YAAY,CAAC;AACzC,SAAA;AAED,QAAA,UAAU,GAAG;AACT,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,iBAAiB,EAAE,CAAG,EAAA,sBAAsB,CAAsC,mCAAA,EAAA,UAAU,0BACxF,aAAa,IAAI,SACrB,CAAA,WAAA,EAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAE,CAAA;SAC1C,CAAC;AACL,KAAA;AAED,IAAA,OAAO,UAAU,CAAC;AACtB,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ILoopbackClient.d.ts","sourceRoot":"","sources":["../src/network/ILoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC9G,cAAc,IAAI,MAAM,CAAC;IACzB,WAAW,IAAI,IAAI,CAAA;CACtB"}
1
+ {"version":3,"file":"ILoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/ILoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,iBAAiB,CACb,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC5C,cAAc,IAAI,MAAM,CAAC;IACzB,WAAW,IAAI,IAAI,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgC,+BAA+B,EAAa,MAAM,oBAAoB,CAAC;AAI9G,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;OAKG;IACG,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,+BAA+B,CAAC;IA+CnH;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAKtB"}
1
+ {"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,+BAA+B,EAElC,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;OAKG;IACG,iBAAiB,CACnB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC;IAkE3C;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAKtB"}
@@ -0,0 +1,94 @@
1
+ /*! @azure/msal-node v2.0.0-alpha.1 2023-05-08 */
2
+ 'use strict';
3
+ import { Constants, UrlString } from '@azure/msal-common';
4
+ import { createServer } from 'http';
5
+ import { NodeAuthError } from '../error/NodeAuthError.esm.js';
6
+ import { HttpStatus, LOOPBACK_SERVER_CONSTANTS, Constants as Constants$1 } from '../utils/Constants.esm.js';
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
+ const authCodeListener = new Promise((resolve, reject) => {
24
+ this.server = createServer(async (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 authCodeResponse = UrlString.getDeserializedQueryString(url);
38
+ if (authCodeResponse.code) {
39
+ const redirectUri = await this.getRedirectUri();
40
+ res.writeHead(HttpStatus.REDIRECT, {
41
+ location: redirectUri,
42
+ }); // Prevent auth code from being saved in the browser history
43
+ res.end();
44
+ }
45
+ resolve(authCodeResponse);
46
+ });
47
+ this.server.listen(0); // Listen on any available port
48
+ });
49
+ // Wait for server to be listening
50
+ await new Promise((resolve) => {
51
+ let ticks = 0;
52
+ const id = setInterval(() => {
53
+ if (LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS /
54
+ LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS <
55
+ ticks) {
56
+ throw NodeAuthError.createLoopbackServerTimeoutError();
57
+ }
58
+ if (this.server.listening) {
59
+ clearInterval(id);
60
+ resolve();
61
+ }
62
+ ticks++;
63
+ }, LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS);
64
+ });
65
+ return authCodeListener;
66
+ }
67
+ /**
68
+ * Get the port that the loopback server is running on
69
+ * @returns
70
+ */
71
+ getRedirectUri() {
72
+ if (!this.server) {
73
+ throw NodeAuthError.createNoLoopbackServerExistsError();
74
+ }
75
+ const address = this.server.address();
76
+ if (!address || typeof address === "string" || !address.port) {
77
+ this.closeServer();
78
+ throw NodeAuthError.createInvalidLoopbackAddressTypeError();
79
+ }
80
+ const port = address && address.port;
81
+ return `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}:${port}`;
82
+ }
83
+ /**
84
+ * Close the loopback server
85
+ */
86
+ closeServer() {
87
+ if (!!this.server) {
88
+ this.server.close();
89
+ }
90
+ }
91
+ }
92
+
93
+ export { LoopbackClient };
94
+ //# sourceMappingURL=LoopbackClient.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoopbackClient.esm.js","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA;;;AAGG;MAgBU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;AAEtB,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;AACf,YAAA,MAAM,aAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAChC,CAAC,OAAO,EAAE,MAAM,KAAI;YAChB,IAAI,CAAC,MAAM,GAAG,YAAY,CACtB,OAAO,GAAoB,EAAE,GAAmB,KAAI;AAChD,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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d,YAAA,MAAM,aAAa,CAAC,iCAAiC,EAAE,CAAC;AAC3D,SAAA;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;AACtC,QAAA,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC1D,IAAI,CAAC,WAAW,EAAE,CAAC;AACnB,YAAA,MAAM,aAAa,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;AACP,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;AACf,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACvB,SAAA;KACJ;AACJ;;;;"}
@@ -0,0 +1,96 @@
1
+ /*! @azure/msal-node v2.0.0-alpha.1 2023-05-08 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ var msalCommon = require('@azure/msal-common');
6
+ var http = require('http');
7
+ var NodeAuthError = require('../error/NodeAuthError.js');
8
+ var Constants = require('../utils/Constants.js');
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
+ const authCodeListener = new Promise((resolve, reject) => {
26
+ this.server = http.createServer(async (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 authCodeResponse = msalCommon.UrlString.getDeserializedQueryString(url);
40
+ if (authCodeResponse.code) {
41
+ const redirectUri = await this.getRedirectUri();
42
+ res.writeHead(Constants.HttpStatus.REDIRECT, {
43
+ location: redirectUri,
44
+ }); // Prevent auth code from being saved in the browser history
45
+ res.end();
46
+ }
47
+ resolve(authCodeResponse);
48
+ });
49
+ this.server.listen(0); // Listen on any available port
50
+ });
51
+ // Wait for server to be listening
52
+ await new Promise((resolve) => {
53
+ let ticks = 0;
54
+ const id = setInterval(() => {
55
+ if (Constants.LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS /
56
+ Constants.LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS <
57
+ ticks) {
58
+ throw NodeAuthError.NodeAuthError.createLoopbackServerTimeoutError();
59
+ }
60
+ if (this.server.listening) {
61
+ clearInterval(id);
62
+ resolve();
63
+ }
64
+ ticks++;
65
+ }, Constants.LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS);
66
+ });
67
+ return authCodeListener;
68
+ }
69
+ /**
70
+ * Get the port that the loopback server is running on
71
+ * @returns
72
+ */
73
+ getRedirectUri() {
74
+ if (!this.server) {
75
+ throw NodeAuthError.NodeAuthError.createNoLoopbackServerExistsError();
76
+ }
77
+ const address = this.server.address();
78
+ if (!address || typeof address === "string" || !address.port) {
79
+ this.closeServer();
80
+ throw NodeAuthError.NodeAuthError.createInvalidLoopbackAddressTypeError();
81
+ }
82
+ const port = address && address.port;
83
+ return `${Constants.Constants.HTTP_PROTOCOL}${Constants.Constants.LOCALHOST}:${port}`;
84
+ }
85
+ /**
86
+ * Close the loopback server
87
+ */
88
+ closeServer() {
89
+ if (!!this.server) {
90
+ this.server.close();
91
+ }
92
+ }
93
+ }
94
+
95
+ exports.LoopbackClient = LoopbackClient;
96
+ //# sourceMappingURL=LoopbackClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoopbackClient.js","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["NodeAuthError","createServer","CommonConstants","UrlString","HttpStatus","LOOPBACK_SERVER_CONSTANTS","Constants"],"mappings":";;;;;;;;;AAAA;;;AAGG;MAgBU,cAAc,CAAA;AAGvB;;;;;AAKG;AACH,IAAA,MAAM,iBAAiB,CACnB,eAAwB,EACxB,aAAsB,EAAA;AAEtB,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;AACf,YAAA,MAAMA,2BAAa,CAAC,sCAAsC,EAAE,CAAC;AAChE,SAAA;QAED,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAChC,CAAC,OAAO,EAAE,MAAM,KAAI;YAChB,IAAI,CAAC,MAAM,GAAGC,iBAAY,CACtB,OAAO,GAAoB,EAAE,GAAmB,KAAI;AAChD,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,CACFD,2BAAa,CAAC,kCAAkC,EAAE,CACrD,CAAC;oBACF,OAAO;AACV,iBAAA;AAAM,qBAAA,IAAI,GAAG,KAAKE,oBAAe,CAAC,aAAa,EAAE;oBAC9C,GAAG,CAAC,GAAG,CACH,eAAe;AACX,wBAAA,qEAAqE,CAC5E,CAAC;oBACF,OAAO;AACV,iBAAA;gBAED,MAAM,gBAAgB,GAClBC,oBAAS,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC;gBAC9C,IAAI,gBAAgB,CAAC,IAAI,EAAE;AACvB,oBAA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,CAAC,IAAI,EAAE;YAC1D,IAAI,CAAC,WAAW,EAAE,CAAC;AACnB,YAAA,MAAMA,2BAAa,CAAC,qCAAqC,EAAE,CAAC;AAC/D,SAAA;AAED,QAAA,MAAM,IAAI,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QAErC,OAAO,CAAA,EAAGM,mBAAS,CAAC,aAAa,CAAA,EAAGA,mBAAS,CAAC,SAAS,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE,CAAC;KACrE;AAED;;AAEG;IACH,WAAW,GAAA;AACP,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;AACf,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACvB,SAAA;KACJ;AACJ;;;;"}
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-node";
2
- export declare const version = "1.17.2";
2
+ export declare const version = "2.0.0-alpha.1";
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,WAAW,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,kBAAkB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /*! @azure/msal-node v2.0.0-alpha.1 2023-05-08 */
2
+ 'use strict';
3
+ /* eslint-disable header/header */
4
+ const name = "@azure/msal-node";
5
+ const version = "2.0.0-alpha.1";
6
+
7
+ export { name, version };
8
+ //# sourceMappingURL=packageMetadata.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageMetadata.esm.js","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACO,MAAM,IAAI,GAAG,mBAAmB;AAChC,MAAM,OAAO,GAAG;;;;"}
@@ -0,0 +1,11 @@
1
+ /*! @azure/msal-node v2.0.0-alpha.1 2023-05-08 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ /* eslint-disable header/header */
6
+ const name = "@azure/msal-node";
7
+ const version = "2.0.0-alpha.1";
8
+
9
+ exports.name = name;
10
+ exports.version = version;
11
+ //# sourceMappingURL=packageMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACO,MAAM,IAAI,GAAG,mBAAmB;AAChC,MAAM,OAAO,GAAG;;;;;"}
@@ -13,7 +13,7 @@ import { CommonAuthorizationCodeRequest } from "@azure/msal-common";
13
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
14
  * @public
15
15
  */
16
- export declare type AuthorizationCodeRequest = Partial<Omit<CommonAuthorizationCodeRequest, "scopes" | "redirectUri" | "code" | "authenticationScheme" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
16
+ export type AuthorizationCodeRequest = Partial<Omit<CommonAuthorizationCodeRequest, "scopes" | "redirectUri" | "code" | "authenticationScheme" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
17
17
  scopes: Array<string>;
18
18
  redirectUri: string;
19
19
  code: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../src/request/AuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,oBAAY,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,QAAQ,GAAC,aAAa,GAAC,MAAM,GAAC,sBAAsB,GAAC,uBAAuB,GAAC,oBAAoB,GAAC,qBAAqB,CAAC,CAAC,GAAG;IAC5M,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"AuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/AuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC1C,IAAI,CACA,8BAA8B,EAC5B,QAAQ,GACR,aAAa,GACb,MAAM,GACN,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,CAC1B,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -27,7 +27,7 @@ import { CommonAuthorizationUrlRequest } from "@azure/msal-common";
27
27
  * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks.
28
28
  * @public
29
29
  */
30
- export declare type AuthorizationUrlRequest = Partial<Omit<CommonAuthorizationUrlRequest, "scopes" | "redirectUri" | "resourceRequestMethod" | "resourceRequestUri" | "authenticationScheme" | "requestedClaimsHash">> & {
30
+ export type AuthorizationUrlRequest = Partial<Omit<CommonAuthorizationUrlRequest, "scopes" | "redirectUri" | "resourceRequestMethod" | "resourceRequestUri" | "authenticationScheme" | "requestedClaimsHash">> & {
31
31
  scopes: Array<string>;
32
32
  redirectUri: string;
33
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../src/request/AuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,oBAAY,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,QAAQ,GAAC,aAAa,GAAC,uBAAuB,GAAC,oBAAoB,GAAC,sBAAsB,GAAC,qBAAqB,CAAC,CAAC,GAAG;IACnM,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC"}
1
+ {"version":3,"file":"AuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/AuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,QAAQ,GACR,aAAa,GACb,uBAAuB,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,qBAAqB,CAC1B,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -9,7 +9,7 @@ import { CommonClientCredentialRequest } from "@azure/msal-common";
9
9
  * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
10
10
  * @public
11
11
  */
12
- export declare type ClientCredentialRequest = Partial<Omit<CommonClientCredentialRequest, "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash" | "clientAssertion">> & {
12
+ export type ClientCredentialRequest = Partial<Omit<CommonClientCredentialRequest, "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash" | "clientAssertion">> & {
13
13
  scopes: Array<string>;
14
14
  clientAssertion?: string;
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ClientCredentialRequest.d.ts","sourceRoot":"","sources":["../src/request/ClientCredentialRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;;;;;;;GASG;AACH,oBAAY,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,QAAQ,GAAC,uBAAuB,GAAC,oBAAoB,GAAC,qBAAqB,GAAC,iBAAiB,CAAC,CAAC,GAAG;IAChL,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
1
+ {"version":3,"file":"ClientCredentialRequest.d.ts","sourceRoot":"","sources":["../../src/request/ClientCredentialRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,QAAQ,GACR,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,iBAAiB,CACtB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
@@ -9,7 +9,7 @@ import { CommonDeviceCodeRequest, DeviceCodeResponse } from "@azure/msal-common"
9
9
  * - extraQueryParameters - String to string map of custom query parameters added to the query string
10
10
  * @public
11
11
  */
12
- export declare type DeviceCodeRequest = Partial<Omit<CommonDeviceCodeRequest, "scopes" | "deviceCodeCallback" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
12
+ export type DeviceCodeRequest = Partial<Omit<CommonDeviceCodeRequest, "scopes" | "deviceCodeCallback" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
13
13
  scopes: Array<string>;
14
14
  deviceCodeCallback: (response: DeviceCodeResponse) => void;
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceCodeRequest.d.ts","sourceRoot":"","sources":["../src/request/DeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAG,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAElF;;;;;;;;;GASG;AACH,oBAAY,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAC,oBAAoB,GAAC,uBAAuB,GAAC,oBAAoB,GAAC,qBAAqB,CAAC,CAAC,GAAG;IACvK,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC9D,CAAC"}
1
+ {"version":3,"file":"DeviceCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/DeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,kBAAkB,EACrB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACrB,QAAQ,GACR,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,CAC1B,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC9D,CAAC"}
@@ -12,7 +12,7 @@ import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest";
12
12
  * - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
13
13
  * @public
14
14
  */
15
- export declare type InteractiveRequest = Pick<AuthorizationUrlRequest, "authority" | "correlationId" | "claims" | "azureCloudOptions" | "account" | "extraQueryParameters" | "tokenQueryParameters" | "extraScopesToConsent" | "loginHint" | "prompt"> & {
15
+ export type InteractiveRequest = Pick<AuthorizationUrlRequest, "authority" | "correlationId" | "claims" | "azureCloudOptions" | "account" | "extraQueryParameters" | "tokenQueryParameters" | "extraScopesToConsent" | "loginHint" | "prompt"> & {
16
16
  openBrowser: (url: string) => Promise<void>;
17
17
  scopes?: Array<string>;
18
18
  successTemplate?: string;