@azure/msal-node 2.0.2 → 2.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +3 -1
  2. package/dist/cache/ITokenCache.d.ts +15 -15
  3. package/dist/cache/NodeStorage.cjs +401 -401
  4. package/dist/cache/NodeStorage.cjs.map +1 -1
  5. package/dist/cache/NodeStorage.d.ts +182 -182
  6. package/dist/cache/NodeStorage.d.ts.map +1 -1
  7. package/dist/cache/NodeStorage.mjs +401 -401
  8. package/dist/cache/NodeStorage.mjs.map +1 -1
  9. package/dist/cache/TokenCache.cjs +265 -269
  10. package/dist/cache/TokenCache.cjs.map +1 -1
  11. package/dist/cache/TokenCache.d.ts +90 -90
  12. package/dist/cache/TokenCache.d.ts.map +1 -1
  13. package/dist/cache/TokenCache.mjs +266 -270
  14. package/dist/cache/TokenCache.mjs.map +1 -1
  15. package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
  16. package/dist/cache/distributed/DistributedCachePlugin.cjs.map +1 -1
  17. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  18. package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
  19. package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
  20. package/dist/cache/distributed/DistributedCachePlugin.mjs.map +1 -1
  21. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  22. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  23. package/dist/cache/serializer/Deserializer.cjs +173 -175
  24. package/dist/cache/serializer/Deserializer.cjs.map +1 -1
  25. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  26. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  27. package/dist/cache/serializer/Deserializer.mjs +174 -176
  28. package/dist/cache/serializer/Deserializer.mjs.map +1 -1
  29. package/dist/cache/serializer/Serializer.cjs +134 -134
  30. package/dist/cache/serializer/Serializer.cjs.map +1 -1
  31. package/dist/cache/serializer/Serializer.d.ts +39 -39
  32. package/dist/cache/serializer/Serializer.d.ts.map +1 -1
  33. package/dist/cache/serializer/Serializer.mjs +134 -134
  34. package/dist/cache/serializer/Serializer.mjs.map +1 -1
  35. package/dist/cache/serializer/SerializerTypes.d.ts +101 -101
  36. package/dist/client/ClientApplication.cjs +333 -333
  37. package/dist/client/ClientApplication.cjs.map +1 -1
  38. package/dist/client/ClientApplication.d.ts +142 -142
  39. package/dist/client/ClientApplication.d.ts.map +1 -1
  40. package/dist/client/ClientApplication.mjs +334 -334
  41. package/dist/client/ClientApplication.mjs.map +1 -1
  42. package/dist/client/ClientAssertion.cjs +116 -116
  43. package/dist/client/ClientAssertion.cjs.map +1 -1
  44. package/dist/client/ClientAssertion.d.ts +46 -46
  45. package/dist/client/ClientAssertion.d.ts.map +1 -1
  46. package/dist/client/ClientAssertion.mjs +117 -117
  47. package/dist/client/ClientAssertion.mjs.map +1 -1
  48. package/dist/client/ClientCredentialClient.cjs +189 -168
  49. package/dist/client/ClientCredentialClient.cjs.map +1 -1
  50. package/dist/client/ClientCredentialClient.d.ts +33 -33
  51. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  52. package/dist/client/ClientCredentialClient.mjs +190 -169
  53. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  54. package/dist/client/ConfidentialClientApplication.cjs +163 -164
  55. package/dist/client/ConfidentialClientApplication.cjs.map +1 -1
  56. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  57. package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
  58. package/dist/client/ConfidentialClientApplication.mjs +164 -165
  59. package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
  60. package/dist/client/DeviceCodeClient.cjs +207 -207
  61. package/dist/client/DeviceCodeClient.cjs.map +1 -1
  62. package/dist/client/DeviceCodeClient.d.ts +53 -53
  63. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  64. package/dist/client/DeviceCodeClient.mjs +208 -208
  65. package/dist/client/DeviceCodeClient.mjs.map +1 -1
  66. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  67. package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
  68. package/dist/client/IPublicClientApplication.d.ts +42 -42
  69. package/dist/client/IPublicClientApplication.d.ts.map +1 -1
  70. package/dist/client/OnBehalfOfClient.cjs +203 -204
  71. package/dist/client/OnBehalfOfClient.cjs.map +1 -1
  72. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  73. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  74. package/dist/client/OnBehalfOfClient.mjs +204 -205
  75. package/dist/client/OnBehalfOfClient.mjs.map +1 -1
  76. package/dist/client/PublicClientApplication.cjs +229 -175
  77. package/dist/client/PublicClientApplication.cjs.map +1 -1
  78. package/dist/client/PublicClientApplication.d.ts +71 -65
  79. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  80. package/dist/client/PublicClientApplication.mjs +232 -178
  81. package/dist/client/PublicClientApplication.mjs.map +1 -1
  82. package/dist/client/UsernamePasswordClient.cjs +95 -95
  83. package/dist/client/UsernamePasswordClient.cjs.map +1 -1
  84. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  85. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  86. package/dist/client/UsernamePasswordClient.mjs +95 -95
  87. package/dist/client/UsernamePasswordClient.mjs.map +1 -1
  88. package/dist/config/Configuration.cjs +72 -72
  89. package/dist/config/Configuration.cjs.map +1 -1
  90. package/dist/config/Configuration.d.ts +107 -107
  91. package/dist/config/Configuration.mjs +72 -72
  92. package/dist/config/Configuration.mjs.map +1 -1
  93. package/dist/crypto/CryptoProvider.cjs +75 -75
  94. package/dist/crypto/CryptoProvider.cjs.map +1 -1
  95. package/dist/crypto/CryptoProvider.d.ts +52 -52
  96. package/dist/crypto/CryptoProvider.mjs +75 -75
  97. package/dist/crypto/CryptoProvider.mjs.map +1 -1
  98. package/dist/crypto/GuidGenerator.cjs +22 -22
  99. package/dist/crypto/GuidGenerator.cjs.map +1 -1
  100. package/dist/crypto/GuidGenerator.d.ts +14 -14
  101. package/dist/crypto/GuidGenerator.mjs +22 -22
  102. package/dist/crypto/GuidGenerator.mjs.map +1 -1
  103. package/dist/crypto/HashUtils.cjs +13 -13
  104. package/dist/crypto/HashUtils.cjs.map +1 -1
  105. package/dist/crypto/HashUtils.d.ts +8 -8
  106. package/dist/crypto/HashUtils.mjs +13 -13
  107. package/dist/crypto/HashUtils.mjs.map +1 -1
  108. package/dist/crypto/PkceGenerator.cjs +49 -49
  109. package/dist/crypto/PkceGenerator.cjs.map +1 -1
  110. package/dist/crypto/PkceGenerator.d.ts +22 -22
  111. package/dist/crypto/PkceGenerator.mjs +49 -49
  112. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  113. package/dist/error/NodeAuthError.cjs +85 -85
  114. package/dist/error/NodeAuthError.cjs.map +1 -1
  115. package/dist/error/NodeAuthError.d.ts +65 -65
  116. package/dist/error/NodeAuthError.mjs +85 -85
  117. package/dist/error/NodeAuthError.mjs.map +1 -1
  118. package/dist/index.cjs +17 -1
  119. package/dist/index.cjs.map +1 -1
  120. package/dist/index.d.ts +42 -42
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.mjs +2 -2
  123. package/dist/internals.cjs +8 -8
  124. package/dist/internals.cjs.map +1 -1
  125. package/dist/internals.d.ts +6 -6
  126. package/dist/internals.d.ts.map +1 -1
  127. package/dist/internals.mjs +8 -8
  128. package/dist/internals.mjs.map +1 -1
  129. package/dist/network/HttpClient.cjs +277 -276
  130. package/dist/network/HttpClient.cjs.map +1 -1
  131. package/dist/network/HttpClient.d.ts +25 -25
  132. package/dist/network/HttpClient.d.ts.map +1 -1
  133. package/dist/network/HttpClient.mjs +278 -277
  134. package/dist/network/HttpClient.mjs.map +1 -1
  135. package/dist/network/ILoopbackClient.d.ts +10 -10
  136. package/dist/network/LoopbackClient.cjs +75 -84
  137. package/dist/network/LoopbackClient.cjs.map +1 -1
  138. package/dist/network/LoopbackClient.d.ts +21 -21
  139. package/dist/network/LoopbackClient.d.ts.map +1 -1
  140. package/dist/network/LoopbackClient.mjs +77 -86
  141. package/dist/network/LoopbackClient.mjs.map +1 -1
  142. package/dist/packageMetadata.cjs +4 -4
  143. package/dist/packageMetadata.cjs.map +1 -1
  144. package/dist/packageMetadata.d.ts +2 -2
  145. package/dist/packageMetadata.mjs +4 -4
  146. package/dist/packageMetadata.mjs.map +1 -1
  147. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  148. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  149. package/dist/request/ClientCredentialRequest.d.ts +14 -14
  150. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  151. package/dist/request/InteractiveRequest.d.ts +22 -22
  152. package/dist/request/InteractiveRequest.d.ts.map +1 -1
  153. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  154. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  155. package/dist/request/SignOutRequest.d.ts +5 -5
  156. package/dist/request/SilentFlowRequest.d.ts +16 -16
  157. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  158. package/dist/utils/Constants.cjs +80 -90
  159. package/dist/utils/Constants.cjs.map +1 -1
  160. package/dist/utils/Constants.d.ts +86 -96
  161. package/dist/utils/Constants.d.ts.map +1 -1
  162. package/dist/utils/Constants.mjs +81 -90
  163. package/dist/utils/Constants.mjs.map +1 -1
  164. package/dist/utils/EncodingUtils.cjs +44 -44
  165. package/dist/utils/EncodingUtils.cjs.map +1 -1
  166. package/dist/utils/EncodingUtils.d.ts +26 -26
  167. package/dist/utils/EncodingUtils.mjs +44 -44
  168. package/dist/utils/EncodingUtils.mjs.map +1 -1
  169. package/dist/utils/NetworkUtils.cjs +38 -38
  170. package/dist/utils/NetworkUtils.cjs.map +1 -1
  171. package/dist/utils/NetworkUtils.d.ts +5 -5
  172. package/dist/utils/NetworkUtils.mjs +38 -38
  173. package/dist/utils/NetworkUtils.mjs.map +1 -1
  174. package/package.json +8 -5
  175. package/src/cache/ITokenCache.ts +24 -0
  176. package/src/cache/NodeStorage.ts +533 -0
  177. package/src/cache/TokenCache.ts +358 -0
  178. package/src/cache/distributed/DistributedCachePlugin.ts +56 -0
  179. package/src/cache/distributed/ICacheClient.ts +23 -0
  180. package/src/cache/distributed/IPartitionManager.ts +35 -0
  181. package/src/cache/serializer/Deserializer.ts +218 -0
  182. package/src/cache/serializer/Serializer.ts +173 -0
  183. package/src/cache/serializer/SerializerTypes.ts +121 -0
  184. package/src/client/ClientApplication.ts +596 -0
  185. package/src/client/ClientAssertion.ts +165 -0
  186. package/src/client/ClientCredentialClient.ts +346 -0
  187. package/src/client/ConfidentialClientApplication.ts +268 -0
  188. package/src/client/DeviceCodeClient.ts +369 -0
  189. package/src/client/IConfidentialClientApplication.ts +72 -0
  190. package/src/client/IPublicClientApplication.ts +72 -0
  191. package/src/client/OnBehalfOfClient.ts +368 -0
  192. package/src/client/PublicClientApplication.ts +339 -0
  193. package/src/client/UsernamePasswordClient.ts +180 -0
  194. package/src/config/Configuration.ts +201 -0
  195. package/src/crypto/CryptoProvider.ts +98 -0
  196. package/src/crypto/GuidGenerator.ts +28 -0
  197. package/src/crypto/HashUtils.ts +17 -0
  198. package/src/crypto/PkceGenerator.ts +63 -0
  199. package/src/error/NodeAuthError.ts +117 -0
  200. package/src/index.ts +125 -0
  201. package/src/internals.ts +12 -0
  202. package/src/network/HttpClient.ts +425 -0
  203. package/src/network/ILoopbackClient.ts +19 -0
  204. package/src/network/LoopbackClient.ts +110 -0
  205. package/src/packageMetadata.ts +3 -0
  206. package/src/request/AuthorizationCodeRequest.ts +39 -0
  207. package/src/request/AuthorizationUrlRequest.ts +50 -0
  208. package/src/request/ClientCredentialRequest.ts +29 -0
  209. package/src/request/DeviceCodeRequest.ts +34 -0
  210. package/src/request/InteractiveRequest.ts +39 -0
  211. package/src/request/OnBehalfOfRequest.ts +30 -0
  212. package/src/request/RefreshTokenRequest.ts +34 -0
  213. package/src/request/SignOutRequest.ts +11 -0
  214. package/src/request/SilentFlowRequest.ts +32 -0
  215. package/src/request/UsernamePasswordRequest.ts +36 -0
  216. package/src/utils/Constants.ts +103 -0
  217. package/src/utils/EncodingUtils.ts +50 -0
  218. package/src/utils/NetworkUtils.ts +49 -0
