@azure/msal-node 2.7.0-alpha.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/cache/ITokenCache.d.ts +15 -15
  2. package/dist/cache/NodeStorage.cjs +423 -423
  3. package/dist/cache/NodeStorage.cjs.map +1 -1
  4. package/dist/cache/NodeStorage.d.ts +193 -193
  5. package/dist/cache/NodeStorage.d.ts.map +1 -1
  6. package/dist/cache/NodeStorage.mjs +424 -424
  7. package/dist/cache/NodeStorage.mjs.map +1 -1
  8. package/dist/cache/TokenCache.cjs +265 -265
  9. package/dist/cache/TokenCache.d.ts +90 -90
  10. package/dist/cache/TokenCache.mjs +265 -265
  11. package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
  12. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  13. package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
  14. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  15. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  16. package/dist/cache/serializer/Deserializer.cjs +167 -170
  17. package/dist/cache/serializer/Deserializer.cjs.map +1 -1
  18. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  19. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  20. package/dist/cache/serializer/Deserializer.mjs +168 -171
  21. package/dist/cache/serializer/Deserializer.mjs.map +1 -1
  22. package/dist/cache/serializer/Serializer.cjs +137 -137
  23. package/dist/cache/serializer/Serializer.d.ts +39 -39
  24. package/dist/cache/serializer/Serializer.mjs +137 -137
  25. package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
  26. package/dist/client/ClientApplication.cjs +333 -333
  27. package/dist/client/ClientApplication.cjs.map +1 -1
  28. package/dist/client/ClientApplication.d.ts +142 -142
  29. package/dist/client/ClientApplication.d.ts.map +1 -1
  30. package/dist/client/ClientApplication.mjs +333 -333
  31. package/dist/client/ClientApplication.mjs.map +1 -1
  32. package/dist/client/ClientAssertion.cjs +116 -116
  33. package/dist/client/ClientAssertion.d.ts +46 -46
  34. package/dist/client/ClientAssertion.mjs +116 -116
  35. package/dist/client/ClientCredentialClient.cjs +194 -194
  36. package/dist/client/ClientCredentialClient.d.ts +33 -33
  37. package/dist/client/ClientCredentialClient.mjs +194 -194
  38. package/dist/client/ConfidentialClientApplication.cjs +163 -163
  39. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  40. package/dist/client/ConfidentialClientApplication.mjs +163 -163
  41. package/dist/client/DeviceCodeClient.cjs +207 -207
  42. package/dist/client/DeviceCodeClient.d.ts +53 -53
  43. package/dist/client/DeviceCodeClient.mjs +207 -207
  44. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  45. package/dist/client/IPublicClientApplication.d.ts +42 -42
  46. package/dist/client/ManagedIdentityApplication.cjs +79 -78
  47. package/dist/client/ManagedIdentityApplication.cjs.map +1 -1
  48. package/dist/client/ManagedIdentityApplication.d.ts +23 -23
  49. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  50. package/dist/client/ManagedIdentityApplication.mjs +79 -78
  51. package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
  52. package/dist/client/ManagedIdentityClient.cjs +40 -36
  53. package/dist/client/ManagedIdentityClient.cjs.map +1 -1
  54. package/dist/client/ManagedIdentityClient.d.ts +19 -24
  55. package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
  56. package/dist/client/ManagedIdentityClient.mjs +40 -36
  57. package/dist/client/ManagedIdentityClient.mjs.map +1 -1
  58. package/dist/client/ManagedIdentitySources/AppService.cjs +42 -69
  59. package/dist/client/ManagedIdentitySources/AppService.cjs.map +1 -1
  60. package/dist/client/ManagedIdentitySources/AppService.d.ts +16 -16
  61. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  62. package/dist/client/ManagedIdentitySources/AppService.mjs +43 -70
  63. package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -1
  64. package/dist/client/ManagedIdentitySources/AzureArc.cjs +81 -92
  65. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
  66. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +18 -18
  67. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  68. package/dist/client/ManagedIdentitySources/AzureArc.mjs +84 -95
  69. package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
  70. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +112 -77
  71. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -1
  72. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +30 -18
  73. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  74. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +114 -80
  75. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
  76. package/dist/client/ManagedIdentitySources/CloudShell.cjs +47 -0
  77. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +1 -0
  78. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +15 -6
  79. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  80. package/dist/client/ManagedIdentitySources/CloudShell.mjs +45 -0
  81. package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +1 -0
  82. package/dist/client/ManagedIdentitySources/Imds.cjs +43 -52
  83. package/dist/client/ManagedIdentitySources/Imds.cjs.map +1 -1
  84. package/dist/client/ManagedIdentitySources/Imds.d.ts +12 -12
  85. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  86. package/dist/client/ManagedIdentitySources/Imds.mjs +44 -53
  87. package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
  88. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +61 -0
  89. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +1 -0
  90. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +16 -6
  91. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  92. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +59 -0
  93. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +1 -0
  94. package/dist/client/OnBehalfOfClient.cjs +202 -202
  95. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  96. package/dist/client/OnBehalfOfClient.mjs +202 -202
  97. package/dist/client/PublicClientApplication.cjs +229 -229
  98. package/dist/client/PublicClientApplication.d.ts +71 -71
  99. package/dist/client/PublicClientApplication.mjs +229 -229
  100. package/dist/client/UsernamePasswordClient.cjs +95 -95
  101. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  102. package/dist/client/UsernamePasswordClient.mjs +95 -95
  103. package/dist/config/Configuration.cjs +102 -86
  104. package/dist/config/Configuration.cjs.map +1 -1
  105. package/dist/config/Configuration.d.ts +123 -122
  106. package/dist/config/Configuration.d.ts.map +1 -1
  107. package/dist/config/Configuration.mjs +102 -86
  108. package/dist/config/Configuration.mjs.map +1 -1
  109. package/dist/config/ManagedIdentityId.cjs +48 -48
  110. package/dist/config/ManagedIdentityId.d.ts +11 -11
  111. package/dist/config/ManagedIdentityId.mjs +48 -48
  112. package/dist/config/ManagedIdentityRequestParameters.cjs +28 -29
  113. package/dist/config/ManagedIdentityRequestParameters.cjs.map +1 -1
  114. package/dist/config/ManagedIdentityRequestParameters.d.ts +11 -11
  115. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
  116. package/dist/config/ManagedIdentityRequestParameters.mjs +28 -29
  117. package/dist/config/ManagedIdentityRequestParameters.mjs.map +1 -1
  118. package/dist/crypto/CryptoProvider.cjs +75 -75
  119. package/dist/crypto/CryptoProvider.d.ts +52 -52
  120. package/dist/crypto/CryptoProvider.mjs +75 -75
  121. package/dist/crypto/GuidGenerator.cjs +22 -22
  122. package/dist/crypto/GuidGenerator.d.ts +14 -14
  123. package/dist/crypto/GuidGenerator.mjs +22 -22
  124. package/dist/crypto/HashUtils.cjs +13 -13
  125. package/dist/crypto/HashUtils.d.ts +8 -8
  126. package/dist/crypto/HashUtils.mjs +13 -13
  127. package/dist/crypto/PkceGenerator.cjs +49 -49
  128. package/dist/crypto/PkceGenerator.d.ts +22 -22
  129. package/dist/crypto/PkceGenerator.mjs +49 -49
  130. package/dist/error/ManagedIdentityError.cjs +39 -28
  131. package/dist/error/ManagedIdentityError.cjs.map +1 -1
  132. package/dist/error/ManagedIdentityError.d.ts +27 -21
  133. package/dist/error/ManagedIdentityError.d.ts.map +1 -1
  134. package/dist/error/ManagedIdentityError.mjs +40 -29
  135. package/dist/error/ManagedIdentityError.mjs.map +1 -1
  136. package/dist/error/ManagedIdentityErrorCodes.cjs +27 -14
  137. package/dist/error/ManagedIdentityErrorCodes.cjs.map +1 -1
  138. package/dist/error/ManagedIdentityErrorCodes.d.ts +19 -9
  139. package/dist/error/ManagedIdentityErrorCodes.d.ts.map +1 -1
  140. package/dist/error/ManagedIdentityErrorCodes.mjs +24 -14
  141. package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
  142. package/dist/error/NodeAuthError.cjs +85 -85
  143. package/dist/error/NodeAuthError.d.ts +65 -65
  144. package/dist/error/NodeAuthError.mjs +85 -85
  145. package/dist/index.cjs +1 -1
  146. package/dist/index.d.ts +44 -44
  147. package/dist/index.mjs +1 -1
  148. package/dist/internals.cjs +8 -8
  149. package/dist/internals.d.ts +6 -6
  150. package/dist/internals.mjs +8 -8
  151. package/dist/network/HttpClient.cjs +283 -283
  152. package/dist/network/HttpClient.cjs.map +1 -1
  153. package/dist/network/HttpClient.d.ts +25 -26
  154. package/dist/network/HttpClient.d.ts.map +1 -1
  155. package/dist/network/HttpClient.mjs +283 -283
  156. package/dist/network/HttpClient.mjs.map +1 -1
  157. package/dist/network/HttpClientWithRetries.cjs +44 -0
  158. package/dist/network/HttpClientWithRetries.cjs.map +1 -0
  159. package/dist/network/HttpClientWithRetries.d.ts +12 -0
  160. package/dist/network/HttpClientWithRetries.d.ts.map +1 -0
  161. package/dist/network/HttpClientWithRetries.mjs +42 -0
  162. package/dist/network/HttpClientWithRetries.mjs.map +1 -0
  163. package/dist/network/ILoopbackClient.d.ts +10 -10
  164. package/dist/network/LoopbackClient.cjs +77 -77
  165. package/dist/network/LoopbackClient.d.ts +21 -21
  166. package/dist/network/LoopbackClient.mjs +77 -77
  167. package/dist/packageMetadata.cjs +4 -4
  168. package/dist/packageMetadata.d.ts +2 -2
  169. package/dist/packageMetadata.d.ts.map +1 -1
  170. package/dist/packageMetadata.mjs +4 -4
  171. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  172. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  173. package/dist/request/ClientCredentialRequest.d.ts +14 -14
  174. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  175. package/dist/request/InteractiveRequest.d.ts +22 -22
  176. package/dist/request/ManagedIdentityRequest.d.ts +8 -8
  177. package/dist/request/ManagedIdentityRequestParams.d.ts +9 -9
  178. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  179. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  180. package/dist/request/SignOutRequest.d.ts +5 -5
  181. package/dist/request/SilentFlowRequest.d.ts +16 -16
  182. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  183. package/dist/response/ManagedIdentityTokenResponse.d.ts +24 -24
  184. package/dist/retry/IHttpRetryPolicy.d.ts +6 -0
  185. package/dist/retry/IHttpRetryPolicy.d.ts.map +1 -0
  186. package/dist/retry/LinearRetryPolicy.cjs +47 -0
  187. package/dist/retry/LinearRetryPolicy.cjs.map +1 -0
  188. package/dist/retry/LinearRetryPolicy.d.ts +12 -0
  189. package/dist/retry/LinearRetryPolicy.d.ts.map +1 -0
  190. package/dist/retry/LinearRetryPolicy.mjs +45 -0
  191. package/dist/retry/LinearRetryPolicy.mjs.map +1 -0
  192. package/dist/utils/Constants.cjs +141 -103
  193. package/dist/utils/Constants.cjs.map +1 -1
  194. package/dist/utils/Constants.d.ts +131 -106
  195. package/dist/utils/Constants.d.ts.map +1 -1
  196. package/dist/utils/Constants.mjs +133 -100
  197. package/dist/utils/Constants.mjs.map +1 -1
  198. package/dist/utils/EncodingUtils.cjs +44 -44
  199. package/dist/utils/EncodingUtils.d.ts +26 -26
  200. package/dist/utils/EncodingUtils.mjs +44 -44
  201. package/dist/utils/NetworkUtils.cjs +38 -38
  202. package/dist/utils/NetworkUtils.d.ts +5 -5
  203. package/dist/utils/NetworkUtils.mjs +38 -38
  204. package/package.json +5 -5
  205. package/src/cache/NodeStorage.ts +4 -9
  206. package/src/cache/serializer/Deserializer.ts +1 -5
  207. package/src/client/ClientApplication.ts +5 -4
  208. package/src/client/ManagedIdentityApplication.ts +3 -3
  209. package/src/client/ManagedIdentityClient.ts +23 -11
  210. package/src/client/ManagedIdentitySources/AppService.ts +68 -97
  211. package/src/client/ManagedIdentitySources/AzureArc.ts +59 -68
  212. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +70 -2
  213. package/src/client/ManagedIdentitySources/CloudShell.ts +93 -8
  214. package/src/client/ManagedIdentitySources/Imds.ts +54 -40
  215. package/src/client/ManagedIdentitySources/ServiceFabric.ts +126 -5
  216. package/src/config/Configuration.ts +44 -16
  217. package/src/config/ManagedIdentityRequestParameters.ts +1 -6
  218. package/src/error/ManagedIdentityError.ts +15 -2
  219. package/src/error/ManagedIdentityErrorCodes.ts +19 -0
  220. package/src/network/HttpClient.ts +6 -11
  221. package/src/network/HttpClientWithRetries.ts +80 -0
  222. package/src/packageMetadata.ts +1 -1
  223. package/src/retry/IHttpRetryPolicy.ts +18 -0
  224. package/src/retry/LinearRetryPolicy.ts +71 -0
  225. package/src/utils/Constants.ts +43 -7
