@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,498 +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.OpenId4VcSiopVerifierService = void 0;
16
- const core_1 = require("@credo-ts/core");
17
- const did_auth_siop_1 = require("@sphereon/did-auth-siop");
18
- const OpenID4VP_1 = require("@sphereon/did-auth-siop/dist/authorization-response/OpenID4VP");
19
- const rxjs_1 = require("rxjs");
20
- const router_1 = require("../shared/router");
21
- const transform_1 = require("../shared/transform");
22
- const utils_1 = require("../shared/utils");
23
- const OpenId4VcVerificationSessionState_1 = require("./OpenId4VcVerificationSessionState");
24
- const OpenId4VcVerifierModuleConfig_1 = require("./OpenId4VcVerifierModuleConfig");
25
- const repository_1 = require("./repository");
26
- const OpenId4VcRelyingPartyEventEmitter_1 = require("./repository/OpenId4VcRelyingPartyEventEmitter");
27
- const OpenId4VcRelyingPartySessionManager_1 = require("./repository/OpenId4VcRelyingPartySessionManager");
28
- /**
29
- * @internal
30
- */
31
- let OpenId4VcSiopVerifierService = class OpenId4VcSiopVerifierService {
32
- constructor(logger, w3cCredentialService, openId4VcVerifierRepository, config, openId4VcVerificationSessionRepository) {
33
- this.logger = logger;
34
- this.w3cCredentialService = w3cCredentialService;
35
- this.openId4VcVerifierRepository = openId4VcVerifierRepository;
36
- this.config = config;
37
- this.openId4VcVerificationSessionRepository = openId4VcVerificationSessionRepository;
38
- }
39
- async createAuthorizationRequest(agentContext, options) {
40
- var _a;
41
- const nonce = await agentContext.wallet.generateNonce();
42
- const state = await agentContext.wallet.generateNonce();
43
- // Correlation id will be the id of the verification session record
44
- const correlationId = core_1.utils.uuid();
45
- let authorizationResponseUrl = (0, core_1.joinUriParts)(this.config.baseUrl, [
46
- options.verifier.verifierId,
47
- this.config.authorizationEndpoint.endpointPath,
48
- ]);
49
- const jwtIssuer = options.requestSigner.method === 'x5c'
50
- ? await (0, utils_1.openIdTokenIssuerToJwtIssuer)(agentContext, Object.assign(Object.assign({}, options.requestSigner), { issuer: authorizationResponseUrl }))
51
- : await (0, utils_1.openIdTokenIssuerToJwtIssuer)(agentContext, options.requestSigner);
52
- let clientIdScheme;
53
- let clientId;
54
- if (jwtIssuer.method === 'x5c') {
55
- if (jwtIssuer.issuer !== authorizationResponseUrl) {
56
- throw new core_1.CredoError(`The jwtIssuer's issuer field must match the verifier's authorizationResponseUrl '${authorizationResponseUrl}'.`);
57
- }
58
- const leafCertificate = core_1.X509Service.getLeafCertificate(agentContext, { certificateChain: jwtIssuer.x5c });
59
- if (leafCertificate.sanDnsNames.includes((0, core_1.getDomainFromUrl)(jwtIssuer.issuer))) {
60
- clientIdScheme = 'x509_san_dns';
61
- clientId = (0, core_1.getDomainFromUrl)(jwtIssuer.issuer);
62
- authorizationResponseUrl = jwtIssuer.issuer;
63
- }
64
- else if (leafCertificate.sanUriNames.includes(jwtIssuer.issuer)) {
65
- clientIdScheme = 'x509_san_uri';
66
- clientId = jwtIssuer.issuer;
67
- authorizationResponseUrl = clientId;
68
- }
69
- else {
70
- throw new core_1.CredoError(`With jwtIssuer 'method' 'x5c' the jwtIssuer's 'issuer' field must either match the match a sanDnsName (FQDN) or sanUriName in the leaf x509 chain's leaf certificate.`);
71
- }
72
- }
73
- else if (jwtIssuer.method === 'did') {
74
- clientId = jwtIssuer.didUrl.split('#')[0];
75
- clientIdScheme = 'did';
76
- }
77
- else {
78
- throw new core_1.CredoError(`Unsupported jwt issuer method '${options.requestSigner.method}'. Only 'did' and 'x5c' are supported.`);
79
- }
80
- const relyingParty = await this.getRelyingParty(agentContext, options.verifier, {
81
- presentationDefinition: (_a = options.presentationExchange) === null || _a === void 0 ? void 0 : _a.definition,
82
- authorizationResponseUrl,
83
- clientId,
84
- clientIdScheme,
85
- responseMode: options.responseMode,
86
- });
87
- // We always use shortened URIs currently
88
- const hostedAuthorizationRequestUri = (0, core_1.joinUriParts)(this.config.baseUrl, [
89
- options.verifier.verifierId,
90
- this.config.authorizationRequestEndpoint.endpointPath,
91
- // It doesn't really matter what the url is, as long as it's unique
92
- core_1.utils.uuid(),
93
- ]);
94
- // This is very unfortunate, but storing state in sphereon's SiOP-OID4VP library
95
- // is done async, so we can't be certain yet that the verification session record
96
- // is created already when we have created the authorization request. So we need to
97
- // wait for a short while before we can be certain that the verification session record
98
- // is created. To not use arbitrary timeouts, we wait for the specific RecordSavedEvent
99
- // that is emitted when the verification session record is created.
100
- const eventEmitter = agentContext.dependencyManager.resolve(core_1.EventEmitter);
101
- const verificationSessionCreatedPromise = (0, rxjs_1.firstValueFrom)(eventEmitter
102
- .observable(core_1.RepositoryEventTypes.RecordSaved)
103
- .pipe((0, rxjs_1.filter)((e) => e.metadata.contextCorrelationId === agentContext.contextCorrelationId), (0, rxjs_1.filter)((e) => e.payload.record.id === correlationId && e.payload.record.verifierId === options.verifier.verifierId), (0, rxjs_1.first)(), (0, rxjs_1.timeout)({
104
- first: 10000,
105
- meta: 'OpenId4VcSiopVerifierService.createAuthorizationRequest',
106
- }), (0, rxjs_1.map)((e) => e.payload.record)));
107
- const authorizationRequest = await relyingParty.createAuthorizationRequest({
108
- correlationId,
109
- nonce,
110
- state,
111
- requestByReferenceURI: hostedAuthorizationRequestUri,
112
- jwtIssuer,
113
- });
114
- // NOTE: it's not possible to set the uri scheme when using the RP to create an auth request, only lower level
115
- // functions allow this. So we need to replace the uri scheme manually.
116
- let authorizationRequestUri = (await authorizationRequest.uri()).encodedUri;
117
- if (options.presentationExchange && !options.idToken) {
118
- authorizationRequestUri = authorizationRequestUri.replace('openid://', 'openid4vp://');
119
- }
120
- else {
121
- authorizationRequestUri = authorizationRequestUri.replace('openid4vp://', 'openid://');
122
- }
123
- const verificationSession = await verificationSessionCreatedPromise;
124
- return {
125
- authorizationRequest: authorizationRequestUri,
126
- verificationSession,
127
- };
128
- }
129
- async verifyAuthorizationResponse(agentContext, options) {
130
- var _a, _b;
131
- // Assert state
132
- options.verificationSession.assertState([
133
- OpenId4VcVerificationSessionState_1.OpenId4VcVerificationSessionState.RequestUriRetrieved,
134
- OpenId4VcVerificationSessionState_1.OpenId4VcVerificationSessionState.RequestCreated,
135
- ]);
136
- const authorizationRequest = await did_auth_siop_1.AuthorizationRequest.fromUriOrJwt(options.verificationSession.authorizationRequestJwt);
137
- const verifier = await this.getVerifierByVerifierId(agentContext, options.verificationSession.verifierId);
138
- const requestClientId = await authorizationRequest.getMergedProperty('client_id');
139
- const requestNonce = await authorizationRequest.getMergedProperty('nonce');
140
- const requestState = await authorizationRequest.getMergedProperty('state');
141
- const responseUri = await authorizationRequest.getMergedProperty('response_uri');
142
- const presentationDefinitionsWithLocation = await authorizationRequest.getPresentationDefinitions();
143
- if (!requestNonce || !requestClientId || !requestState) {
144
- throw new core_1.CredoError(`Unable to find nonce, state, or client_id in authorization request for verification session '${options.verificationSession.id}'`);
145
- }
146
- const authorizationResponseUrl = (0, core_1.joinUriParts)(this.config.baseUrl, [
147
- options.verificationSession.verifierId,
148
- this.config.authorizationEndpoint.endpointPath,
149
- ]);
150
- const relyingParty = await this.getRelyingParty(agentContext, verifier, {
151
- presentationDefinition: (_a = presentationDefinitionsWithLocation === null || presentationDefinitionsWithLocation === void 0 ? void 0 : presentationDefinitionsWithLocation[0]) === null || _a === void 0 ? void 0 : _a.definition,
152
- authorizationResponseUrl,
153
- clientId: requestClientId,
154
- });
155
- // This is very unfortunate, but storing state in sphereon's SiOP-OID4VP library
156
- // is done async, so we can't be certain yet that the verification session record
157
- // is updated already when we have verified the authorization response. So we need to
158
- // wait for a short while before we can be certain that the verification session record
159
- // is updated. To not use arbitrary timeouts, we wait for the specific RecordUpdatedEvent
160
- // that is emitted when the verification session record is updated.
161
- const eventEmitter = agentContext.dependencyManager.resolve(core_1.EventEmitter);
162
- const verificationSessionUpdatedPromise = (0, rxjs_1.firstValueFrom)(eventEmitter
163
- .observable(core_1.RepositoryEventTypes.RecordUpdated)
164
- .pipe((0, rxjs_1.filter)((e) => e.metadata.contextCorrelationId === agentContext.contextCorrelationId), (0, rxjs_1.filter)((e) => e.payload.record.id === options.verificationSession.id &&
165
- e.payload.record.verifierId === options.verificationSession.verifierId &&
166
- (e.payload.record.state === OpenId4VcVerificationSessionState_1.OpenId4VcVerificationSessionState.ResponseVerified ||
167
- e.payload.record.state === OpenId4VcVerificationSessionState_1.OpenId4VcVerificationSessionState.Error)), (0, rxjs_1.first)(), (0, rxjs_1.timeout)({
168
- first: 10000,
169
- meta: 'OpenId4VcSiopVerifierService.verifyAuthorizationResponse',
170
- }), (0, rxjs_1.map)((e) => e.payload.record)));
171
- await relyingParty.verifyAuthorizationResponse(options.authorizationResponse, {
172
- audience: requestClientId,
173
- correlationId: options.verificationSession.id,
174
- state: requestState,
175
- presentationDefinitions: presentationDefinitionsWithLocation,
176
- verification: {
177
- presentationVerificationCallback: this.getPresentationVerificationCallback(agentContext, {
178
- correlationId: options.verificationSession.id,
179
- nonce: requestNonce,
180
- audience: requestClientId,
181
- responseUri,
182
- mdocGeneratedNonce: ((_b = options.jarmHeader) === null || _b === void 0 ? void 0 : _b.apu)
183
- ? core_1.TypedArrayEncoder.toUtf8String(core_1.TypedArrayEncoder.fromBase64(options.jarmHeader.apu))
184
- : undefined,
185
- }),
186
- },
187
- });
188
- const verificationSession = await verificationSessionUpdatedPromise;
189
- const verifiedAuthorizationResponse = await this.getVerifiedAuthorizationResponse(verificationSession);
190
- return Object.assign(Object.assign({}, verifiedAuthorizationResponse), { verificationSession: await verificationSessionUpdatedPromise });
191
- }
192
- async getVerifiedAuthorizationResponse(verificationSession) {
193
- var _a, _b, _c, _d;
194
- verificationSession.assertState(OpenId4VcVerificationSessionState_1.OpenId4VcVerificationSessionState.ResponseVerified);
195
- if (!verificationSession.authorizationResponsePayload) {
196
- throw new core_1.CredoError('No authorization response payload found in the verification session.');
197
- }
198
- const authorizationResponse = await did_auth_siop_1.AuthorizationResponse.fromPayload(verificationSession.authorizationResponsePayload);
199
- const authorizationRequest = await did_auth_siop_1.AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt);
200
- const idToken = authorizationResponse.idToken
201
- ? { payload: await ((_a = authorizationResponse.idToken) === null || _a === void 0 ? void 0 : _a.payload()) }
202
- : undefined;
203
- let presentationExchange = undefined;
204
- const presentationDefinitions = await authorizationRequest.getPresentationDefinitions();
205
- if (presentationDefinitions && presentationDefinitions.length > 0) {
206
- const rawPresentations = authorizationResponse.payload.vp_token
207
- ? await (0, OpenID4VP_1.extractPresentationsFromVpToken)(authorizationResponse.payload.vp_token, {
208
- hasher: core_1.Hasher.hash,
209
- })
210
- : [];
211
- // TODO: Probably wise to check against request for the location of the submission_data
212
- const submission = (_d = (_c = (_b = idToken === null || idToken === void 0 ? void 0 : idToken.payload) === null || _b === void 0 ? void 0 : _b._vp_token) === null || _c === void 0 ? void 0 : _c.presentation_submission) !== null && _d !== void 0 ? _d : authorizationResponse.payload.presentation_submission;
213
- if (!submission) {
214
- throw new core_1.CredoError('Unable to extract submission from the response.');
215
- }
216
- // FIXME: should return type be an array? As now it doesn't always match the submission
217
- const verifiablePresentations = Array.isArray(rawPresentations)
218
- ? rawPresentations.map(transform_1.getVerifiablePresentationFromSphereonWrapped)
219
- : (0, transform_1.getVerifiablePresentationFromSphereonWrapped)(rawPresentations);
220
- const definition = presentationDefinitions[0].definition;
221
- presentationExchange = {
222
- definition,
223
- submission,
224
- // We always return this as an array
225
- presentations: Array.isArray(verifiablePresentations) ? verifiablePresentations : [verifiablePresentations],
226
- descriptors: (0, core_1.extractPresentationsWithDescriptorsFromSubmission)(verifiablePresentations, submission, definition),
227
- };
228
- }
229
- if (!idToken && !presentationExchange) {
230
- throw new core_1.CredoError('No idToken or presentationExchange found in the response.');
231
- }
232
- return {
233
- idToken,
234
- presentationExchange,
235
- };
236
- }
237
- /**
238
- * Find the verification session associated with an authorization response. You can optionally provide a verifier id
239
- * if the verifier that the response is associated with is already known.
240
- */
241
- async findVerificationSessionForAuthorizationResponse(agentContext, { authorizationResponse, authorizationResponseParams, verifierId, }) {
242
- let nonce;
243
- let state;
244
- if (authorizationResponse) {
245
- const authorizationResponseInstance = await did_auth_siop_1.AuthorizationResponse.fromPayload(authorizationResponse).catch(() => {
246
- throw new core_1.CredoError(`Unable to parse authorization response payload. ${JSON.stringify(authorizationResponse)}`);
247
- });
248
- nonce = await authorizationResponseInstance.getMergedProperty('nonce', {
249
- hasher: core_1.Hasher.hash,
250
- });
251
- state = await authorizationResponseInstance.getMergedProperty('state', {
252
- hasher: core_1.Hasher.hash,
253
- });
254
- if (!nonce && !state) {
255
- throw new core_1.CredoError('Could not extract nonce or state from authorization response. Unable to find OpenId4VcVerificationSession.');
256
- }
257
- }
258
- else {
259
- if ((authorizationResponseParams === null || authorizationResponseParams === void 0 ? void 0 : authorizationResponseParams.nonce) && !(authorizationResponseParams === null || authorizationResponseParams === void 0 ? void 0 : authorizationResponseParams.state)) {
260
- throw new core_1.CredoError('Either nonce or state must be provided if no authorization response is provided. Unable to find OpenId4VcVerificationSession.');
261
- }
262
- nonce = authorizationResponseParams === null || authorizationResponseParams === void 0 ? void 0 : authorizationResponseParams.nonce;
263
- state = authorizationResponseParams === null || authorizationResponseParams === void 0 ? void 0 : authorizationResponseParams.state;
264
- }
265
- const verificationSession = await this.openId4VcVerificationSessionRepository.findSingleByQuery(agentContext, {
266
- nonce,
267
- payloadState: state,
268
- verifierId,
269
- });
270
- return verificationSession;
271
- }
272
- async getAllVerifiers(agentContext) {
273
- return this.openId4VcVerifierRepository.getAll(agentContext);
274
- }
275
- async getVerifierByVerifierId(agentContext, verifierId) {
276
- return this.openId4VcVerifierRepository.getByVerifierId(agentContext, verifierId);
277
- }
278
- async updateVerifier(agentContext, verifier) {
279
- return this.openId4VcVerifierRepository.update(agentContext, verifier);
280
- }
281
- async createVerifier(agentContext, options) {
282
- var _a;
283
- const openId4VcVerifier = new repository_1.OpenId4VcVerifierRecord({
284
- verifierId: (_a = options === null || options === void 0 ? void 0 : options.verifierId) !== null && _a !== void 0 ? _a : core_1.utils.uuid(),
285
- clientMetadata: options === null || options === void 0 ? void 0 : options.clientMetadata,
286
- });
287
- await this.openId4VcVerifierRepository.save(agentContext, openId4VcVerifier);
288
- await (0, router_1.storeActorIdForContextCorrelationId)(agentContext, openId4VcVerifier.verifierId);
289
- return openId4VcVerifier;
290
- }
291
- async findVerificationSessionsByQuery(agentContext, query, queryOptions) {
292
- return this.openId4VcVerificationSessionRepository.findByQuery(agentContext, query, queryOptions);
293
- }
294
- async getVerificationSessionById(agentContext, verificationSessionId) {
295
- return this.openId4VcVerificationSessionRepository.getById(agentContext, verificationSessionId);
296
- }
297
- async getRelyingParty(agentContext, verifier, { idToken, presentationDefinition, clientId, clientIdScheme, authorizationResponseUrl, responseMode, }) {
298
- const signatureSuiteRegistry = agentContext.dependencyManager.resolve(core_1.SignatureSuiteRegistry);
299
- const supportedAlgs = (0, utils_1.getSupportedJwaSignatureAlgorithms)(agentContext);
300
- const supportedProofTypes = signatureSuiteRegistry.supportedProofTypes;
301
- // Check: audience must be set to the issuer with dynamic disc otherwise self-issued.me/v2.
302
- const builder = did_auth_siop_1.RP.builder();
303
- const responseTypes = [];
304
- if (!presentationDefinition && idToken === false) {
305
- throw new core_1.CredoError('Either `presentationExchange` or `idToken` must be enabled');
306
- }
307
- if (presentationDefinition) {
308
- responseTypes.push(did_auth_siop_1.ResponseType.VP_TOKEN);
309
- }
310
- if (idToken === true || !presentationDefinition) {
311
- responseTypes.push(did_auth_siop_1.ResponseType.ID_TOKEN);
312
- }
313
- // FIXME: we now manually remove did:peer, we should probably allow the user to configure this
314
- const supportedDidMethods = agentContext.dependencyManager
315
- .resolve(core_1.DidsApi)
316
- .supportedResolverMethods.filter((m) => m !== 'peer');
317
- // The OpenId4VcRelyingPartyEventHandler is a global event handler that makes sure that
318
- // all the events are handled, and that the correct context is used for the events.
319
- const sphereonEventEmitter = agentContext.dependencyManager
320
- .resolve(OpenId4VcRelyingPartyEventEmitter_1.OpenId4VcRelyingPartyEventHandler)
321
- .getEventEmitterForVerifier(agentContext.contextCorrelationId, verifier.verifierId);
322
- const mode = !responseMode || responseMode === 'direct_post'
323
- ? did_auth_siop_1.ResponseMode.DIRECT_POST
324
- : did_auth_siop_1.ResponseMode.DIRECT_POST_JWT;
325
- let jarmEncryptionJwk;
326
- if (mode === did_auth_siop_1.ResponseMode.DIRECT_POST_JWT) {
327
- const key = await agentContext.wallet.createKey({ keyType: core_1.KeyType.P256 });
328
- jarmEncryptionJwk = Object.assign(Object.assign({}, (0, core_1.getJwkFromKey)(key).toJson()), { kid: key.fingerprint, use: 'enc' });
329
- }
330
- const jarmClientMetadata = jarmEncryptionJwk
331
- ? {
332
- jwks: { keys: [jarmEncryptionJwk] },
333
- authorization_encrypted_response_alg: 'ECDH-ES',
334
- authorization_encrypted_response_enc: 'A256GCM',
335
- }
336
- : undefined;
337
- builder
338
- .withClientId(clientId)
339
- .withResponseUri(authorizationResponseUrl)
340
- .withIssuer(did_auth_siop_1.ResponseIss.SELF_ISSUED_V2)
341
- .withAudience(did_auth_siop_1.RequestAud.SELF_ISSUED_V2)
342
- .withIssuer(did_auth_siop_1.ResponseIss.SELF_ISSUED_V2)
343
- .withSupportedVersions([
344
- did_auth_siop_1.SupportedVersion.SIOPv2_D11,
345
- did_auth_siop_1.SupportedVersion.SIOPv2_D12_OID4VP_D18,
346
- did_auth_siop_1.SupportedVersion.SIOPv2_D12_OID4VP_D20,
347
- ])
348
- .withResponseMode(mode)
349
- .withHasher(core_1.Hasher.hash)
350
- // FIXME: should allow verification of revocation
351
- // .withRevocationVerificationCallback()
352
- .withRevocationVerification(did_auth_siop_1.RevocationVerification.NEVER)
353
- .withSessionManager(new OpenId4VcRelyingPartySessionManager_1.OpenId4VcRelyingPartySessionManager(agentContext, verifier.verifierId))
354
- .withEventEmitter(sphereonEventEmitter)
355
- .withResponseType(responseTypes)
356
- .withCreateJwtCallback((0, utils_1.getCreateJwtCallback)(agentContext))
357
- .withVerifyJwtCallback((0, utils_1.getVerifyJwtCallback)(agentContext))
358
- // TODO: we should probably allow some dynamic values here
359
- .withClientMetadata(Object.assign(Object.assign(Object.assign({}, jarmClientMetadata), verifier.clientMetadata), {
360
- // FIXME: not passing client_id here means it will not be added
361
- // to the authorization request url (not the signed payload). Need
362
- // to fix that in Sphereon lib
363
- client_id: clientId, passBy: did_auth_siop_1.PassBy.VALUE, response_types_supported: [did_auth_siop_1.ResponseType.VP_TOKEN], subject_syntax_types_supported: [
364
- 'urn:ietf:params:oauth:jwk-thumbprint',
365
- ...supportedDidMethods.map((m) => `did:${m}`),
366
- ], vp_formats: {
367
- mso_mdoc: {
368
- alg: supportedAlgs,
369
- },
370
- jwt_vc: {
371
- alg: supportedAlgs,
372
- },
373
- jwt_vc_json: {
374
- alg: supportedAlgs,
375
- },
376
- jwt_vp_json: {
377
- alg: supportedAlgs,
378
- },
379
- jwt_vp: {
380
- alg: supportedAlgs,
381
- },
382
- ldp_vc: {
383
- proof_type: supportedProofTypes,
384
- },
385
- ldp_vp: {
386
- proof_type: supportedProofTypes,
387
- },
388
- 'vc+sd-jwt': {
389
- kb_jwt_alg_values: supportedAlgs,
390
- sd_jwt_alg_values: supportedAlgs,
391
- },
392
- } }));
393
- if (clientIdScheme) {
394
- builder.withClientIdScheme(clientIdScheme);
395
- }
396
- if (presentationDefinition) {
397
- builder.withPresentationDefinition({ definition: presentationDefinition }, [did_auth_siop_1.PropertyTarget.REQUEST_OBJECT]);
398
- }
399
- if (responseTypes.includes(did_auth_siop_1.ResponseType.ID_TOKEN)) {
400
- builder.withScope('openid');
401
- }
402
- return builder.build();
403
- }
404
- getPresentationVerificationCallback(agentContext, options) {
405
- return async (encodedPresentation, presentationSubmission) => {
406
- var _a, _b;
407
- try {
408
- this.logger.debug(`Presentation response`, core_1.JsonTransformer.toJSON(encodedPresentation));
409
- this.logger.debug(`Presentation submission`, presentationSubmission);
410
- if (!encodedPresentation)
411
- throw new core_1.CredoError('Did not receive a presentation for verification.');
412
- let isValid;
413
- let reason = undefined;
414
- if (typeof encodedPresentation === 'string' && encodedPresentation.includes('~')) {
415
- // TODO: it might be better here to look at the presentation submission to know
416
- // If presentation includes a ~, we assume it's an SD-JWT-VC
417
- const sdJwtVcApi = agentContext.dependencyManager.resolve(core_1.SdJwtVcApi);
418
- const verificationResult = await sdJwtVcApi.verify({
419
- compactSdJwtVc: encodedPresentation,
420
- keyBinding: {
421
- audience: options.audience,
422
- nonce: options.nonce,
423
- },
424
- });
425
- isValid = verificationResult.verification.isValid;
426
- reason = verificationResult.isValid ? undefined : verificationResult.error.message;
427
- }
428
- else if (typeof encodedPresentation === 'string' && !core_1.Jwt.format.test(encodedPresentation)) {
429
- if (!options.responseUri || !options.mdocGeneratedNonce) {
430
- isValid = false;
431
- reason = 'Mdoc device response verification failed. Response uri and the mdocGeneratedNonce are not set';
432
- }
433
- else {
434
- const mdocDeviceResponse = core_1.MdocDeviceResponse.fromBase64Url(encodedPresentation);
435
- await mdocDeviceResponse.verify(agentContext, {
436
- sessionTranscriptOptions: {
437
- clientId: options.audience,
438
- mdocGeneratedNonce: options.mdocGeneratedNonce,
439
- responseUri: options.responseUri,
440
- verifierGeneratedNonce: options.nonce,
441
- },
442
- verificationContext: {
443
- openId4VcVerificationSessionId: options.correlationId,
444
- },
445
- });
446
- isValid = true;
447
- }
448
- }
449
- else if (typeof encodedPresentation === 'string' && core_1.Jwt.format.test(encodedPresentation)) {
450
- const verificationResult = await this.w3cCredentialService.verifyPresentation(agentContext, {
451
- presentation: encodedPresentation,
452
- challenge: options.nonce,
453
- domain: options.audience,
454
- verificationContext: {
455
- openId4VcVerificationSessionId: options.correlationId,
456
- },
457
- });
458
- isValid = verificationResult.isValid;
459
- reason = (_a = verificationResult.error) === null || _a === void 0 ? void 0 : _a.message;
460
- }
461
- else {
462
- const verificationResult = await this.w3cCredentialService.verifyPresentation(agentContext, {
463
- presentation: core_1.JsonTransformer.fromJSON(encodedPresentation, core_1.W3cJsonLdVerifiablePresentation),
464
- challenge: options.nonce,
465
- domain: options.audience,
466
- });
467
- isValid = verificationResult.isValid;
468
- reason = (_b = verificationResult.error) === null || _b === void 0 ? void 0 : _b.message;
469
- }
470
- if (!isValid) {
471
- throw new Error(reason);
472
- }
473
- return {
474
- verified: true,
475
- };
476
- }
477
- catch (error) {
478
- agentContext.config.logger.warn('Error occurred during verification of presentation', {
479
- error,
480
- });
481
- return {
482
- verified: false,
483
- reason: error.message,
484
- };
485
- }
486
- };
487
- }
488
- };
489
- exports.OpenId4VcSiopVerifierService = OpenId4VcSiopVerifierService;
490
- exports.OpenId4VcSiopVerifierService = OpenId4VcSiopVerifierService = __decorate([
491
- (0, core_1.injectable)(),
492
- __param(0, (0, core_1.inject)(core_1.InjectionSymbols.Logger)),
493
- __metadata("design:paramtypes", [Object, core_1.W3cCredentialService,
494
- repository_1.OpenId4VcVerifierRepository,
495
- OpenId4VcVerifierModuleConfig_1.OpenId4VcVerifierModuleConfig,
496
- repository_1.OpenId4VcVerificationSessionRepository])
497
- ], OpenId4VcSiopVerifierService);
498
- //# sourceMappingURL=OpenId4VcSiopVerifierService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4VcSiopVerifierService.js","sourceRoot":"","sources":["../../src/openid4vc-verifier/OpenId4VcSiopVerifierService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA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O,CAAA;gBAC5C,CAAC;qBAAM,CAAC;oBACN,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,YAAY,EAAE;wBAC1F,YAAY,EAAE,sBAAe,CAAC,QAAQ,CAAC,mBAAmB,EAAE,sCAA+B,CAAC;wBAC5F,SAAS,EAAE,OAAO,CAAC,KAAK;wBACxB,MAAM,EAAE,OAAO,CAAC,QAAQ;qBACzB,CAAC,CAAA;oBAEF,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAA;oBACpC,MAAM,GAAG,MAAA,kBAAkB,CAAC,KAAK,0CAAE,OAAO,CAAA;gBAC5C,CAAC;gBAED,IAAI,CAAC,OAAO,EAAE,CAAC;oBACb,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAA;gBACzB,CAAC;gBAED,OAAO;oBACL,QAAQ,EAAE,IAAI;iBACf,CAAA;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,oDAAoD,EAAE;oBACpF,KAAK;iBACN,CAAC,CAAA;gBACF,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,MAAM,EAAE,KAAK,CAAC,OAAO;iBACtB,CAAA;YACH,CAAC;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAA;AAvnBY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,iBAAU,GAAE;IAGR,WAAA,IAAA,aAAM,EAAC,uBAAgB,CAAC,MAAM,CAAC,CAAA;6CACF,2BAAoB;QACb,wCAA2B;QAChD,6DAA6B;QACG,mDAAsC;GAN7E,4BAA4B,CAunBxC"}
@@ -1,77 +0,0 @@
1
- import type { OpenId4VcVerificationSessionRecord, OpenId4VcVerifierRecordProps } from './repository';
2
- import type { OpenId4VcIssuerX5c, OpenId4VcJwtIssuer, OpenId4VcSiopAuthorizationResponsePayload, OpenId4VcSiopIdTokenPayload } from '../shared';
3
- import type { DifPresentationExchangeDefinition, DifPresentationExchangeSubmission, DifPresentationExchangeDefinitionV2, VerifiablePresentation, DifPexPresentationWithDescriptor } from '@credo-ts/core';
4
- export type ResponseMode = 'direct_post' | 'direct_post.jwt';
5
- export interface OpenId4VcSiopCreateAuthorizationRequestOptions {
6
- /**
7
- * Signing information for the request JWT. This will be used to sign the request JWT
8
- * and to set the client_id and client_id_scheme for registration of client_metadata.
9
- *
10
- * For x5c signer's the issuer value can be omitted as it can be derived from the authorization response endpoint.
11
- */
12
- requestSigner: Exclude<OpenId4VcJwtIssuer, OpenId4VcIssuerX5c> | (Omit<OpenId4VcIssuerX5c, 'issuer'> & {
13
- issuer?: string;
14
- });
15
- /**
16
- * Whether to reuqest an ID Token. Enabled by defualt when `presentationExchange` is not provided,
17
- * disabled by default when `presentationExchange` is provided.
18
- */
19
- idToken?: boolean;
20
- /**
21
- * A DIF Presentation Definition (v2) can be provided to request a Verifiable Presentation using OpenID4VP.
22
- */
23
- presentationExchange?: {
24
- definition: DifPresentationExchangeDefinitionV2;
25
- };
26
- /**
27
- * The response mode to use for the authorization request.
28
- * @default to `direct_post`.
29
- *
30
- * With response_mode `direct_post` the response will be posted directly to the `response_uri` provided in the request.
31
- * With response_mode `direct_post.jwt` the response will be `signed` `encrypted` or `signed and encrypted` and then posted to the `response_uri` provided in the request.
32
- */
33
- responseMode?: ResponseMode;
34
- }
35
- export interface OpenId4VcSiopVerifyAuthorizationResponseOptions {
36
- /**
37
- * The authorization response received from the OpenID Provider (OP).
38
- */
39
- authorizationResponse: OpenId4VcSiopAuthorizationResponsePayload;
40
- }
41
- export interface OpenId4VcSiopCreateAuthorizationRequestReturn {
42
- authorizationRequest: string;
43
- verificationSession: OpenId4VcVerificationSessionRecord;
44
- }
45
- export interface OpenId4VcSiopVerifiedAuthorizationResponsePresentationExchange {
46
- submission: DifPresentationExchangeSubmission;
47
- definition: DifPresentationExchangeDefinition;
48
- presentations: Array<VerifiablePresentation>;
49
- descriptors: DifPexPresentationWithDescriptor[];
50
- }
51
- /**
52
- * Either `idToken` and/or `presentationExchange` will be present.
53
- */
54
- export interface OpenId4VcSiopVerifiedAuthorizationResponse {
55
- idToken?: {
56
- payload: OpenId4VcSiopIdTokenPayload;
57
- };
58
- presentationExchange?: OpenId4VcSiopVerifiedAuthorizationResponsePresentationExchange;
59
- }
60
- /**
61
- * Verifier metadata that will be send when creating a request
62
- */
63
- export interface OpenId4VcSiopVerifierClientMetadata {
64
- client_name?: string;
65
- logo_uri?: string;
66
- }
67
- export interface OpenId4VcSiopCreateVerifierOptions {
68
- /**
69
- * Id of the verifier, not the id of the verifier record. Will be exposed publicly
70
- */
71
- verifierId?: string;
72
- /**
73
- * Optional client metadata that will be included in requests
74
- */
75
- clientMetadata?: OpenId4VcSiopVerifierClientMetadata;
76
- }
77
- export type OpenId4VcUpdateVerifierRecordOptions = Pick<OpenId4VcVerifierRecordProps, 'verifierId' | 'clientMetadata'>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=OpenId4VcSiopVerifierServiceOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4VcSiopVerifierServiceOptions.js","sourceRoot":"","sources":["../../src/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- export declare enum OpenId4VcVerificationSessionState {
2
- RequestCreated = "RequestCreated",
3
- RequestUriRetrieved = "RequestUriRetrieved",
4
- ResponseVerified = "ResponseVerified",
5
- Error = "Error"
6
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpenId4VcVerificationSessionState = void 0;
4
- var OpenId4VcVerificationSessionState;
5
- (function (OpenId4VcVerificationSessionState) {
6
- OpenId4VcVerificationSessionState["RequestCreated"] = "RequestCreated";
7
- OpenId4VcVerificationSessionState["RequestUriRetrieved"] = "RequestUriRetrieved";
8
- OpenId4VcVerificationSessionState["ResponseVerified"] = "ResponseVerified";
9
- OpenId4VcVerificationSessionState["Error"] = "Error";
10
- })(OpenId4VcVerificationSessionState || (exports.OpenId4VcVerificationSessionState = OpenId4VcVerificationSessionState = {}));
11
- //# sourceMappingURL=OpenId4VcVerificationSessionState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4VcVerificationSessionState.js","sourceRoot":"","sources":["../../src/openid4vc-verifier/OpenId4VcVerificationSessionState.ts"],"names":[],"mappings":";;;AAAA,IAAY,iCAKX;AALD,WAAY,iCAAiC;IAC3C,sEAAiC,CAAA;IACjC,gFAA2C,CAAA;IAC3C,0EAAqC,CAAA;IACrC,oDAAe,CAAA;AACjB,CAAC,EALW,iCAAiC,iDAAjC,iCAAiC,QAK5C"}