@credo-ts/openid4vc 0.6.1-pr-2091-20241119140918 → 0.6.2-alpha-20251210145840

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 (409) hide show
  1. package/build/OpenId4VcApi.d.mts +24 -0
  2. package/build/OpenId4VcApi.d.mts.map +1 -0
  3. package/build/OpenId4VcApi.mjs +35 -0
  4. package/build/OpenId4VcApi.mjs.map +1 -0
  5. package/build/OpenId4VcModule.d.mts +30 -0
  6. package/build/OpenId4VcModule.d.mts.map +1 -0
  7. package/build/OpenId4VcModule.mjs +42 -0
  8. package/build/OpenId4VcModule.mjs.map +1 -0
  9. package/build/OpenId4VcModuleConfig.d.mts +44 -0
  10. package/build/OpenId4VcModuleConfig.d.mts.map +1 -0
  11. package/build/OpenId4VcModuleConfig.mjs +24 -0
  12. package/build/OpenId4VcModuleConfig.mjs.map +1 -0
  13. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs +10 -0
  14. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs +7 -0
  15. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs +9 -0
  16. package/build/index.d.mts +42 -0
  17. package/build/index.mjs +37 -0
  18. package/build/openid4vc-holder/OpenId4VcHolderApi.d.mts +238 -0
  19. package/build/openid4vc-holder/OpenId4VcHolderApi.d.mts.map +1 -0
  20. package/build/openid4vc-holder/OpenId4VcHolderApi.mjs +174 -0
  21. package/build/openid4vc-holder/OpenId4VcHolderApi.mjs.map +1 -0
  22. package/build/openid4vc-holder/OpenId4VcHolderModule.d.mts +17 -0
  23. package/build/openid4vc-holder/OpenId4VcHolderModule.d.mts.map +1 -0
  24. package/build/openid4vc-holder/OpenId4VcHolderModule.mjs +23 -0
  25. package/build/openid4vc-holder/OpenId4VcHolderModule.mjs.map +1 -0
  26. package/build/openid4vc-holder/OpenId4VciHolderService.d.mts +69 -0
  27. package/build/openid4vc-holder/OpenId4VciHolderService.d.mts.map +1 -0
  28. package/build/openid4vc-holder/OpenId4VciHolderService.mjs +751 -0
  29. package/build/openid4vc-holder/OpenId4VciHolderService.mjs.map +1 -0
  30. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.mts +398 -0
  31. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.mts.map +1 -0
  32. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.mjs +16 -0
  33. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.mjs.map +1 -0
  34. package/build/openid4vc-holder/OpenId4vpHolderService.d.mts +130 -0
  35. package/build/openid4vc-holder/OpenId4vpHolderService.d.mts.map +1 -0
  36. package/build/openid4vc-holder/OpenId4vpHolderService.mjs +278 -0
  37. package/build/openid4vc-holder/OpenId4vpHolderService.mjs.map +1 -0
  38. package/build/openid4vc-holder/OpenId4vpHolderServiceOptions.d.mts +112 -0
  39. package/build/openid4vc-holder/OpenId4vpHolderServiceOptions.d.mts.map +1 -0
  40. package/build/openid4vc-holder/index.d.mts +6 -0
  41. package/build/openid4vc-holder/index.mjs +5 -0
  42. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.mts +16 -0
  43. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.mts.map +1 -0
  44. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.mjs +18 -0
  45. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.mjs.map +1 -0
  46. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.mts +137 -0
  47. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.mts.map +1 -0
  48. package/build/openid4vc-issuer/OpenId4VcIssuerApi.mjs +108 -0
  49. package/build/openid4vc-issuer/OpenId4VcIssuerApi.mjs.map +1 -0
  50. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.mts +19 -0
  51. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.mts.map +1 -0
  52. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.mjs +9 -0
  53. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.mjs.map +1 -0
  54. package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.mts +27 -0
  55. package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.mts.map +1 -0
  56. package/build/openid4vc-issuer/OpenId4VcIssuerModule.mjs +150 -0
  57. package/build/openid4vc-issuer/OpenId4VcIssuerModule.mjs.map +1 -0
  58. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.mts +279 -0
  59. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.mts.map +1 -0
  60. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.mjs +179 -0
  61. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.mjs.map +1 -0
  62. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.mts +182 -0
  63. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.mts.map +1 -0
  64. package/build/openid4vc-issuer/OpenId4VcIssuerService.mjs +881 -0
  65. package/build/openid4vc-issuer/OpenId4VcIssuerService.mjs.map +1 -0
  66. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.mts +340 -0
  67. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.mts.map +1 -0
  68. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.mjs +1 -0
  69. package/build/openid4vc-issuer/index.d.mts +11 -0
  70. package/build/openid4vc-issuer/index.mjs +11 -0
  71. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.mts +300 -0
  72. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.mts.map +1 -0
  73. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.mjs +102 -0
  74. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.mjs.map +1 -0
  75. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.mts +10 -0
  76. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.mts.map +1 -0
  77. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.mjs +22 -0
  78. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.mjs.map +1 -0
  79. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.mts +84 -0
  80. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.mts.map +1 -0
  81. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.mjs +89 -0
  82. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.mjs.map +1 -0
  83. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.mts +12 -0
  84. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.mts.map +1 -0
  85. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs +28 -0
  86. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs.map +1 -0
  87. package/build/openid4vc-issuer/repository/index.d.mts +4 -0
  88. package/build/openid4vc-issuer/repository/index.mjs +4 -0
  89. package/build/openid4vc-issuer/router/accessTokenEndpoint.mjs +199 -0
  90. package/build/openid4vc-issuer/router/accessTokenEndpoint.mjs.map +1 -0
  91. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.mjs +241 -0
  92. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.mjs.map +1 -0
  93. package/build/openid4vc-issuer/router/authorizationEndpoint.mjs +51 -0
  94. package/build/openid4vc-issuer/router/authorizationEndpoint.mjs.map +1 -0
  95. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.mjs +25 -0
  96. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.mjs.map +1 -0
  97. package/build/openid4vc-issuer/router/credentialEndpoint.mjs +142 -0
  98. package/build/openid4vc-issuer/router/credentialEndpoint.mjs.map +1 -0
  99. package/build/openid4vc-issuer/router/credentialOfferEndpoint.mjs +38 -0
  100. package/build/openid4vc-issuer/router/credentialOfferEndpoint.mjs.map +1 -0
  101. package/build/openid4vc-issuer/router/deferredCredentialEndpoint.mjs +84 -0
  102. package/build/openid4vc-issuer/router/deferredCredentialEndpoint.mjs.map +1 -0
  103. package/build/openid4vc-issuer/router/index.mjs +12 -0
  104. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.mjs +43 -0
  105. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.mjs.map +1 -0
  106. package/build/openid4vc-issuer/router/jwksEndpoint.mjs +18 -0
  107. package/build/openid4vc-issuer/router/jwksEndpoint.mjs.map +1 -0
  108. package/build/openid4vc-issuer/router/nonceEndpoint.mjs +29 -0
  109. package/build/openid4vc-issuer/router/nonceEndpoint.mjs.map +1 -0
  110. package/build/openid4vc-issuer/router/pushedAuthorizationRequestEndpoint.mjs +164 -0
  111. package/build/openid4vc-issuer/router/pushedAuthorizationRequestEndpoint.mjs.map +1 -0
  112. package/build/openid4vc-issuer/router/redirectEndpoint.mjs +124 -0
  113. package/build/openid4vc-issuer/router/redirectEndpoint.mjs.map +1 -0
  114. package/build/openid4vc-issuer/util/txCode.mjs +18 -0
  115. package/build/openid4vc-issuer/util/txCode.mjs.map +1 -0
  116. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.mts +10 -0
  117. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.mts.map +1 -0
  118. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.mjs +12 -0
  119. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.mjs.map +1 -0
  120. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.mts +60 -0
  121. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.mts.map +1 -0
  122. package/build/openid4vc-verifier/OpenId4VcVerifierApi.mjs +83 -0
  123. package/build/openid4vc-verifier/OpenId4VcVerifierApi.mjs.map +1 -0
  124. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.mts +19 -0
  125. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.mts.map +1 -0
  126. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.mjs +9 -0
  127. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.mjs.map +1 -0
  128. package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.mts +25 -0
  129. package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.mts.map +1 -0
  130. package/build/openid4vc-verifier/OpenId4VcVerifierModule.mjs +91 -0
  131. package/build/openid4vc-verifier/OpenId4VcVerifierModule.mjs.map +1 -0
  132. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.mts +55 -0
  133. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.mts.map +1 -0
  134. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.mjs +36 -0
  135. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.mjs.map +1 -0
  136. package/build/openid4vc-verifier/OpenId4VpVerifierService.d.mts +60 -0
  137. package/build/openid4vc-verifier/OpenId4VpVerifierService.d.mts.map +1 -0
  138. package/build/openid4vc-verifier/OpenId4VpVerifierService.mjs +714 -0
  139. package/build/openid4vc-verifier/OpenId4VpVerifierService.mjs.map +1 -0
  140. package/build/openid4vc-verifier/OpenId4VpVerifierServiceOptions.d.mts +194 -0
  141. package/build/openid4vc-verifier/OpenId4VpVerifierServiceOptions.d.mts.map +1 -0
  142. package/build/openid4vc-verifier/index.d.mts +12 -0
  143. package/build/openid4vc-verifier/index.mjs +11 -0
  144. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.mts +129 -0
  145. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.mts.map +1 -0
  146. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.mjs +64 -0
  147. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.mjs.map +1 -0
  148. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.mts +10 -0
  149. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.mts.map +1 -0
  150. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.mjs +22 -0
  151. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.mjs.map +1 -0
  152. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.mts +33 -0
  153. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.mts.map +1 -0
  154. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.mjs +32 -0
  155. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.mjs.map +1 -0
  156. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.mts +12 -0
  157. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.mts.map +1 -0
  158. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.mjs +28 -0
  159. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.mjs.map +1 -0
  160. package/build/openid4vc-verifier/repository/index.d.mts +4 -0
  161. package/build/openid4vc-verifier/repository/index.mjs +4 -0
  162. package/build/openid4vc-verifier/router/authorizationEndpoint.mjs +117 -0
  163. package/build/openid4vc-verifier/router/authorizationEndpoint.mjs.map +1 -0
  164. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.mjs +39 -0
  165. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.mjs.map +1 -0
  166. package/build/openid4vc-verifier/router/index.mjs +1 -0
  167. package/build/shared/callbacks.d.mts +47 -0
  168. package/build/shared/callbacks.d.mts.map +1 -0
  169. package/build/shared/callbacks.mjs +279 -0
  170. package/build/shared/callbacks.mjs.map +1 -0
  171. package/build/shared/index.d.mts +7 -0
  172. package/build/shared/index.mjs +4 -0
  173. package/build/shared/issuerMetadataUtils.d.mts +22 -0
  174. package/build/shared/issuerMetadataUtils.d.mts.map +1 -0
  175. package/build/shared/issuerMetadataUtils.mjs +30 -0
  176. package/build/shared/issuerMetadataUtils.mjs.map +1 -0
  177. package/build/shared/models/CredentialHolderBinding.d.mts +71 -0
  178. package/build/shared/models/CredentialHolderBinding.d.mts.map +1 -0
  179. package/build/shared/models/CredentialHolderBinding.mjs +1 -0
  180. package/build/shared/models/OpenId4VcJwtIssuer.d.mts +46 -0
  181. package/build/shared/models/OpenId4VcJwtIssuer.d.mts.map +1 -0
  182. package/build/shared/models/OpenId4VcJwtIssuer.mjs +1 -0
  183. package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.mts +71 -0
  184. package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.mts.map +1 -0
  185. package/build/shared/models/OpenId4VciCredentialFormatProfile.d.mts +12 -0
  186. package/build/shared/models/OpenId4VciCredentialFormatProfile.d.mts.map +1 -0
  187. package/build/shared/models/OpenId4VciCredentialFormatProfile.mjs +14 -0
  188. package/build/shared/models/OpenId4VciCredentialFormatProfile.mjs.map +1 -0
  189. package/build/shared/models/index.d.mts +30 -0
  190. package/build/shared/models/index.d.mts.map +1 -0
  191. package/build/shared/models/index.mjs +6 -0
  192. package/build/shared/router/context.mjs +52 -0
  193. package/build/shared/router/context.mjs.map +1 -0
  194. package/build/shared/router/express.browser.d.mts +5 -0
  195. package/build/shared/router/express.browser.d.mts.map +1 -0
  196. package/build/shared/router/express.browser.mjs +8 -0
  197. package/build/shared/router/express.browser.mjs.map +1 -0
  198. package/build/shared/router/express.mjs +10 -0
  199. package/build/shared/router/express.mjs.map +1 -0
  200. package/build/shared/router/express.native.d.mts +5 -0
  201. package/build/shared/router/express.native.d.mts.map +1 -0
  202. package/build/shared/router/express.native.mjs +8 -0
  203. package/build/shared/router/express.native.mjs.map +1 -0
  204. package/build/shared/router/index.mjs +3 -0
  205. package/build/shared/router/tenants.mjs +36 -0
  206. package/build/shared/router/tenants.mjs.map +1 -0
  207. package/build/shared/transactionData.mjs +19 -0
  208. package/build/shared/transactionData.mjs.map +1 -0
  209. package/build/shared/utils.mjs +90 -0
  210. package/build/shared/utils.mjs.map +1 -0
  211. package/package.json +30 -23
  212. package/build/index.d.ts +0 -4
  213. package/build/index.js +0 -21
  214. package/build/index.js.map +0 -1
  215. package/build/openid4vc-holder/OpenId4VcHolderApi.d.ts +0 -124
  216. package/build/openid4vc-holder/OpenId4VcHolderApi.js +0 -155
  217. package/build/openid4vc-holder/OpenId4VcHolderApi.js.map +0 -1
  218. package/build/openid4vc-holder/OpenId4VcHolderModule.d.ts +0 -13
  219. package/build/openid4vc-holder/OpenId4VcHolderModule.js +0 -35
  220. package/build/openid4vc-holder/OpenId4VcHolderModule.js.map +0 -1
  221. package/build/openid4vc-holder/OpenId4VciHolderService.d.ts +0 -72
  222. package/build/openid4vc-holder/OpenId4VciHolderService.js +0 -569
  223. package/build/openid4vc-holder/OpenId4VciHolderService.js.map +0 -1
  224. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.ts +0 -238
  225. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js +0 -14
  226. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js.map +0 -1
  227. package/build/openid4vc-holder/OpenId4vcSiopHolderService.d.ts +0 -32
  228. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js +0 -302
  229. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js.map +0 -1
  230. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.d.ts +0 -38
  231. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.js +0 -3
  232. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.js.map +0 -1
  233. package/build/openid4vc-holder/index.d.ts +0 -6
  234. package/build/openid4vc-holder/index.js +0 -23
  235. package/build/openid4vc-holder/index.js.map +0 -1
  236. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.ts +0 -12
  237. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.js +0 -19
  238. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.js.map +0 -1
  239. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.ts +0 -101
  240. package/build/openid4vc-issuer/OpenId4VcIssuerApi.js +0 -110
  241. package/build/openid4vc-issuer/OpenId4VcIssuerApi.js.map +0 -1
  242. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.ts +0 -13
  243. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.js +0 -8
  244. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.js.map +0 -1
  245. package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.ts +0 -21
  246. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js +0 -121
  247. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js.map +0 -1
  248. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.ts +0 -190
  249. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js +0 -141
  250. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js.map +0 -1
  251. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.ts +0 -116
  252. package/build/openid4vc-issuer/OpenId4VcIssuerService.js +0 -698
  253. package/build/openid4vc-issuer/OpenId4VcIssuerService.js.map +0 -1
  254. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.ts +0 -229
  255. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.js +0 -3
  256. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.js.map +0 -1
  257. package/build/openid4vc-issuer/index.d.ts +0 -8
  258. package/build/openid4vc-issuer/index.js +0 -27
  259. package/build/openid4vc-issuer/index.js.map +0 -1
  260. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.ts +0 -160
  261. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js +0 -88
  262. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js.map +0 -1
  263. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.ts +0 -5
  264. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.js +0 -29
  265. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.js.map +0 -1
  266. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.ts +0 -56
  267. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js +0 -83
  268. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js.map +0 -1
  269. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.ts +0 -8
  270. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.js +0 -35
  271. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.js.map +0 -1
  272. package/build/openid4vc-issuer/repository/index.d.ts +0 -4
  273. package/build/openid4vc-issuer/repository/index.js +0 -21
  274. package/build/openid4vc-issuer/repository/index.js.map +0 -1
  275. package/build/openid4vc-issuer/router/accessTokenEndpoint.d.ts +0 -5
  276. package/build/openid4vc-issuer/router/accessTokenEndpoint.js +0 -164
  277. package/build/openid4vc-issuer/router/accessTokenEndpoint.js.map +0 -1
  278. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.d.ts +0 -3
  279. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js +0 -213
  280. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js.map +0 -1
  281. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.d.ts +0 -6
  282. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js +0 -25
  283. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js.map +0 -1
  284. package/build/openid4vc-issuer/router/credentialEndpoint.d.ts +0 -3
  285. package/build/openid4vc-issuer/router/credentialEndpoint.js +0 -176
  286. package/build/openid4vc-issuer/router/credentialEndpoint.js.map +0 -1
  287. package/build/openid4vc-issuer/router/credentialOfferEndpoint.d.ts +0 -3
  288. package/build/openid4vc-issuer/router/credentialOfferEndpoint.js +0 -45
  289. package/build/openid4vc-issuer/router/credentialOfferEndpoint.js.map +0 -1
  290. package/build/openid4vc-issuer/router/index.d.ts +0 -9
  291. package/build/openid4vc-issuer/router/index.js +0 -20
  292. package/build/openid4vc-issuer/router/index.js.map +0 -1
  293. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.d.ts +0 -2
  294. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js +0 -26
  295. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js.map +0 -1
  296. package/build/openid4vc-issuer/router/jwksEndpoint.d.ts +0 -3
  297. package/build/openid4vc-issuer/router/jwksEndpoint.js +0 -20
  298. package/build/openid4vc-issuer/router/jwksEndpoint.js.map +0 -1
  299. package/build/openid4vc-issuer/router/nonceEndpoint.d.ts +0 -3
  300. package/build/openid4vc-issuer/router/nonceEndpoint.js +0 -26
  301. package/build/openid4vc-issuer/router/nonceEndpoint.js.map +0 -1
  302. package/build/openid4vc-issuer/router/requestContext.d.ts +0 -5
  303. package/build/openid4vc-issuer/router/requestContext.js +0 -3
  304. package/build/openid4vc-issuer/router/requestContext.js.map +0 -1
  305. package/build/openid4vc-issuer/util/txCode.d.ts +0 -3
  306. package/build/openid4vc-issuer/util/txCode.js +0 -18
  307. package/build/openid4vc-issuer/util/txCode.js.map +0 -1
  308. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.d.ts +0 -55
  309. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js +0 -498
  310. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js.map +0 -1
  311. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.d.ts +0 -77
  312. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.js +0 -3
  313. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.js.map +0 -1
  314. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.ts +0 -6
  315. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.js +0 -11
  316. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.js.map +0 -1
  317. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.ts +0 -61
  318. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js +0 -108
  319. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js.map +0 -1
  320. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.ts +0 -13
  321. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.js +0 -8
  322. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.js.map +0 -1
  323. package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.ts +0 -21
  324. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js +0 -109
  325. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js.map +0 -1
  326. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.ts +0 -31
  327. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js +0 -28
  328. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js.map +0 -1
  329. package/build/openid4vc-verifier/index.d.ts +0 -8
  330. package/build/openid4vc-verifier/index.js +0 -25
  331. package/build/openid4vc-verifier/index.js.map +0 -1
  332. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.d.ts +0 -49
  333. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js +0 -234
  334. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js.map +0 -1
  335. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.d.ts +0 -19
  336. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js +0 -146
  337. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js.map +0 -1
  338. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.ts +0 -71
  339. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js +0 -46
  340. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js.map +0 -1
  341. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.ts +0 -5
  342. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.js +0 -29
  343. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.js.map +0 -1
  344. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.ts +0 -29
  345. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js +0 -29
  346. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js.map +0 -1
  347. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.ts +0 -8
  348. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.js +0 -35
  349. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.js.map +0 -1
  350. package/build/openid4vc-verifier/repository/index.d.ts +0 -4
  351. package/build/openid4vc-verifier/repository/index.js +0 -21
  352. package/build/openid4vc-verifier/repository/index.js.map +0 -1
  353. package/build/openid4vc-verifier/router/authorizationEndpoint.d.ts +0 -11
  354. package/build/openid4vc-verifier/router/authorizationEndpoint.js +0 -102
  355. package/build/openid4vc-verifier/router/authorizationEndpoint.js.map +0 -1
  356. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.d.ts +0 -11
  357. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js +0 -63
  358. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js.map +0 -1
  359. package/build/openid4vc-verifier/router/index.d.ts +0 -2
  360. package/build/openid4vc-verifier/router/index.js +0 -6
  361. package/build/openid4vc-verifier/router/index.js.map +0 -1
  362. package/build/openid4vc-verifier/router/requestContext.d.ts +0 -5
  363. package/build/openid4vc-verifier/router/requestContext.js +0 -3
  364. package/build/openid4vc-verifier/router/requestContext.js.map +0 -1
  365. package/build/shared/callbacks.d.ts +0 -18
  366. package/build/shared/callbacks.js +0 -81
  367. package/build/shared/callbacks.js.map +0 -1
  368. package/build/shared/index.d.ts +0 -2
  369. package/build/shared/index.js +0 -19
  370. package/build/shared/index.js.map +0 -1
  371. package/build/shared/issuerMetadataUtils.d.ts +0 -158
  372. package/build/shared/issuerMetadataUtils.js +0 -38
  373. package/build/shared/issuerMetadataUtils.js.map +0 -1
  374. package/build/shared/models/CredentialHolderBinding.d.ts +0 -13
  375. package/build/shared/models/CredentialHolderBinding.js +0 -3
  376. package/build/shared/models/CredentialHolderBinding.js.map +0 -1
  377. package/build/shared/models/OpenId4VcJwtIssuer.d.ts +0 -28
  378. package/build/shared/models/OpenId4VcJwtIssuer.js +0 -3
  379. package/build/shared/models/OpenId4VcJwtIssuer.js.map +0 -1
  380. package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.ts +0 -10
  381. package/build/shared/models/OpenId4VciAuthorizationServerConfig.js +0 -3
  382. package/build/shared/models/OpenId4VciAuthorizationServerConfig.js.map +0 -1
  383. package/build/shared/models/OpenId4VciCredentialFormatProfile.d.ts +0 -7
  384. package/build/shared/models/OpenId4VciCredentialFormatProfile.js +0 -12
  385. package/build/shared/models/OpenId4VciCredentialFormatProfile.js.map +0 -1
  386. package/build/shared/models/index.d.ts +0 -24
  387. package/build/shared/models/index.js +0 -25
  388. package/build/shared/models/index.js.map +0 -1
  389. package/build/shared/router/context.d.ts +0 -17
  390. package/build/shared/router/context.js +0 -76
  391. package/build/shared/router/context.js.map +0 -1
  392. package/build/shared/router/express.d.ts +0 -2
  393. package/build/shared/router/express.js +0 -15
  394. package/build/shared/router/express.js.map +0 -1
  395. package/build/shared/router/express.native.d.ts +0 -1
  396. package/build/shared/router/express.native.js +0 -7
  397. package/build/shared/router/express.native.js.map +0 -1
  398. package/build/shared/router/index.d.ts +0 -3
  399. package/build/shared/router/index.js +0 -20
  400. package/build/shared/router/index.js.map +0 -1
  401. package/build/shared/router/tenants.d.ts +0 -13
  402. package/build/shared/router/tenants.js +0 -49
  403. package/build/shared/router/tenants.js.map +0 -1
  404. package/build/shared/transform.d.ts +0 -5
  405. package/build/shared/transform.js +0 -73
  406. package/build/shared/transform.js.map +0 -1
  407. package/build/shared/utils.d.ts +0 -22
  408. package/build/shared/utils.js +0 -154
  409. package/build/shared/utils.js.map +0 -1