@@ -1 +1 @@
1
- {"version":3,"file":"ClientApplication.mjs","sources":["../../src/client/ClientApplication.ts"],"sourcesContent":[null],"names":["NodeConstants","Constants"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAoDH;;;AAGG;MACmB,i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,0BAA0B,EACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B;SAClD,CAAC;QAEF,OAAO,gBAAgB,CAAC,wBAAwB,CAC5C,YAAY,EACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,CAAC,OAAO,EACZ,gBAAgB,EAChB,IAAI,CAAC,MAAM,CACd,CAAC;KACL;AAED;;AAEG;IACH,UAAU,GAAA;AACN,QAAA,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;KAC7B;AACJ;;;;"}
1
+ {"version":3,"file":"ClientApplication.mjs","sources":["../../src/client/ClientApplication.ts"],"sourcesContent":[null],"names":["NodeConstants","Constants"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAoDH;;;AAGG;MACmB,iBAAiB,CAAA;AAyBnC;;AAEG;AACH,IAAA,WAAA,CAAsB,aAA4B,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAC3C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,EACJ,OAAO,CACV,CAAC;AACF,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAC1B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EACzB,IAAI,CAAC,cAAc,EACnB,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAChD,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAC5B,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAChC,CAAC;KACL;AAED;;;;;;;;AAQG;IACH,MAAM,cAAc,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ErC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;;QAGpE,MAAM,YAAY,GAAG,SAAS,CAAC,iBAAiB,CAC5C,eAAe,EACf,iBAAiB,CACpB,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAqB;AACvC,YAAA,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY;AAC3C,YAAA,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB;AACnD,YAAA,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB;AAC/D,YAAA,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB;YACrD,wBAAwB;AACxB,YAAA,0BAA0B,EACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B;SAClD,CAAC;QAEF,OAAO,gBAAgB,CAAC,wBAAwB,CAC5C,YAAY,EACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,CAAC,OAAO,EACZ,gBAAgB,EAChB,IAAI,CAAC,MAAM,EACX,oBAAoB,CACvB,CAAC;KACL;AAED;;AAEG;IACH,UAAU,GAAA;AACN,QAAA,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;KAC7B;AACJ;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -7,121 +7,121 @@ var msalCommon = require('@azure/msal-common');
7
7
  var EncodingUtils = require('../utils/EncodingUtils.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
- /**
15
- * Client assertion of type jwt-bearer used in confidential client flows
16
- * @public
17
- */
18
- class ClientAssertion {
19
- /**
20
- * Initialize the ClientAssertion class from the clientAssertion passed by the user
21
- * @param assertion - refer https://tools.ietf.org/html/rfc7521
22
- */
23
- static fromAssertion(assertion) {
24
- const clientAssertion = new ClientAssertion();
25
- clientAssertion.jwt = assertion;
26
- return clientAssertion;
27
- }
28
- /**
29
- * Initialize the ClientAssertion class from the certificate passed by the user
30
- * @param thumbprint - identifier of a certificate
31
- * @param privateKey - secret key
32
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
33
- */
34
- static fromCertificate(thumbprint, privateKey, publicCertificate) {
35
- const clientAssertion = new ClientAssertion();
36
- clientAssertion.privateKey = privateKey;
37
- clientAssertion.thumbprint = thumbprint;
38
- if (publicCertificate) {
39
- clientAssertion.publicCertificate =
40
- this.parseCertificate(publicCertificate);
41
- }
42
- return clientAssertion;
43
- }
44
- /**
45
- * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
46
- * @param cryptoProvider - library's crypto helper
47
- * @param issuer - iss claim
48
- * @param jwtAudience - aud claim
49
- */
50
- getJwt(cryptoProvider, issuer, jwtAudience) {
51
- // if assertion was created from certificate, check if jwt is expired and create new one.
52
- if (this.privateKey && this.thumbprint) {
53
- if (this.jwt &&
54
- !this.isExpired() &&
55
- issuer === this.issuer &&
56
- jwtAudience === this.jwtAudience) {
57
- return this.jwt;
58
- }
59
- return this.createJwt(cryptoProvider, issuer, jwtAudience);
60
- }
61
- /*
62
- * if assertion was created by caller, then we just append it. It is up to the caller to
63
- * ensure that it contains necessary claims and that it is not expired.
64
- */
65
- if (this.jwt) {
66
- return this.jwt;
67
- }
68
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidAssertion);
69
- }
70
- /**
71
- * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
72
- */
73
- createJwt(cryptoProvider, issuer, jwtAudience) {
74
- this.issuer = issuer;
75
- this.jwtAudience = jwtAudience;
76
- const issuedAt = msalCommon.TimeUtils.nowSeconds();
77
- this.expirationTime = issuedAt + 600;
78
- const header = {
79
- alg: Constants.JwtConstants.RSA_256,
80
- x5t: EncodingUtils.EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
81
- };
82
- if (this.publicCertificate) {
83
- Object.assign(header, {
84
- x5c: this.publicCertificate,
85
- });
86
- }
87
- const payload = {
88
- [Constants.JwtConstants.AUDIENCE]: this.jwtAudience,
89
- [Constants.JwtConstants.EXPIRATION_TIME]: this.expirationTime,
90
- [Constants.JwtConstants.ISSUER]: this.issuer,
91
- [Constants.JwtConstants.SUBJECT]: this.issuer,
92
- [Constants.JwtConstants.NOT_BEFORE]: issuedAt,
93
- [Constants.JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
94
- };
95
- this.jwt = jwt.sign(payload, this.privateKey, { header });
96
- return this.jwt;
97
- }
98
- /**
99
- * Utility API to check expiration
100
- */
101
- isExpired() {
102
- return this.expirationTime < msalCommon.TimeUtils.nowSeconds();
103
- }
104
- /**
105
- * Extracts the raw certs from a given certificate string and returns them in an array.
106
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
107
- */
108
- static parseCertificate(publicCertificate) {
109
- /**
110
- * This is regex to identify the certs in a given certificate string.
111
- * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
112
- * The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
113
- * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
114
- * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
115
- */
116
- const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
117
- const certs = [];
118
- let matches;
119
- while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
120
- // matches[1] represents the first parens capture group in the regex.
121
- certs.push(matches[1].replace(/\r*\n/g, msalCommon.Constants.EMPTY_STRING));
122
- }
123
- return certs;
124
- }
10
+ /*
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License.
13
+ */
14
+ /**
15
+ * Client assertion of type jwt-bearer used in confidential client flows
16
+ * @public
17
+ */
18
+ class ClientAssertion {
19
+ /**
20
+ * Initialize the ClientAssertion class from the clientAssertion passed by the user
21
+ * @param assertion - refer https://tools.ietf.org/html/rfc7521
22
+ */
23
+ static fromAssertion(assertion) {
24
+ const clientAssertion = new ClientAssertion();
25
+ clientAssertion.jwt = assertion;
26
+ return clientAssertion;
27
+ }
28
+ /**
29
+ * Initialize the ClientAssertion class from the certificate passed by the user
30
+ * @param thumbprint - identifier of a certificate
31
+ * @param privateKey - secret key
32
+ * @param publicCertificate - electronic document provided to prove the ownership of the public key
33
+ */
34
+ static fromCertificate(thumbprint, privateKey, publicCertificate) {
35
+ const clientAssertion = new ClientAssertion();
36
+ clientAssertion.privateKey = privateKey;
37
+ clientAssertion.thumbprint = thumbprint;
38
+ if (publicCertificate) {
39
+ clientAssertion.publicCertificate =
40
+ this.parseCertificate(publicCertificate);
41
+ }
42
+ return clientAssertion;
43
+ }
44
+ /**
45
+ * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
46
+ * @param cryptoProvider - library's crypto helper
47
+ * @param issuer - iss claim
48
+ * @param jwtAudience - aud claim
49
+ */
50
+ getJwt(cryptoProvider, issuer, jwtAudience) {
51
+ // if assertion was created from certificate, check if jwt is expired and create new one.
52
+ if (this.privateKey && this.thumbprint) {
53
+ if (this.jwt &&
54
+ !this.isExpired() &&
55
+ issuer === this.issuer &&
56
+ jwtAudience === this.jwtAudience) {
57
+ return this.jwt;
58
+ }
59
+ return this.createJwt(cryptoProvider, issuer, jwtAudience);
60
+ }
61
+ /*
62
+ * if assertion was created by caller, then we just append it. It is up to the caller to
63
+ * ensure that it contains necessary claims and that it is not expired.
64
+ */
65
+ if (this.jwt) {
66
+ return this.jwt;
67
+ }
68
+ throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidAssertion);
69
+ }
70
+ /**
71
+ * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
72
+ */
73
+ createJwt(cryptoProvider, issuer, jwtAudience) {
74
+ this.issuer = issuer;
75
+ this.jwtAudience = jwtAudience;
76
+ const issuedAt = msalCommon.TimeUtils.nowSeconds();
77
+ this.expirationTime = issuedAt + 600;
78
+ const header = {
79
+ alg: Constants.JwtConstants.RSA_256,
80
+ x5t: EncodingUtils.EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
81
+ };
82
+ if (this.publicCertificate) {
83
+ Object.assign(header, {
84
+ x5c: this.publicCertificate,
85
+ });
86
+ }
87
+ const payload = {
88
+ [Constants.JwtConstants.AUDIENCE]: this.jwtAudience,
89
+ [Constants.JwtConstants.EXPIRATION_TIME]: this.expirationTime,
90
+ [Constants.JwtConstants.ISSUER]: this.issuer,
91
+ [Constants.JwtConstants.SUBJECT]: this.issuer,
92
+ [Constants.JwtConstants.NOT_BEFORE]: issuedAt,
93
+ [Constants.JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
94
+ };
95
+ this.jwt = jwt.sign(payload, this.privateKey, { header });
96
+ return this.jwt;
97
+ }
98
+ /**
99
+ * Utility API to check expiration
100
+ */
101
+ isExpired() {
102
+ return this.expirationTime < msalCommon.TimeUtils.nowSeconds();
103
+ }
104
+ /**
105
+ * Extracts the raw certs from a given certificate string and returns them in an array.
106
+ * @param publicCertificate - electronic document provided to prove the ownership of the public key
107
+ */
108
+ static parseCertificate(publicCertificate) {
109
+ /**
110
+ * This is regex to identify the certs in a given certificate string.
111
+ * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
112
+ * The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
113
+ * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
114
+ * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
115
+ */
116
+ const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
117
+ const certs = [];
118
+ let matches;
119
+ while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
120
+ // matches[1] represents the first parens capture group in the regex.
121
+ certs.push(matches[1].replace(/\r*\n/g, msalCommon.Constants.EMPTY_STRING));
122
+ }
123
+ return certs;
124
+ }
125
125
  }
126
126
 
127
127
  exports.ClientAssertion = ClientAssertion;
@@ -1,47 +1,47 @@
1
- import { CryptoProvider } from "../crypto/CryptoProvider.js";
2
- /**
3
- * Client assertion of type jwt-bearer used in confidential client flows
4
- * @public
5
- */
6
- export declare class ClientAssertion {
7
- private jwt;
8
- private privateKey;
9
- private thumbprint;
10
- private expirationTime;
11
- private issuer;
12
- private jwtAudience;
13
- private publicCertificate;
14
- /**
15
- * Initialize the ClientAssertion class from the clientAssertion passed by the user
16
- * @param assertion - refer https://tools.ietf.org/html/rfc7521
17
- */
18
- static fromAssertion(assertion: string): ClientAssertion;
19
- /**
20
- * Initialize the ClientAssertion class from the certificate passed by the user
21
- * @param thumbprint - identifier of a certificate
22
- * @param privateKey - secret key
23
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
24
- */
25
- static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
26
- /**
27
- * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
28
- * @param cryptoProvider - library's crypto helper
29
- * @param issuer - iss claim
30
- * @param jwtAudience - aud claim
31
- */
32
- getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string;
33
- /**
34
- * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
35
- */
36
- private createJwt;
37
- /**
38
- * Utility API to check expiration
39
- */
40
- private isExpired;
41
- /**
42
- * Extracts the raw certs from a given certificate string and returns them in an array.
43
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
44
- */
45
- static parseCertificate(publicCertificate: string): Array<string>;
46
- }
1
+ import { CryptoProvider } from "../crypto/CryptoProvider.js";
2
+ /**
3
+ * Client assertion of type jwt-bearer used in confidential client flows
4
+ * @public
5
+ */
6
+ export declare class ClientAssertion {
7
+ private jwt;
8
+ private privateKey;
9
+ private thumbprint;
10
+ private expirationTime;
11
+ private issuer;
12
+ private jwtAudience;
13
+ private publicCertificate;
14
+ /**
15
+ * Initialize the ClientAssertion class from the clientAssertion passed by the user
16
+ * @param assertion - refer https://tools.ietf.org/html/rfc7521
17
+ */
18
+ static fromAssertion(assertion: string): ClientAssertion;
19
+ /**
20
+ * Initialize the ClientAssertion class from the certificate passed by the user
21
+ * @param thumbprint - identifier of a certificate
22
+ * @param privateKey - secret key
23
+ * @param publicCertificate - electronic document provided to prove the ownership of the public key
24
+ */
25
+ static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
26
+ /**
27
+ * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
28
+ * @param cryptoProvider - library's crypto helper
29
+ * @param issuer - iss claim
30
+ * @param jwtAudience - aud claim
31
+ */
32
+ getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string;
33
+ /**
34
+ * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
35
+ */
36
+ private createJwt;
37
+ /**
38
+ * Utility API to check expiration
39
+ */
40
+ private isExpired;
41
+ /**
42
+ * Extracts the raw certs from a given certificate string and returns them in an array.
43
+ * @param publicCertificate - electronic document provided to prove the ownership of the public key
44
+ */
45
+ static parseCertificate(publicCertificate: string): Array<string>;
46
+ }
47
47
  //# sourceMappingURL=ClientAssertion.d.ts.map
@@ -1,125 +1,125 @@
1
- /*! @azure/msal-node v2.7.0-alpha.0 2023-12-15 */
1
+ /*! @azure/msal-node v2.7.0 2024-04-11 */
2
2
  'use strict';
3
3
  import jwt from 'jsonwebtoken';
4
4
  import { createClientAuthError, ClientAuthErrorCodes, TimeUtils, Constants } from '@azure/msal-common';
5
5
  import { EncodingUtils } from '../utils/EncodingUtils.mjs';
6
6
  import { JwtConstants } from '../utils/Constants.mjs';
7
7
 
8
- /*
9
- * Copyright (c) Microsoft Corporation. All rights reserved.
10
- * Licensed under the MIT License.
11
- */
12
- /**
13
- * Client assertion of type jwt-bearer used in confidential client flows
14
- * @public
15
- */
16
- class ClientAssertion {
17
- /**
18
- * Initialize the ClientAssertion class from the clientAssertion passed by the user
19
- * @param assertion - refer https://tools.ietf.org/html/rfc7521
20
- */
21
- static fromAssertion(assertion) {
22
- const clientAssertion = new ClientAssertion();
23
- clientAssertion.jwt = assertion;
24
- return clientAssertion;
25
- }
26
- /**
27
- * Initialize the ClientAssertion class from the certificate passed by the user
28
- * @param thumbprint - identifier of a certificate
29
- * @param privateKey - secret key
30
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
31
- */
32
- static fromCertificate(thumbprint, privateKey, publicCertificate) {
33
- const clientAssertion = new ClientAssertion();
34
- clientAssertion.privateKey = privateKey;
35
- clientAssertion.thumbprint = thumbprint;
36
- if (publicCertificate) {
37
- clientAssertion.publicCertificate =
38
- this.parseCertificate(publicCertificate);
39
- }
40
- return clientAssertion;
41
- }
42
- /**
43
- * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
44
- * @param cryptoProvider - library's crypto helper
45
- * @param issuer - iss claim
46
- * @param jwtAudience - aud claim
47
- */
48
- getJwt(cryptoProvider, issuer, jwtAudience) {
49
- // if assertion was created from certificate, check if jwt is expired and create new one.
50
- if (this.privateKey && this.thumbprint) {
51
- if (this.jwt &&
52
- !this.isExpired() &&
53
- issuer === this.issuer &&
54
- jwtAudience === this.jwtAudience) {
55
- return this.jwt;
56
- }
57
- return this.createJwt(cryptoProvider, issuer, jwtAudience);
58
- }
59
- /*
60
- * if assertion was created by caller, then we just append it. It is up to the caller to
61
- * ensure that it contains necessary claims and that it is not expired.
62
- */
63
- if (this.jwt) {
64
- return this.jwt;
65
- }
66
- throw createClientAuthError(ClientAuthErrorCodes.invalidAssertion);
67
- }
68
- /**
69
- * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
70
- */
71
- createJwt(cryptoProvider, issuer, jwtAudience) {
72
- this.issuer = issuer;
73
- this.jwtAudience = jwtAudience;
74
- const issuedAt = TimeUtils.nowSeconds();
75
- this.expirationTime = issuedAt + 600;
76
- const header = {
77
- alg: JwtConstants.RSA_256,
78
- x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
79
- };
80
- if (this.publicCertificate) {
81
- Object.assign(header, {
82
- x5c: this.publicCertificate,
83
- });
84
- }
85
- const payload = {
86
- [JwtConstants.AUDIENCE]: this.jwtAudience,
87
- [JwtConstants.EXPIRATION_TIME]: this.expirationTime,
88
- [JwtConstants.ISSUER]: this.issuer,
89
- [JwtConstants.SUBJECT]: this.issuer,
90
- [JwtConstants.NOT_BEFORE]: issuedAt,
91
- [JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
92
- };
93
- this.jwt = jwt.sign(payload, this.privateKey, { header });
94
- return this.jwt;
95
- }
96
- /**
97
- * Utility API to check expiration
98
- */
99
- isExpired() {
100
- return this.expirationTime < TimeUtils.nowSeconds();
101
- }
102
- /**
103
- * Extracts the raw certs from a given certificate string and returns them in an array.
104
- * @param publicCertificate - electronic document provided to prove the ownership of the public key
105
- */
106
- static parseCertificate(publicCertificate) {
107
- /**
108
- * This is regex to identify the certs in a given certificate string.
109
- * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
110
- * The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
111
- * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
112
- * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
113
- */
114
- const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
115
- const certs = [];
116
- let matches;
117
- while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
118
- // matches[1] represents the first parens capture group in the regex.
119
- certs.push(matches[1].replace(/\r*\n/g, Constants.EMPTY_STRING));
120
- }
121
- return certs;
122
- }
8
+ /*
9
+ * Copyright (c) Microsoft Corporation. All rights reserved.
10
+ * Licensed under the MIT License.
11
+ */
12
+ /**
13
+ * Client assertion of type jwt-bearer used in confidential client flows
14
+ * @public
15
+ */
16
+ class ClientAssertion {
17
+ /**
18
+ * Initialize the ClientAssertion class from the clientAssertion passed by the user
19
+ * @param assertion - refer https://tools.ietf.org/html/rfc7521
20
+ */
21
+ static fromAssertion(assertion) {
22
+ const clientAssertion = new ClientAssertion();
23
+ clientAssertion.jwt = assertion;
24
+ return clientAssertion;
25
+ }
26
+ /**
27
+ * Initialize the ClientAssertion class from the certificate passed by the user
28
+ * @param thumbprint - identifier of a certificate
29
+ * @param privateKey - secret key
30
+ * @param publicCertificate - electronic document provided to prove the ownership of the public key
31
+ */
32
+ static fromCertificate(thumbprint, privateKey, publicCertificate) {
33
+ const clientAssertion = new ClientAssertion();
34
+ clientAssertion.privateKey = privateKey;
35
+ clientAssertion.thumbprint = thumbprint;
36
+ if (publicCertificate) {
37
+ clientAssertion.publicCertificate =
38
+ this.parseCertificate(publicCertificate);
39
+ }
40
+ return clientAssertion;
41
+ }
42
+ /**
43
+ * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
44
+ * @param cryptoProvider - library's crypto helper
45
+ * @param issuer - iss claim
46
+ * @param jwtAudience - aud claim
47
+ */
48
+ getJwt(cryptoProvider, issuer, jwtAudience) {
49
+ // if assertion was created from certificate, check if jwt is expired and create new one.
50
+ if (this.privateKey && this.thumbprint) {
51
+ if (this.jwt &&
52
+ !this.isExpired() &&
53
+ issuer === this.issuer &&
54
+ jwtAudience === this.jwtAudience) {
55
+ return this.jwt;
56
+ }
57
+ return this.createJwt(cryptoProvider, issuer, jwtAudience);
58
+ }
59
+ /*
60
+ * if assertion was created by caller, then we just append it. It is up to the caller to
61
+ * ensure that it contains necessary claims and that it is not expired.
62
+ */
63
+ if (this.jwt) {
64
+ return this.jwt;
65
+ }
66
+ throw createClientAuthError(ClientAuthErrorCodes.invalidAssertion);
67
+ }
68
+ /**
69
+ * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
70
+ */
71
+ createJwt(cryptoProvider, issuer, jwtAudience) {
72
+ this.issuer = issuer;
73
+ this.jwtAudience = jwtAudience;
74
+ const issuedAt = TimeUtils.nowSeconds();
75
+ this.expirationTime = issuedAt + 600;
76
+ const header = {
77
+ alg: JwtConstants.RSA_256,
78
+ x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
79
+ };
80
+ if (this.publicCertificate) {
81
+ Object.assign(header, {
82
+ x5c: this.publicCertificate,
83
+ });
84
+ }
85
+ const payload = {
86
+ [JwtConstants.AUDIENCE]: this.jwtAudience,
87
+ [JwtConstants.EXPIRATION_TIME]: this.expirationTime,
88
+ [JwtConstants.ISSUER]: this.issuer,
89
+ [JwtConstants.SUBJECT]: this.issuer,
90
+ [JwtConstants.NOT_BEFORE]: issuedAt,
91
+ [JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
92
+ };
93
+ this.jwt = jwt.sign(payload, this.privateKey, { header });
94
+ return this.jwt;
95
+ }
96
+ /**
97
+ * Utility API to check expiration
98
+ */
99
+ isExpired() {
100
+ return this.expirationTime < TimeUtils.nowSeconds();
101
+ }
102
+ /**
103
+ * Extracts the raw certs from a given certificate string and returns them in an array.
104
+ * @param publicCertificate - electronic document provided to prove the ownership of the public key
105
+ */
106
+ static parseCertificate(publicCertificate) {
107
+ /**
108
+ * This is regex to identify the certs in a given certificate string.
109
+ * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
110
+ * The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
111
+ * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
112
+ * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
113
+ */
114
+ const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
115
+ const certs = [];
116
+ let matches;
117
+ while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
118
+ // matches[1] represents the first parens capture group in the regex.
119
+ certs.push(matches[1].replace(/\r*\n/g, Constants.EMPTY_STRING));
120
+ }
121
+ return certs;
122
+ }
123
123
  }
124
124
 
125
125
  export { ClientAssertion };