@@ -1,23 +1,23 @@
1
- import { PkceCodes } from "@azure/msal-common";
2
- /**
3
- * https://tools.ietf.org/html/rfc7636#page-8
4
- */
5
- export declare class PkceGenerator {
6
- private hashUtils;
7
- constructor();
8
- /**
9
- * generates the codeVerfier and the challenge from the codeVerfier
10
- * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2
11
- */
12
- generatePkceCodes(): Promise<PkceCodes>;
13
- /**
14
- * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1
15
- */
16
- private generateCodeVerifier;
17
- /**
18
- * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2
19
- * @param codeVerifier
20
- */
21
- private generateCodeChallengeFromVerifier;
22
- }
1
+ import { PkceCodes } from "@azure/msal-common";
2
+ /**
3
+ * https://tools.ietf.org/html/rfc7636#page-8
4
+ */
5
+ export declare class PkceGenerator {
6
+ private hashUtils;
7
+ constructor();
8
+ /**
9
+ * generates the codeVerfier and the challenge from the codeVerfier
10
+ * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2
11
+ */
12
+ generatePkceCodes(): Promise<PkceCodes>;
13
+ /**
14
+ * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1
15
+ */
16
+ private generateCodeVerifier;
17
+ /**
18
+ * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2
19
+ * @param codeVerifier
20
+ */
21
+ private generateCodeChallengeFromVerifier;
22
+ }
23
23
  //# sourceMappingURL=PkceGenerator.d.ts.map
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v2.0.2 2023-08-18 */
1
+ /*! @azure/msal-node v2.2.0-alpha.0 2023-09-20 */
2
2
  'use strict';