@@ -1,569 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.OpenId4VciHolderService = void 0;
16
- const oauth2_1 = require("@animo-id/oauth2");
17
- const oid4vci_1 = require("@animo-id/oid4vci");
18
- const core_1 = require("@credo-ts/core");
19
- const shared_1 = require("../shared");
20
- const callbacks_1 = require("../shared/callbacks");
21
- const issuerMetadataUtils_1 = require("../shared/issuerMetadataUtils");
22
- const utils_1 = require("../shared/utils");
23
- const OpenId4VciHolderServiceOptions_1 = require("./OpenId4VciHolderServiceOptions");
24
- let OpenId4VciHolderService = class OpenId4VciHolderService {
25
- constructor(logger, w3cCredentialService, jwsService) {
26
- this.w3cCredentialService = w3cCredentialService;
27
- this.jwsService = jwsService;
28
- this.logger = logger;
29
- }
30
- async resolveIssuerMetadata(agentContext, credentialIssuer) {
31
- const client = this.getClient(agentContext);
32
- const metadata = await client.resolveIssuerMetadata(credentialIssuer);
33
- this.logger.debug('fetched credential issuer metadata', { metadata });
34
- return metadata;
35
- }
36
- async resolveCredentialOffer(agentContext, credentialOffer) {
37
- const client = this.getClient(agentContext);
38
- const credentialOfferObject = await client.resolveCredentialOffer(credentialOffer);
39
- const metadata = await client.resolveIssuerMetadata(credentialOfferObject.credential_issuer);
40
- this.logger.debug('fetched credential offer and issuer metadata', { metadata, credentialOfferObject });
41
- const credentialConfigurationsSupported = (0, issuerMetadataUtils_1.getOfferedCredentials)(credentialOfferObject.credential_configuration_ids, client.getKnownCredentialConfigurationsSupported(metadata.credentialIssuer));
42
- return {
43
- metadata,
44
- offeredCredentialConfigurations: credentialConfigurationsSupported,
45
- credentialOfferPayload: credentialOfferObject,
46
- };
47
- }
48
- async resolveAuthorizationRequest(agentContext, resolvedCredentialOffer, authCodeFlowOptions) {
49
- var _a, _b;
50
- const { clientId, redirectUri } = authCodeFlowOptions;
51
- const { metadata, credentialOfferPayload, offeredCredentialConfigurations } = resolvedCredentialOffer;
52
- const client = this.getClient(agentContext);
53
- // If scope is not provided, we request scope for all offered credentials
54
- const scope = (_a = authCodeFlowOptions.scope) !== null && _a !== void 0 ? _a : (0, issuerMetadataUtils_1.getScopesFromCredentialConfigurationsSupported)(offeredCredentialConfigurations);
55
- const authorizationResult = await client.initiateAuthorization({
56
- clientId,
57
- issuerMetadata: metadata,
58
- credentialOffer: credentialOfferPayload,
59
- scope: scope.join(' '),
60
- redirectUri,
61
- });
62
- if (authorizationResult.authorizationFlow === oid4vci_1.AuthorizationFlow.PresentationDuringIssuance) {
63
- return {
64
- authorizationFlow: oid4vci_1.AuthorizationFlow.PresentationDuringIssuance,
65
- oid4vpRequestUrl: authorizationResult.oid4vpRequestUrl,
66
- authSession: authorizationResult.authSession,
67
- };
68
- }
69
- // Normal Oauth2Redirect flow
70
- return {
71
- authorizationFlow: oid4vci_1.AuthorizationFlow.Oauth2Redirect,
72
- codeVerifier: (_b = authorizationResult.pkce) === null || _b === void 0 ? void 0 : _b.codeVerifier,
73
- authorizationRequestUrl: authorizationResult.authorizationRequestUrl,
74
- };
75
- }
76
- async sendNotification(agentContext, options) {
77
- const client = this.getClient(agentContext);
78
- await client.sendNotification({
79
- accessToken: options.accessToken,
80
- dpop: options.dpop
81
- ? await this.getDpopOptions(agentContext, Object.assign(Object.assign({}, options.dpop), { dpopSigningAlgValuesSupported: [options.dpop.alg] }))
82
- : undefined,
83
- issuerMetadata: options.metadata,
84
- notification: {
85
- event: options.notificationEvent,
86
- notificationId: options.notificationId,
87
- },
88
- });
89
- }
90
- async getDpopOptions(agentContext, { jwk, dpopSigningAlgValuesSupported, nonce, }) {
91
- if (jwk) {
92
- const alg = dpopSigningAlgValuesSupported.find((alg) => jwk.supportedSignatureAlgorithms.includes(alg));
93
- if (!alg) {
94
- throw new core_1.CredoError(`No supported dpop signature algorithms found in dpop_signing_alg_values_supported '${dpopSigningAlgValuesSupported.join(', ')}' matching key type ${jwk.keyType}`);
95
- }
96
- return {
97
- signer: {
98
- method: 'jwk',
99
- alg,
100
- publicJwk: jwk.toJson(),
101
- },
102
- nonce,
103
- };
104
- }
105
- const alg = dpopSigningAlgValuesSupported.find((alg) => (0, core_1.getJwkClassFromJwaSignatureAlgorithm)(alg));
106
- const JwkClass = alg ? (0, core_1.getJwkClassFromJwaSignatureAlgorithm)(alg) : undefined;
107
- if (!alg || !JwkClass) {
108
- throw new core_1.CredoError(`No supported dpop signature algorithms found in dpop_signing_alg_values_supported '${dpopSigningAlgValuesSupported.join(', ')}'`);
109
- }
110
- const key = await agentContext.wallet.createKey({ keyType: JwkClass.keyType });
111
- return {
112
- signer: {
113
- method: 'jwk',
114
- alg,
115
- publicJwk: (0, core_1.getJwkFromKey)(key).toJson(),
116
- },
117
- nonce,
118
- };
119
- }
120
- async retrieveAuthorizationCodeUsingPresentation(agentContext, options) {
121
- const client = this.getClient(agentContext);
122
- // TODO: support dpop on this endpoint as well
123
- // const dpop = options.dpop
124
- // ? await this.getDpopOptions(agentContext, {
125
- // ...options.dpop,
126
- // dpopSigningAlgValuesSupported: [options.dpop.alg],
127
- // })
128
- // : undefined
129
- // TODO: we should support DPoP in this request as well
130
- const { authorizationChallengeResponse } = await client.retrieveAuthorizationCodeUsingPresentation({
131
- authSession: options.authSession,
132
- presentationDuringIssuanceSession: options.presentationDuringIssuanceSession,
133
- credentialOffer: options.resolvedCredentialOffer.credentialOfferPayload,
134
- issuerMetadata: options.resolvedCredentialOffer.metadata,
135
- // dpop
136
- });
137
- return {
138
- authorizationCode: authorizationChallengeResponse.authorization_code,
139
- };
140
- }
141
- async requestAccessToken(agentContext, options) {
142
- var _a, _b, _c, _d;
143
- const { metadata, credentialOfferPayload } = options.resolvedCredentialOffer;
144
- const client = this.getClient(agentContext);
145
- const oauth2Client = this.getOauth2Client(agentContext);
146
- const authorizationServer = options.code
147
- ? (_b = (_a = credentialOfferPayload.grants) === null || _a === void 0 ? void 0 : _a.authorization_code) === null || _b === void 0 ? void 0 : _b.authorization_server
148
- : (_d = (_c = credentialOfferPayload.grants) === null || _c === void 0 ? void 0 : _c[oauth2_1.preAuthorizedCodeGrantIdentifier]) === null || _d === void 0 ? void 0 : _d.authorization_server;
149
- const authorizationServerMetadata = (0, oauth2_1.getAuthorizationServerMetadataFromList)(metadata.authorizationServers, authorizationServer !== null && authorizationServer !== void 0 ? authorizationServer : metadata.authorizationServers[0].issuer);
150
- // TODO: should allow dpop input parameter for if it was already bound earlier
151
- const isDpopSupported = oauth2Client.isDpopSupported({
152
- authorizationServerMetadata,
153
- });
154
- const dpop = isDpopSupported.supported
155
- ? await this.getDpopOptions(agentContext, {
156
- dpopSigningAlgValuesSupported: isDpopSupported.dpopSigningAlgValuesSupported,
157
- })
158
- : undefined;
159
- const result = options.code
160
- ? await client.retrieveAuthorizationCodeAccessTokenFromOffer({
161
- issuerMetadata: metadata,
162
- credentialOffer: credentialOfferPayload,
163
- authorizationCode: options.code,
164
- dpop,
165
- pkceCodeVerifier: options.codeVerifier,
166
- redirectUri: options.redirectUri,
167
- additionalRequestPayload: {
168
- // TODO: handle it as part of client auth once we support
169
- // assertion based client authentication
170
- client_id: options.clientId,
171
- },
172
- })
173
- : await client.retrievePreAuthorizedCodeAccessTokenFromOffer({
174
- credentialOffer: credentialOfferPayload,
175
- issuerMetadata: metadata,
176
- dpop,
177
- txCode: options.txCode,
178
- });
179
- return Object.assign(Object.assign({}, result), { dpop: dpop
180
- ? Object.assign(Object.assign({}, result.dpop), { alg: dpop.signer.alg, jwk: (0, core_1.getJwkFromJson)(dpop.signer.publicJwk) }) : undefined });
181
- }
182
- async acceptCredentialOffer(agentContext, options) {
183
- var _a, _b, _c, _d;
184
- const { resolvedCredentialOffer, acceptCredentialOfferOptions } = options;
185
- const { metadata, offeredCredentialConfigurations } = resolvedCredentialOffer;
186
- const { credentialConfigurationIds, credentialBindingResolver, verifyCredentialStatus, requestBatch } = acceptCredentialOfferOptions;
187
- const client = this.getClient(agentContext);
188
- if ((credentialConfigurationIds === null || credentialConfigurationIds === void 0 ? void 0 : credentialConfigurationIds.length) === 0) {
189
- throw new core_1.CredoError(`'credentialConfigurationIds' may not be empty`);
190
- }
191
- const supportedJwaSignatureAlgorithms = (0, utils_1.getSupportedJwaSignatureAlgorithms)(agentContext);
192
- const allowedProofOfPossessionSigAlgs = acceptCredentialOfferOptions.allowedProofOfPossessionSignatureAlgorithms;
193
- const possibleProofOfPossessionSigAlgs = allowedProofOfPossessionSigAlgs
194
- ? allowedProofOfPossessionSigAlgs.filter((algorithm) => supportedJwaSignatureAlgorithms.includes(algorithm))
195
- : supportedJwaSignatureAlgorithms;
196
- if (possibleProofOfPossessionSigAlgs.length === 0) {
197
- throw new core_1.CredoError([
198
- `No possible proof of possession signature algorithm found.`,
199
- `Signature algorithms supported by the Agent '${supportedJwaSignatureAlgorithms.join(', ')}'`,
200
- `Allowed Signature algorithms '${allowedProofOfPossessionSigAlgs === null || allowedProofOfPossessionSigAlgs === void 0 ? void 0 : allowedProofOfPossessionSigAlgs.join(', ')}'`,
201
- ].join('\n'));
202
- }
203
- const receivedCredentials = [];
204
- let cNonce = options.cNonce;
205
- let dpopNonce = (_a = options.dpop) === null || _a === void 0 ? void 0 : _a.nonce;
206
- const credentialConfigurationsToRequest = (_b = credentialConfigurationIds === null || credentialConfigurationIds === void 0 ? void 0 : credentialConfigurationIds.map((id) => {
207
- if (!offeredCredentialConfigurations[id]) {
208
- const offeredCredentialIds = Object.keys(offeredCredentialConfigurations).join(', ');
209
- throw new core_1.CredoError(`Credential to request '${id}' is not present in offered credentials. Offered credentials are ${offeredCredentialIds}`);
210
- }
211
- return [id, offeredCredentialConfigurations[id]];
212
- })) !== null && _b !== void 0 ? _b : Object.entries(offeredCredentialConfigurations);
213
- // If we don't have a nonce yet, we need to first get one
214
- if (!cNonce) {
215
- // Best option is to use nonce endpoint (draft 14+)
216
- if (!metadata.credentialIssuer.nonce_endpoint) {
217
- const nonceResponse = await client.requestNonce({ issuerMetadata: metadata });
218
- cNonce = nonceResponse.c_nonce;
219
- }
220
- else {
221
- // Otherwise we will send a dummy request
222
- await client
223
- .retrieveCredentials({
224
- issuerMetadata: metadata,
225
- accessToken: options.accessToken,
226
- credentialConfigurationId: credentialConfigurationsToRequest[0][0],
227
- dpop: options.dpop
228
- ? await this.getDpopOptions(agentContext, Object.assign(Object.assign({}, options.dpop), { nonce: dpopNonce, dpopSigningAlgValuesSupported: [options.dpop.alg] }))
229
- : undefined,
230
- })
231
- .catch((e) => {
232
- var _a;
233
- if (e instanceof oid4vci_1.Oid4vciRetrieveCredentialsError && ((_a = e.response.credentialErrorResponseResult) === null || _a === void 0 ? void 0 : _a.success)) {
234
- cNonce = e.response.credentialErrorResponseResult.output.c_nonce;
235
- }
236
- });
237
- }
238
- }
239
- if (!cNonce) {
240
- throw new core_1.CredoError('No cNonce provided and unable to acquire cNonce from the credential issuer');
241
- }
242
- // If true: use max from issuer or otherwise 1
243
- // If number not 0: use the number
244
- // Else: use 1
245
- const batchSize = requestBatch === true ? (_d = (_c = metadata.credentialIssuer.batch_credential_issuance) === null || _c === void 0 ? void 0 : _c.batch_size) !== null && _d !== void 0 ? _d : 1 : requestBatch || 1;
246
- for (const [offeredCredentialId, offeredCredentialConfiguration] of credentialConfigurationsToRequest) {
247
- // Get all options for the credential request (such as which kid to use, the signature algorithm, etc)
248
- const { jwtSigner } = await this.getCredentialRequestOptions(agentContext, {
249
- possibleProofOfPossessionSignatureAlgorithms: possibleProofOfPossessionSigAlgs,
250
- offeredCredential: {
251
- id: offeredCredentialId,
252
- configuration: offeredCredentialConfiguration,
253
- },
254
- credentialBindingResolver,
255
- });
256
- const jwts = [];
257
- for (let i = 0; i < batchSize; i++) {
258
- const { jwt } = await client.createCredentialRequestJwtProof({
259
- credentialConfigurationId: offeredCredentialId,
260
- issuerMetadata: resolvedCredentialOffer.metadata,
261
- signer: jwtSigner,
262
- clientId: options.clientId,
263
- nonce: cNonce,
264
- });
265
- this.logger.debug('Generated credential request proof of possesion jwt', { jwt });
266
- jwts.push(jwt);
267
- }
268
- const { credentialResponse, dpop } = await client.retrieveCredentials({
269
- issuerMetadata: metadata,
270
- accessToken: options.accessToken,
271
- credentialConfigurationId: offeredCredentialId,
272
- dpop: options.dpop
273
- ? await this.getDpopOptions(agentContext, Object.assign(Object.assign({}, options.dpop), { nonce: dpopNonce, dpopSigningAlgValuesSupported: [options.dpop.alg] }))
274
- : undefined,
275
- proofs: batchSize > 1 ? { jwt: jwts } : undefined,
276
- proof: batchSize === 1
277
- ? {
278
- proof_type: 'jwt',
279
- jwt: jwts[0],
280
- }
281
- : undefined,
282
- });
283
- // Set new nonce values
284
- cNonce = credentialResponse.c_nonce;
285
- dpopNonce = dpop === null || dpop === void 0 ? void 0 : dpop.nonce;
286
- // Create credential, but we don't store it yet (only after the user has accepted the credential)
287
- const credential = await this.handleCredentialResponse(agentContext, credentialResponse, {
288
- verifyCredentialStatus: verifyCredentialStatus !== null && verifyCredentialStatus !== void 0 ? verifyCredentialStatus : false,
289
- credentialIssuerMetadata: metadata.credentialIssuer,
290
- format: offeredCredentialConfiguration.format,
291
- credentialConfigurationId: offeredCredentialId,
292
- });
293
- this.logger.debug('received credential', credential.credentials.map((c) => c instanceof core_1.Mdoc ? { issuerSignedNamespaces: c.issuerSignedNamespaces, base64Url: c.base64Url } : c));
294
- receivedCredentials.push(Object.assign(Object.assign({}, credential), { credentialConfigurationId: offeredCredentialId }));
295
- }
296
- return {
297
- credentials: receivedCredentials,
298
- dpop: options.dpop
299
- ? Object.assign(Object.assign({}, options.dpop), { nonce: dpopNonce }) : undefined,
300
- cNonce,
301
- };
302
- }
303
- /**
304
- * Get the options for the credential request. Internally this will resolve the proof of possession
305
- * requirements, and based on that it will call the proofOfPossessionVerificationMethodResolver to
306
- * allow the caller to select the correct verification method based on the requirements for the proof
307
- * of possession.
308
- */
309
- async getCredentialRequestOptions(agentContext, options) {
310
- const { signatureAlgorithms, supportedDidMethods, supportsAllDidMethods, supportsJwk } = this.getProofOfPossessionRequirements(agentContext, {
311
- credentialToRequest: options.offeredCredential,
312
- possibleProofOfPossessionSignatureAlgorithms: options.possibleProofOfPossessionSignatureAlgorithms,
313
- });
314
- const JwkClasses = signatureAlgorithms.map((signatureAlgorithm) => {
315
- const JwkClass = (0, core_1.getJwkClassFromJwaSignatureAlgorithm)(signatureAlgorithm);
316
- if (!JwkClass) {
317
- throw new core_1.CredoError(`Could not determine JWK key type of the JWA signature algorithm '${signatureAlgorithm}'`);
318
- }
319
- return JwkClass;
320
- });
321
- const keyTypes = JwkClasses.map((JwkClass) => JwkClass.keyType);
322
- const supportedVerificationMethods = keyTypes.flatMap((keyType) => (0, core_1.getSupportedVerificationMethodTypesFromKeyType)(keyType));
323
- const format = options.offeredCredential.configuration.format;
324
- const supportsAnyMethod = supportedDidMethods !== undefined || supportsAllDidMethods || supportsJwk;
325
- // Now we need to determine how the credential will be bound to us
326
- const credentialBinding = await options.credentialBindingResolver({
327
- agentContext,
328
- credentialFormat: format,
329
- signatureAlgorithms,
330
- supportedVerificationMethods,
331
- keyTypes: JwkClasses.map((JwkClass) => JwkClass.keyType),
332
- credentialConfigurationId: options.offeredCredential.id,
333
- supportsAllDidMethods,
334
- supportedDidMethods,
335
- supportsJwk,
336
- });
337
- let jwk;
338
- // Make sure the issuer of proof of possession is valid according to openid issuer metadata
339
- if (credentialBinding.method === 'did') {
340
- // Test binding method
341
- if (!supportsAllDidMethods &&
342
- // If supportedDidMethods is undefined, it means the issuer didn't include the binding methods in the metadata
343
- // The user can still select a verification method, but we can't validate it
344
- supportedDidMethods !== undefined &&
345
- !supportedDidMethods.find((supportedDidMethod) => credentialBinding.didUrl.startsWith(supportedDidMethod) && supportsAnyMethod)) {
346
- const { method } = (0, core_1.parseDid)(credentialBinding.didUrl);
347
- const supportedDidMethodsString = supportedDidMethods.join(', ');
348
- throw new core_1.CredoError(`Resolved credential binding for proof of possession uses did method '${method}', but issuer only supports '${supportedDidMethodsString}'`);
349
- }
350
- const key = await (0, utils_1.getKeyFromDid)(agentContext, credentialBinding.didUrl);
351
- jwk = (0, core_1.getJwkFromKey)(key);
352
- if (!keyTypes.includes(key.keyType)) {
353
- throw new core_1.CredoError(`Credential binding returned did url that points to key with type '${key.keyType}', but one of '${keyTypes.join(', ')}' was expected`);
354
- }
355
- }
356
- else if (credentialBinding.method === 'jwk') {
357
- if (!supportsJwk && supportsAnyMethod) {
358
- throw new core_1.CredoError(`Resolved credential binding for proof of possession uses jwk, but openid issuer does not support 'jwk' or 'cose_key' cryptographic binding method`);
359
- }
360
- jwk = credentialBinding.jwk;
361
- if (!keyTypes.includes(credentialBinding.jwk.key.keyType)) {
362
- throw new core_1.CredoError(`Credential binding returned jwk with key with type '${credentialBinding.jwk.key.keyType}', but one of '${keyTypes.join(', ')}' was expected`);
363
- }
364
- }
365
- else {
366
- // @ts-expect-error currently if/else if exhaustive, but once we add new option it will give ts error
367
- throw new core_1.CredoError(`Unsupported credential binding method ${credentialBinding.method}`);
368
- }
369
- const alg = jwk.supportedSignatureAlgorithms.find((alg) => signatureAlgorithms.includes(alg));
370
- if (!alg) {
371
- // Should not happen, to make ts happy
372
- throw new core_1.CredoError(`Unable to determine alg for key type ${jwk.keyType}`);
373
- }
374
- const jwtSigner = credentialBinding.method === 'did'
375
- ? {
376
- method: credentialBinding.method,
377
- didUrl: credentialBinding.didUrl,
378
- alg,
379
- }
380
- : {
381
- method: 'jwk',
382
- publicJwk: credentialBinding.jwk.toJson(),
383
- alg,
384
- };
385
- return { credentialBinding, signatureAlgorithm: alg, jwtSigner };
386
- }
387
- /**
388
- * Get the requirements for creating the proof of possession. Based on the allowed
389
- * credential formats, the allowed proof of possession signature algorithms, and the
390
- * credential type, this method will select the best credential format and signature
391
- * algorithm to use, based on the order of preference.
392
- */
393
- getProofOfPossessionRequirements(agentContext, options) {
394
- var _a, _b, _c, _d, _e;
395
- const { credentialToRequest } = options;
396
- if (!OpenId4VciHolderServiceOptions_1.openId4VciSupportedCredentialFormats.includes(credentialToRequest.configuration.format)) {
397
- throw new core_1.CredoError([
398
- `Requested credential with format '${credentialToRequest.configuration.format}',`,
399
- `for the credential with id '${credentialToRequest.id},`,
400
- `but the wallet only supports the following formats '${OpenId4VciHolderServiceOptions_1.openId4VciSupportedCredentialFormats.join(', ')}'`,
401
- ].join('\n'));
402
- }
403
- // For each of the supported algs, find the key types, then find the proof types
404
- const signatureSuiteRegistry = agentContext.dependencyManager.resolve(core_1.SignatureSuiteRegistry);
405
- let signatureAlgorithms = [];
406
- if (credentialToRequest.configuration.proof_types_supported) {
407
- if (!credentialToRequest.configuration.proof_types_supported.jwt) {
408
- throw new core_1.CredoError(`Unsupported proof type(s) ${Object.keys(credentialToRequest.configuration.proof_types_supported).join(', ')}. Supported proof type(s) are: jwt`);
409
- }
410
- }
411
- const proofSigningAlgsSupported = (_b = (_a = credentialToRequest.configuration.proof_types_supported) === null || _a === void 0 ? void 0 : _a.jwt) === null || _b === void 0 ? void 0 : _b.proof_signing_alg_values_supported;
412
- // If undefined, it means the issuer didn't include the cryptographic suites in the metadata
413
- // We just guess that the first one is supported
414
- if (proofSigningAlgsSupported === undefined) {
415
- signatureAlgorithms = options.possibleProofOfPossessionSignatureAlgorithms;
416
- }
417
- else {
418
- switch (credentialToRequest.configuration.format) {
419
- case shared_1.OpenId4VciCredentialFormatProfile.JwtVcJson:
420
- case shared_1.OpenId4VciCredentialFormatProfile.JwtVcJsonLd:
421
- case shared_1.OpenId4VciCredentialFormatProfile.SdJwtVc:
422
- case shared_1.OpenId4VciCredentialFormatProfile.MsoMdoc:
423
- signatureAlgorithms = options.possibleProofOfPossessionSignatureAlgorithms.filter((signatureAlgorithm) => proofSigningAlgsSupported.includes(signatureAlgorithm));
424
- break;
425
- case shared_1.OpenId4VciCredentialFormatProfile.LdpVc:
426
- signatureAlgorithms = options.possibleProofOfPossessionSignatureAlgorithms.filter((signatureAlgorithm) => {
427
- const JwkClass = (0, core_1.getJwkClassFromJwaSignatureAlgorithm)(signatureAlgorithm);
428
- if (!JwkClass)
429
- return false;
430
- const matchingSuite = signatureSuiteRegistry.getAllByKeyType(JwkClass.keyType);
431
- if (matchingSuite.length === 0)
432
- return false;
433
- return proofSigningAlgsSupported.includes(matchingSuite[0].proofType);
434
- });
435
- break;
436
- default:
437
- throw new core_1.CredoError(`Unsupported credential format.`);
438
- }
439
- }
440
- if (signatureAlgorithms.length === 0) {
441
- throw new core_1.CredoError(`Could not establish signature algorithm for format ${credentialToRequest.configuration.format} and id ${credentialToRequest.id}. Server supported signature algorithms are '${(_c = proofSigningAlgsSupported === null || proofSigningAlgsSupported === void 0 ? void 0 : proofSigningAlgsSupported.join(', ')) !== null && _c !== void 0 ? _c : 'Not defined'}', available are '${options.possibleProofOfPossessionSignatureAlgorithms.join(', ')}'`);
442
- }
443
- const issuerSupportedBindingMethods = credentialToRequest.configuration.cryptographic_binding_methods_supported;
444
- const supportsAllDidMethods = (_d = issuerSupportedBindingMethods === null || issuerSupportedBindingMethods === void 0 ? void 0 : issuerSupportedBindingMethods.includes('did')) !== null && _d !== void 0 ? _d : false;
445
- const supportedDidMethods = issuerSupportedBindingMethods === null || issuerSupportedBindingMethods === void 0 ? void 0 : issuerSupportedBindingMethods.filter((method) => method.startsWith('did:'));
446
- // The cryptographic_binding_methods_supported describe the cryptographic key material that the issued Credential is bound to.
447
- const supportsCoseKey = (_e = issuerSupportedBindingMethods === null || issuerSupportedBindingMethods === void 0 ? void 0 : issuerSupportedBindingMethods.includes('cose_key')) !== null && _e !== void 0 ? _e : false;
448
- const supportsJwk = (issuerSupportedBindingMethods === null || issuerSupportedBindingMethods === void 0 ? void 0 : issuerSupportedBindingMethods.includes('jwk')) || supportsCoseKey;
449
- return {
450
- signatureAlgorithms,
451
- supportedDidMethods,
452
- supportsAllDidMethods,
453
- supportsJwk,
454
- };
455
- }
456
- async handleCredentialResponse(agentContext, credentialResponse, options) {
457
- var _a;
458
- const { verifyCredentialStatus, credentialConfigurationId } = options;
459
- this.logger.debug('Credential response', credentialResponse);
460
- const credentials = (_a = credentialResponse.credentials) !== null && _a !== void 0 ? _a : (credentialResponse.credential ? [credentialResponse.credential] : undefined);
461
- if (!credentials) {
462
- throw new core_1.CredoError(`Credential response returned neither 'credentials' nor 'credential' parameter.`);
463
- }
464
- const notificationId = credentialResponse.notification_id;
465
- const format = options.format;
466
- if (format === shared_1.OpenId4VciCredentialFormatProfile.SdJwtVc) {
467
- if (!credentials.every((c) => typeof c === 'string')) {
468
- throw new core_1.CredoError(`Received credential(s) of format ${format}, but not all credential(s) are a string. ${JSON.stringify(credentials)}`);
469
- }
470
- const sdJwtVcApi = agentContext.dependencyManager.resolve(core_1.SdJwtVcApi);
471
- const verificationResults = await Promise.all(credentials.map((compactSdJwtVc) => sdJwtVcApi.verify({
472
- compactSdJwtVc,
473
- })));
474
- if (!verificationResults.every((result) => result.isValid)) {
475
- agentContext.config.logger.error('Failed to validate credential(s)', { verificationResults });
476
- throw new core_1.CredoError(`Failed to validate sd-jwt-vc credentials. Results = ${JSON.stringify(verificationResults)}`);
477
- }
478
- return {
479
- credentials: verificationResults.map((result) => result.sdJwtVc),
480
- notificationId,
481
- credentialConfigurationId,
482
- };
483
- }
484
- else if (options.format === shared_1.OpenId4VciCredentialFormatProfile.JwtVcJson ||
485
- options.format === shared_1.OpenId4VciCredentialFormatProfile.JwtVcJsonLd) {
486
- if (!credentials.every((c) => typeof c === 'string')) {
487
- throw new core_1.CredoError(`Received credential(s) of format ${format}, but not all credential(s) are a string. ${JSON.stringify(credentials)}`);
488
- }
489
- const result = await Promise.all(credentials.map(async (c) => {
490
- const credential = core_1.W3cJwtVerifiableCredential.fromSerializedJwt(c);
491
- const result = await this.w3cCredentialService.verifyCredential(agentContext, {
492
- credential,
493
- verifyCredentialStatus,
494
- });
495
- return { credential, result };
496
- }));
497
- if (!result.every((c) => c.result.isValid)) {
498
- agentContext.config.logger.error('Failed to validate credentials', { result });
499
- throw new core_1.CredoError(`Failed to validate credential, error = ${result
500
- .map((e) => { var _a; return (_a = e.result.error) === null || _a === void 0 ? void 0 : _a.message; })
501
- .filter(Boolean)
502
- .join(', ')}`);
503
- }
504
- return { credentials: result.map((r) => r.credential), notificationId, credentialConfigurationId };
505
- }
506
- else if (format === shared_1.OpenId4VciCredentialFormatProfile.LdpVc) {
507
- if (!credentials.every((c) => typeof c === 'object')) {
508
- throw new core_1.CredoError(`Received credential(s) of format ${format}, but not all credential(s) are an object. ${JSON.stringify(credentials)}`);
509
- }
510
- const result = await Promise.all(credentials.map(async (c) => {
511
- const credential = core_1.W3cJsonLdVerifiableCredential.fromJson(c);
512
- const result = await this.w3cCredentialService.verifyCredential(agentContext, {
513
- credential,
514
- verifyCredentialStatus,
515
- });
516
- return { credential, result };
517
- }));
518
- if (!result.every((c) => c.result.isValid)) {
519
- agentContext.config.logger.error('Failed to validate credentials', { result });
520
- throw new core_1.CredoError(`Failed to validate credential, error = ${result
521
- .map((e) => { var _a; return (_a = e.result.error) === null || _a === void 0 ? void 0 : _a.message; })
522
- .filter(Boolean)
523
- .join(', ')}`);
524
- }
525
- return { credentials: result.map((r) => r.credential), notificationId, credentialConfigurationId };
526
- }
527
- else if (format === shared_1.OpenId4VciCredentialFormatProfile.MsoMdoc) {
528
- if (!credentials.every((c) => typeof c === 'string')) {
529
- throw new core_1.CredoError(`Received credential(s) of format ${format}, but not all credential(s) are a string. ${JSON.stringify(credentials)}`);
530
- }
531
- const mdocApi = agentContext.dependencyManager.resolve(core_1.MdocApi);
532
- const result = await Promise.all(credentials.map(async (credential) => {
533
- const mdoc = core_1.Mdoc.fromBase64Url(credential);
534
- const result = await mdocApi.verify(mdoc, {});
535
- return {
536
- result,
537
- mdoc,
538
- };
539
- }));
540
- if (!result.every((r) => r.result.isValid)) {
541
- agentContext.config.logger.error('Failed to validate credentials', { result });
542
- throw new core_1.CredoError(`Failed to validate mdoc credential(s). \n - ${result
543
- .map((r, i) => (r.result.isValid ? undefined : `(${i}) ${r.result.error}`))
544
- .filter(Boolean)
545
- .join('\n - ')}`);
546
- }
547
- return { credentials: result.map((c) => c.mdoc), notificationId, credentialConfigurationId };
548
- }
549
- throw new core_1.CredoError(`Unsupported credential format ${options.format}`);
550
- }
551
- getClient(agentContext) {
552
- return new oid4vci_1.Oid4vciClient({
553
- callbacks: (0, callbacks_1.getOid4vciCallbacks)(agentContext),
554
- });
555
- }
556
- getOauth2Client(agentContext) {
557
- return new oauth2_1.Oauth2Client({
558
- callbacks: (0, callbacks_1.getOid4vciCallbacks)(agentContext),
559
- });
560
- }
561
- };
562
- exports.OpenId4VciHolderService = OpenId4VciHolderService;
563
- exports.OpenId4VciHolderService = OpenId4VciHolderService = __decorate([
564
- (0, core_1.injectable)(),
565
- __param(0, (0, core_1.inject)(core_1.InjectionSymbols.Logger)),
566
- __metadata("design:paramtypes", [Object, core_1.W3cCredentialService,
567
- core_1.JwsService])
568
- ], OpenId4VciHolderService);
569
- //# sourceMappingURL=OpenId4VciHolderService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4VciHolderService.js","sourceRoot":"","sources":["../../src/openid4vc-holder/OpenId4VciHolderService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA,6CAMyB;AACzB,+CAM0B;AAC1B,yCAoBuB;AAEvB,sCAA6D;AAC7D,mDAAyD;AACzD,uEAAqH;AACrH,2CAAm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