3
3
  import { Constants } from '@azure/msal-common';
4
4
  import { RANDOM_OCTET_SIZE, CharSet } from '../utils/Constants.mjs';
@@ -6,54 +6,54 @@ import { EncodingUtils } from '../utils/EncodingUtils.mjs';
6
6
  import { HashUtils } from './HashUtils.mjs';
7
7
  import crypto from 'crypto';
8
8
 
9
- /*
10
- * Copyright (c) Microsoft Corporation. All rights reserved.
11
- * Licensed under the MIT License.
12
- */
13
- /**
14
- * https://tools.ietf.org/html/rfc7636#page-8
15
- */
16
- class PkceGenerator {
17
- constructor() {
18
- this.hashUtils = new HashUtils();
19
- }
20
- /**
21
- * generates the codeVerfier and the challenge from the codeVerfier
22
- * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2
23
- */
24
- async generatePkceCodes() {
25
- const verifier = this.generateCodeVerifier();
26
- const challenge = this.generateCodeChallengeFromVerifier(verifier);
27
- return { verifier, challenge };
28
- }
29
- /**
30
- * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1
31
- */
32
- generateCodeVerifier() {
33
- const charArr = [];
34
- const maxNumber = 256 - (256 % CharSet.CV_CHARSET.length);
35
- while (charArr.length <= RANDOM_OCTET_SIZE) {
36
- const byte = crypto.randomBytes(1)[0];
37
- if (byte >= maxNumber) {
38
- /*
39
- * Ignore this number to maintain randomness.
40
- * Including it would result in an unequal distribution of characters after doing the modulo
41
- */
42
- continue;
43
- }
44
- const index = byte % CharSet.CV_CHARSET.length;
45
- charArr.push(CharSet.CV_CHARSET[index]);
46
- }
47
- const verifier = charArr.join(Constants.EMPTY_STRING);
48
- return EncodingUtils.base64EncodeUrl(verifier);
49
- }
50
- /**
51
- * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2
52
- * @param codeVerifier
53
- */
54
- generateCodeChallengeFromVerifier(codeVerifier) {
55
- return EncodingUtils.base64EncodeUrl(this.hashUtils.sha256(codeVerifier).toString("base64"), "base64");
56
- }
9
+ /*
10
+ * Copyright (c) Microsoft Corporation. All rights reserved.
11
+ * Licensed under the MIT License.
12
+ */
13
+ /**
14
+ * https://tools.ietf.org/html/rfc7636#page-8
15
+ */
16
+ class PkceGenerator {
17
+ constructor() {
18
+ this.hashUtils = new HashUtils();
19
+ }
20
+ /**
21
+ * generates the codeVerfier and the challenge from the codeVerfier
22
+ * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2
23
+ */
24
+ async generatePkceCodes() {
25
+ const verifier = this.generateCodeVerifier();
26
+ const challenge = this.generateCodeChallengeFromVerifier(verifier);
27
+ return { verifier, challenge };
28
+ }
29
+ /**
30
+ * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1
31
+ */
32
+ generateCodeVerifier() {
33
+ const charArr = [];
34
+ const maxNumber = 256 - (256 % CharSet.CV_CHARSET.length);
35
+ while (charArr.length <= RANDOM_OCTET_SIZE) {
36
+ const byte = crypto.randomBytes(1)[0];
37
+ if (byte >= maxNumber) {
38
+ /*
39
+ * Ignore this number to maintain randomness.
40
+ * Including it would result in an unequal distribution of characters after doing the modulo
41
+ */
42
+ continue;
43
+ }
44
+ const index = byte % CharSet.CV_CHARSET.length;
45
+ charArr.push(CharSet.CV_CHARSET[index]);
46
+ }
47
+ const verifier = charArr.join(Constants.EMPTY_STRING);
48
+ return EncodingUtils.base64EncodeUrl(verifier);
49
+ }
50
+ /**
51
+ * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2
52
+ * @param codeVerifier
53
+ */
54
+ generateCodeChallengeFromVerifier(codeVerifier) {
55
+ return EncodingUtils.base64EncodeUrl(this.hashUtils.sha256(codeVerifier).toString("base64"), "base64");
56
+ }
57
57
  }
58
58
 
59
59
  export { PkceGenerator };
@@ -1 +1 @@
1
- {"version":3,"file":"PkceGenerator.mjs","sources":["../../src/crypto/PkceGenerator.ts"],"sourcesContent":[null],"names":[],"m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AC,QAAQ,CAAC,EACtD,QAAQ,CACX,CAAC;KACL;AACJ;;;;"}
1
+ {"version":3,"file":"PkceGenerator.mjs","sources":["../../src/crypto/PkceGenerator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAKA;AAMA;;AAEG;;AAUI;AACG;AAMN,MAAA,aAAA,CAAA;;AAEG,QAAA,IAAA,CAAA,SAAA,GAAA,IAAA,SAAA,EAAA,CAAA;AACH,KAAA;AAmBA;;;AAGG;AACH,IAAA,MAAA,iBAAyC,GAAA;AAM5C,QAAA,MAAA,QAAA,GAAA,IAAA,CAAA,oBAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,93 +1,93 @@
1
- /*! @azure/msal-node v2.0.2 2023-08-18 */
1
+ /*! @azure/msal-node v2.2.0-alpha.0 2023-09-20 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
5
  var msalCommon = require('@azure/msal-common');
6
6
 
7
- /*
8
- * Copyright (c) Microsoft Corporation. All rights reserved.
9
- * Licensed under the MIT License.
10
- */
11
- /**
12
- * NodeAuthErrorMessage class containing string constants used by error codes and messages.
13
- */
14
- const NodeAuthErrorMessage = {
15
- invalidLoopbackAddressType: {
16
- code: "invalid_loopback_server_address_type",
17
- desc: "Loopback server address is not type string. This is unexpected.",
18
- },
19
- unableToLoadRedirectUri: {
20
- code: "unable_to_load_redirectUrl",
21
- desc: "Loopback server callback was invoked without a url. This is unexpected.",
22
- },
23
- noAuthCodeInResponse: {
24
- code: "no_auth_code_in_response",
25
- desc: "No auth code found in the server response. Please check your network trace to determine what happened.",
26
- },
27
- noLoopbackServerExists: {
28
- code: "no_loopback_server_exists",
29
- desc: "No loopback server exists yet.",
30
- },
31
- loopbackServerAlreadyExists: {
32
- code: "loopback_server_already_exists",
33
- desc: "Loopback server already exists. Cannot create another.",
34
- },
35
- loopbackServerTimeout: {
36
- code: "loopback_server_timeout",
37
- desc: "Timed out waiting for auth code listener to be registered.",
38
- },
39
- stateNotFoundError: {
40
- code: "state_not_found",
41
- desc: "State not found. Please verify that the request originated from msal.",
42
- },
43
- };
44
- class NodeAuthError extends msalCommon.AuthError {
45
- constructor(errorCode, errorMessage) {
46
- super(errorCode, errorMessage);
47
- this.name = "NodeAuthError";
48
- }
49
- /**
50
- * Creates an error thrown if loopback server address is of type string.
51
- */
52
- static createInvalidLoopbackAddressTypeError() {
53
- return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`);
54
- }
55
- /**
56
- * Creates an error thrown if the loopback server is unable to get a url.
57
- */
58
- static createUnableToLoadRedirectUrlError() {
59
- return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`);
60
- }
61
- /**
62
- * Creates an error thrown if the server response does not contain an auth code.
63
- */
64
- static createNoAuthCodeInResponseError() {
65
- return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`);
66
- }
67
- /**
68
- * Creates an error thrown if the loopback server has not been spun up yet.
69
- */
70
- static createNoLoopbackServerExistsError() {
71
- return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`);
72
- }
73
- /**
74
- * Creates an error thrown if a loopback server already exists when attempting to create another one.
75
- */
76
- static createLoopbackServerAlreadyExistsError() {
77
- return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`);
78
- }
79
- /**
80
- * Creates an error thrown if the loopback server times out registering the auth code listener.
81
- */
82
- static createLoopbackServerTimeoutError() {
83
- return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
84
- }
85
- /**
86
- * Creates an error thrown when the state is not present.
87
- */
88
- static createStateNotFoundError() {
89
- return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
90
- }
7
+ /*
8
+ * Copyright (c) Microsoft Corporation. All rights reserved.
9
+ * Licensed under the MIT License.
10
+ */
11
+ /**
12
+ * NodeAuthErrorMessage class containing string constants used by error codes and messages.
13
+ */
14
+ const NodeAuthErrorMessage = {
15
+ invalidLoopbackAddressType: {
16
+ code: "invalid_loopback_server_address_type",
17
+ desc: "Loopback server address is not type string. This is unexpected.",
18
+ },
19
+ unableToLoadRedirectUri: {
20
+ code: "unable_to_load_redirectUrl",
21
+ desc: "Loopback server callback was invoked without a url. This is unexpected.",
22
+ },
23
+ noAuthCodeInResponse: {
24
+ code: "no_auth_code_in_response",
25
+ desc: "No auth code found in the server response. Please check your network trace to determine what happened.",
26
+ },
27
+ noLoopbackServerExists: {
28
+ code: "no_loopback_server_exists",
29
+ desc: "No loopback server exists yet.",
30
+ },
31
+ loopbackServerAlreadyExists: {
32
+ code: "loopback_server_already_exists",
33
+ desc: "Loopback server already exists. Cannot create another.",
34
+ },
35
+ loopbackServerTimeout: {
36
+ code: "loopback_server_timeout",
37
+ desc: "Timed out waiting for auth code listener to be registered.",
38
+ },
39
+ stateNotFoundError: {
40
+ code: "state_not_found",
41
+ desc: "State not found. Please verify that the request originated from msal.",
42
+ },
43
+ };
44
+ class NodeAuthError extends msalCommon.AuthError {
45
+ constructor(errorCode, errorMessage) {
46
+ super(errorCode, errorMessage);
47
+ this.name = "NodeAuthError";
48
+ }
49
+ /**
50
+ * Creates an error thrown if loopback server address is of type string.
51
+ */
52
+ static createInvalidLoopbackAddressTypeError() {
53
+ return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`);
54
+ }
55
+ /**
56
+ * Creates an error thrown if the loopback server is unable to get a url.
57
+ */
58
+ static createUnableToLoadRedirectUrlError() {
59
+ return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`);
60
+ }
61
+ /**
62
+ * Creates an error thrown if the server response does not contain an auth code.
63
+ */
64
+ static createNoAuthCodeInResponseError() {
65
+ return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`);
66
+ }
67
+ /**
68
+ * Creates an error thrown if the loopback server has not been spun up yet.
69
+ */
70
+ static createNoLoopbackServerExistsError() {
71
+ return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`);
72
+ }
73
+ /**
74
+ * Creates an error thrown if a loopback server already exists when attempting to create another one.
75
+ */
76
+ static createLoopbackServerAlreadyExistsError() {
77
+ return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`);
78
+ }
79
+ /**
80
+ * Creates an error thrown if the loopback server times out registering the auth code listener.
81
+ */
82
+ static createLoopbackServerTimeoutError() {
83
+ return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
84
+ }
85
+ /**
86
+ * Creates an error thrown when the state is not present.
87
+ */
88
+ static createStateNotFoundError() {
89
+ return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
90
+ }
91
91
  }
92
92
 
93
93
  exports.NodeAuthError = NodeAuthError;
@@ -1 +1 @@
1
- {"version":3,"file":"NodeAuthError.cjs","sources":["../../src/error/NodeAuthError.ts"],"sourcesContent":[null],"names":["AuthError"],"mappings":";;;;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,MAAA,oBAAoB,GAAG;AAChC,IAAA,0BAA0B,EAAE;AACxB,QAAA,IAAI,EAAE,sCAAsC;AAC5C,QAAA,IAAI,EAAE,iEAAiE;AAC1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IAAA,OAAO,+BAA+B,GAAA;AAClC,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,oBAAoB,CAAC,IAAI,EAC9C,CAAA,EAAG,oBAAoB,CAAC,oBAAoB,CAAC,IAAI,CAAA,CAAE,CACtD,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,iCAAiC,GAAA;AACpC,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,sBAAsB,CAAC,IAAI,EAChD,CAAA,EAAG,oBAAoB,CAAC,sBAAsB,CAAC,IAAI,CAAA,CAAE,CACxD,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,sCAAsC,GAAA;AACzC,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,2BAA2B,CAAC,IAAI,EACrD,CAAA,EAAG,oBAAoB,CAAC,2BAA2B,CAAC,IAAI,CAAA,CAAE,CAC7D,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,gCAAgC,GAAA;AACnC,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,qBAAqB,CAAC,IAAI,EAC/C,CAAA,EAAG,oBAAoB,CAAC,qBAAqB,CAAC,IAAI,CAAA,CAAE,CACvD,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,wBAAwB,GAAA;AAC3B,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,kBAAkB,CAAC,IAAI,EAC5C,oBAAoB,CAAC,kBAAkB,CAAC,IAAI,CAC/C,CAAC;KACL;AACJ;;;;;"}
1
+ {"version":3,"file":"NodeAuthError.cjs","sources":["../../src/error/NodeAuthError.ts"],"sourcesContent":[null],"names":["AuthError"],"mappings":";;;;;;AAKA;AAEA;;AAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8BD,kBAAA,EAAA;AAEF,QAAa,IAAA,EAAA,iBAAA;AACG,QAAA,IAAA,EAAA,uEAAwC;AAKpD,KAAA;;AAEG,MAAA,aAAA,SAAAA,oBAAA,CAAA;IACH,WAA4C,CAAA,SAAA,EAAA,YAAA,EAAA;AAO5C,QAAA,KAAA,CAAA,SAAA,EAAA,YAAA,CAAA,CAAA;;AAEG,KAAA;;AAQH;;AAEG,IAAA,OAAA,qCAAA,GAAA;QACG,OAAgC,IAAA,aAAA,CAAA,oBAAiB,CAAA,0BAAA,CAAA,IAAA,EAAA,CAAA,EAAA,oBAAA,CAAA,0BAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AAOvD,KAAA;;AAEG;;AAQH,IAAA,OAAA,kCAAA,GAAA;;AAEG,KAAA;;AAQH;;AAEG,IAAA,OAAA,+BAAA,GAAA;QACG,OAAiC,IAAA,aAAA,CAAA,oBAAiB,CAAA,oBAAA,CAAA,IAAA,EAAA,CAAA,EAAA,oBAAA,CAAA,oBAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AAOxD,KAAA;;AAEG;;AAON,IAAA,OAAA,iCAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,66 +1,66 @@
1
- import { AuthError } from "@azure/msal-common";
2
- /**
3
- * NodeAuthErrorMessage class containing string constants used by error codes and messages.
4
- */
5
- export declare const NodeAuthErrorMessage: {
6
- invalidLoopbackAddressType: {
7
- code: string;
8
- desc: string;
9
- };
10
- unableToLoadRedirectUri: {
11
- code: string;
12
- desc: string;
13
- };
14
- noAuthCodeInResponse: {
15
- code: string;
16
- desc: string;
17
- };
18
- noLoopbackServerExists: {
19
- code: string;
20
- desc: string;
21
- };
22
- loopbackServerAlreadyExists: {
23
- code: string;
24
- desc: string;
25
- };
26
- loopbackServerTimeout: {
27
- code: string;
28
- desc: string;
29
- };
30
- stateNotFoundError: {
31
- code: string;
32
- desc: string;
33
- };
34
- };
35
- export declare class NodeAuthError extends AuthError {
36
- constructor(errorCode: string, errorMessage?: string);
37
- /**
38
- * Creates an error thrown if loopback server address is of type string.
39
- */
40
- static createInvalidLoopbackAddressTypeError(): NodeAuthError;
41
- /**
42
- * Creates an error thrown if the loopback server is unable to get a url.
43
- */
44
- static createUnableToLoadRedirectUrlError(): NodeAuthError;
45
- /**
46
- * Creates an error thrown if the server response does not contain an auth code.
47
- */
48
- static createNoAuthCodeInResponseError(): NodeAuthError;
49
- /**
50
- * Creates an error thrown if the loopback server has not been spun up yet.
51
- */
52
- static createNoLoopbackServerExistsError(): NodeAuthError;
53
- /**
54
- * Creates an error thrown if a loopback server already exists when attempting to create another one.
55
- */
56
- static createLoopbackServerAlreadyExistsError(): NodeAuthError;
57
- /**
58
- * Creates an error thrown if the loopback server times out registering the auth code listener.
59
- */
60
- static createLoopbackServerTimeoutError(): NodeAuthError;
61
- /**
62
- * Creates an error thrown when the state is not present.
63
- */
64
- static createStateNotFoundError(): NodeAuthError;
65
- }
1
+ import { AuthError } from "@azure/msal-common";
2
+ /**
3
+ * NodeAuthErrorMessage class containing string constants used by error codes and messages.
4
+ */
5
+ export declare const NodeAuthErrorMessage: {
6
+ invalidLoopbackAddressType: {
7
+ code: string;
8
+ desc: string;
9
+ };
10
+ unableToLoadRedirectUri: {
11
+ code: string;
12
+ desc: string;
13
+ };
14
+ noAuthCodeInResponse: {
15
+ code: string;
16
+ desc: string;
17
+ };
18
+ noLoopbackServerExists: {
19
+ code: string;
20
+ desc: string;
21
+ };
22
+ loopbackServerAlreadyExists: {
23
+ code: string;
24
+ desc: string;
25
+ };
26
+ loopbackServerTimeout: {
27
+ code: string;
28
+ desc: string;
29
+ };
30
+ stateNotFoundError: {
31
+ code: string;
32
+ desc: string;
33
+ };
34
+ };
35
+ export declare class NodeAuthError extends AuthError {
36
+ constructor(errorCode: string, errorMessage?: string);
37
+ /**
38
+ * Creates an error thrown if loopback server address is of type string.
39
+ */
40
+ static createInvalidLoopbackAddressTypeError(): NodeAuthError;
41
+ /**
42
+ * Creates an error thrown if the loopback server is unable to get a url.
43
+ */
44
+ static createUnableToLoadRedirectUrlError(): NodeAuthError;
45
+ /**
46
+ * Creates an error thrown if the server response does not contain an auth code.
47
+ */
48
+ static createNoAuthCodeInResponseError(): NodeAuthError;
49
+ /**
50
+ * Creates an error thrown if the loopback server has not been spun up yet.
51
+ */
52
+ static createNoLoopbackServerExistsError(): NodeAuthError;
53
+ /**
54
+ * Creates an error thrown if a loopback server already exists when attempting to create another one.
55
+ */
56
+ static createLoopbackServerAlreadyExistsError(): NodeAuthError;
57
+ /**
58
+ * Creates an error thrown if the loopback server times out registering the auth code listener.
59
+ */
60
+ static createLoopbackServerTimeoutError(): NodeAuthError;
61
+ /**
62
+ * Creates an error thrown when the state is not present.
63
+ */
64
+ static createStateNotFoundError(): NodeAuthError;
65
+ }
66
66
  //# sourceMappingURL=NodeAuthError.d.ts.map