@pagopa/io-react-native-wallet 0.12.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. package/lib/commonjs/client/generated/wallet-provider.js +22 -22
  2. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  3. package/lib/commonjs/client/index.js +1 -2
  4. package/lib/commonjs/client/index.js.map +1 -1
  5. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +2 -1
  6. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/03-start-credential-issuance.js +287 -0
  8. package/lib/commonjs/credential/issuance/03-start-credential-issuance.js.map +1 -0
  9. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +55 -82
  10. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
  11. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +88 -0
  12. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  13. package/lib/commonjs/credential/issuance/05-authorize-access.js +55 -32
  14. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  15. package/lib/commonjs/credential/issuance/06-obtain-credential.js +50 -77
  16. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  17. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +21 -44
  18. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  19. package/lib/commonjs/credential/issuance/index.js +7 -0
  20. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  21. package/lib/commonjs/credential/issuance/types.js +28 -0
  22. package/lib/commonjs/credential/issuance/types.js.map +1 -0
  23. package/lib/commonjs/index.js.map +1 -1
  24. package/lib/commonjs/pid/sd-jwt/converters.js +5 -9
  25. package/lib/commonjs/pid/sd-jwt/converters.js.map +1 -1
  26. package/lib/commonjs/pid/sd-jwt/types.js +3 -3
  27. package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
  28. package/lib/commonjs/sd-jwt/__test__/converters.test.js +1 -1
  29. package/lib/commonjs/sd-jwt/__test__/converters.test.js.map +1 -1
  30. package/lib/commonjs/sd-jwt/__test__/index.test.js +30 -43
  31. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
  32. package/lib/commonjs/sd-jwt/__test__/types.test.js +16 -24
  33. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  34. package/lib/commonjs/sd-jwt/index.js +3 -9
  35. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  36. package/lib/commonjs/sd-jwt/types.js +11 -16
  37. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  38. package/lib/commonjs/trust/types.js +70 -29
  39. package/lib/commonjs/trust/types.js.map +1 -1
  40. package/lib/commonjs/utils/auth.js +44 -0
  41. package/lib/commonjs/utils/auth.js.map +1 -0
  42. package/lib/commonjs/utils/errors.js +77 -2
  43. package/lib/commonjs/utils/errors.js.map +1 -1
  44. package/lib/commonjs/utils/misc.js +34 -1
  45. package/lib/commonjs/utils/misc.js.map +1 -1
  46. package/lib/commonjs/utils/par.js +23 -15
  47. package/lib/commonjs/utils/par.js.map +1 -1
  48. package/lib/commonjs/utils/pop.js +33 -0
  49. package/lib/commonjs/utils/pop.js.map +1 -0
  50. package/lib/commonjs/wallet-instance-attestation/issuing.js +17 -2
  51. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
  52. package/lib/commonjs/wallet-instance-attestation/types.js +7 -7
  53. package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
  54. package/lib/module/client/generated/wallet-provider.js +16 -19
  55. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  56. package/lib/module/client/index.js +1 -2
  57. package/lib/module/client/index.js.map +1 -1
  58. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +2 -1
  59. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -1
  60. package/lib/module/credential/issuance/03-start-credential-issuance.js +276 -0
  61. package/lib/module/credential/issuance/03-start-credential-issuance.js.map +1 -0
  62. package/lib/module/credential/issuance/03-start-user-authorization.js +55 -79
  63. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  64. package/lib/module/credential/issuance/04-complete-user-authorization.js +85 -1
  65. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  66. package/lib/module/credential/issuance/05-authorize-access.js +53 -32
  67. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  68. package/lib/module/credential/issuance/06-obtain-credential.js +49 -74
  69. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  70. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +21 -44
  71. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  72. package/lib/module/credential/issuance/index.js +2 -1
  73. package/lib/module/credential/issuance/index.js.map +1 -1
  74. package/lib/module/credential/issuance/types.js +18 -0
  75. package/lib/module/credential/issuance/types.js.map +1 -0
  76. package/lib/module/index.js.map +1 -1
  77. package/lib/module/pid/sd-jwt/converters.js +5 -9
  78. package/lib/module/pid/sd-jwt/converters.js.map +1 -1
  79. package/lib/module/pid/sd-jwt/types.js +3 -3
  80. package/lib/module/pid/sd-jwt/types.js.map +1 -1
  81. package/lib/module/sd-jwt/__test__/converters.test.js +1 -1
  82. package/lib/module/sd-jwt/__test__/converters.test.js.map +1 -1
  83. package/lib/module/sd-jwt/__test__/index.test.js +30 -43
  84. package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
  85. package/lib/module/sd-jwt/__test__/types.test.js +16 -24
  86. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  87. package/lib/module/sd-jwt/index.js +3 -9
  88. package/lib/module/sd-jwt/index.js.map +1 -1
  89. package/lib/module/sd-jwt/types.js +11 -16
  90. package/lib/module/sd-jwt/types.js.map +1 -1
  91. package/lib/module/sd-jwt/verifier.js.map +1 -1
  92. package/lib/module/trust/types.js +70 -29
  93. package/lib/module/trust/types.js.map +1 -1
  94. package/lib/module/utils/auth.js +35 -0
  95. package/lib/module/utils/auth.js.map +1 -0
  96. package/lib/module/utils/errors.js +71 -0
  97. package/lib/module/utils/errors.js.map +1 -1
  98. package/lib/module/utils/misc.js +31 -0
  99. package/lib/module/utils/misc.js.map +1 -1
  100. package/lib/module/utils/par.js +24 -16
  101. package/lib/module/utils/par.js.map +1 -1
  102. package/lib/module/utils/pop.js +24 -0
  103. package/lib/module/utils/pop.js.map +1 -0
  104. package/lib/module/wallet-instance-attestation/issuing.js +17 -2
  105. package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
  106. package/lib/module/wallet-instance-attestation/types.js +7 -7
  107. package/lib/module/wallet-instance-attestation/types.js.map +1 -1
  108. package/lib/typescript/client/generated/wallet-provider.d.ts +35 -13
  109. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  110. package/lib/typescript/client/index.d.ts.map +1 -1
  111. package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -0
  112. package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +1 -1
  113. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +2 -1
  114. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -1
  115. package/lib/typescript/credential/issuance/03-start-credential-issuance.d.ts +41 -0
  116. package/lib/typescript/credential/issuance/03-start-credential-issuance.d.ts.map +1 -0
  117. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +22 -17
  118. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  119. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +24 -12
  120. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  121. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +21 -15
  122. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  123. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +19 -26
  124. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  125. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +10 -15
  126. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  127. package/lib/typescript/credential/issuance/index.d.ts +3 -4
  128. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  129. package/lib/typescript/credential/issuance/types.d.ts +63 -0
  130. package/lib/typescript/credential/issuance/types.d.ts.map +1 -0
  131. package/lib/typescript/credential/presentation/types.d.ts +6 -6
  132. package/lib/typescript/index.d.ts +2 -1
  133. package/lib/typescript/index.d.ts.map +1 -1
  134. package/lib/typescript/pid/sd-jwt/converters.d.ts.map +1 -1
  135. package/lib/typescript/pid/sd-jwt/types.d.ts +36 -36
  136. package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
  137. package/lib/typescript/sd-jwt/index.d.ts +40 -68
  138. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  139. package/lib/typescript/sd-jwt/types.d.ts +64 -121
  140. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  141. package/lib/typescript/trust/index.d.ts +150 -48
  142. package/lib/typescript/trust/index.d.ts.map +1 -1
  143. package/lib/typescript/trust/types.d.ts +2838 -1740
  144. package/lib/typescript/trust/types.d.ts.map +1 -1
  145. package/lib/typescript/utils/auth.d.ts +52 -0
  146. package/lib/typescript/utils/auth.d.ts.map +1 -0
  147. package/lib/typescript/utils/errors.d.ts +36 -1
  148. package/lib/typescript/utils/errors.d.ts.map +1 -1
  149. package/lib/typescript/utils/integrity.d.ts +1 -1
  150. package/lib/typescript/utils/misc.d.ts +18 -0
  151. package/lib/typescript/utils/misc.d.ts.map +1 -1
  152. package/lib/typescript/utils/par.d.ts +8 -31
  153. package/lib/typescript/utils/par.d.ts.map +1 -1
  154. package/lib/typescript/utils/pop.d.ts +26 -0
  155. package/lib/typescript/utils/pop.d.ts.map +1 -0
  156. package/lib/typescript/wallet-instance-attestation/issuing.d.ts +2 -1
  157. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
  158. package/lib/typescript/wallet-instance-attestation/types.d.ts +59 -59
  159. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
  160. package/package.json +2 -1
  161. package/src/client/generated/wallet-provider.ts +24 -21
  162. package/src/client/index.ts +3 -8
  163. package/src/credential/issuance/01-start-flow.ts +1 -0
  164. package/src/credential/issuance/02-evaluate-issuer-trust.ts +2 -1
  165. package/src/credential/issuance/03-start-credential-issuance.ts +407 -0
  166. package/src/credential/issuance/03-start-user-authorization.ts +87 -92
  167. package/src/credential/issuance/04-complete-user-authorization.ts +114 -13
  168. package/src/credential/issuance/05-authorize-access.ts +73 -48
  169. package/src/credential/issuance/06-obtain-credential.ts +77 -111
  170. package/src/credential/issuance/07-verify-and-parse-credential.ts +30 -67
  171. package/src/credential/issuance/index.ts +6 -4
  172. package/src/credential/issuance/types.ts +25 -0
  173. package/src/index.ts +2 -1
  174. package/src/pid/sd-jwt/converters.ts +5 -11
  175. package/src/pid/sd-jwt/types.ts +8 -6
  176. package/src/sd-jwt/__test__/converters.test.ts +1 -1
  177. package/src/sd-jwt/__test__/index.test.ts +45 -74
  178. package/src/sd-jwt/__test__/types.test.ts +21 -33
  179. package/src/sd-jwt/index.ts +3 -12
  180. package/src/sd-jwt/types.ts +17 -22
  181. package/src/trust/types.ts +64 -32
  182. package/src/utils/auth.ts +37 -0
  183. package/src/utils/errors.ts +85 -1
  184. package/src/utils/integrity.ts +1 -1
  185. package/src/utils/misc.ts +43 -0
  186. package/src/utils/par.ts +29 -17
  187. package/src/utils/pop.ts +34 -0
  188. package/src/wallet-instance-attestation/issuing.ts +39 -2
  189. package/src/wallet-instance-attestation/types.ts +11 -7
  190. package/lib/commonjs/credential/issuance/07-confirm-credential.js +0 -6
  191. package/lib/commonjs/credential/issuance/07-confirm-credential.js.map +0 -1
  192. package/lib/commonjs/credential/issuance/08-confirm-credential.js +0 -6
  193. package/lib/commonjs/credential/issuance/08-confirm-credential.js.map +0 -1
  194. package/lib/module/credential/issuance/07-confirm-credential.js +0 -2
  195. package/lib/module/credential/issuance/07-confirm-credential.js.map +0 -1
  196. package/lib/module/credential/issuance/08-confirm-credential.js +0 -2
  197. package/lib/module/credential/issuance/08-confirm-credential.js.map +0 -1
  198. package/lib/typescript/credential/issuance/07-confirm-credential.d.ts +0 -11
  199. package/lib/typescript/credential/issuance/07-confirm-credential.d.ts.map +0 -1
  200. package/lib/typescript/credential/issuance/08-confirm-credential.d.ts +0 -11
  201. package/lib/typescript/credential/issuance/08-confirm-credential.d.ts.map +0 -1
  202. package/src/credential/issuance/07-confirm-credential.ts +0 -14
  203. package/src/credential/issuance/08-confirm-credential.ts +0 -14
  204. package/src/sd-jwt/__test__/converters.test.js +0 -24
  205. package/src/sd-jwt/verifier.js +0 -12
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","describe","it","token","header","typ","alg","kid","trust_chain","payload","iss","sub","jti","iat","exp","status","cnf","jwk","kty","use","n","e","type","verified_claims","verification","_sd","trust_framework","assurance_level","claims","_sd_alg","success","SdJwt4VC","safeParse","expect","toBe","value","record","source","organization_name","organization_id","country_code","Disclosure"],"sourceRoot":"../../../../src","sources":["sd-jwt/__test__/types.test.ts"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEAC,QAAQ,CAAC,UAAU,EAAE,MAAM;EACzBC,EAAE,CAAC,6BAA6B,EAAE,MAAM;IACtC;IACA,MAAMC,KAAK,GAAG;MACZC,MAAM,EAAE;QACNC,GAAG,EAAE,WAAW;QAChBC,GAAG,EAAE,OAAO;QACZC,GAAG,EAAE,6CAA6C;QAClDC,WAAW,EAAE,CACX,kCAAkC,EAClC,kCAAkC,EAClC,kCAAkC;MAEtC,CAAC;MACDC,OAAO,EAAE;QACPC,GAAG,EAAE,iCAAiC;QACtCC,GAAG,EAAE,sCAAsC;QAC3CC,GAAG,EAAE,+CAA+C;QACpDC,GAAG,EAAE,UAAU;QACfC,GAAG,EAAE,UAAU;QACfC,MAAM,EAAE,wCAAwC;QAChDC,GAAG,EAAE;UACHC,GAAG,EAAE;YACHC,GAAG,EAAE,KAAK;YACVC,GAAG,EAAE,KAAK;YACVC,CAAC,EAAE,UAAU;YACbC,CAAC,EAAE,MAAM;YACTd,GAAG,EAAE;UACP;QACF,CAAC;QACDe,IAAI,EAAE,0BAA0B;QAChCC,eAAe,EAAE;UACfC,YAAY,EAAE;YACZC,GAAG,EAAE,CAAC,6CAA6C,CAAC;YACpDC,eAAe,EAAE,OAAO;YACxBC,eAAe,EAAE;UACnB,CAAC;UACDC,MAAM,EAAE;YACNH,GAAG,EAAE,CACH,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C;UAEjD;QACF,CAAC;QACDI,OAAO,EAAE;MACX;IACF,CAAC;IAED,MAAM;MAAEC;IAAQ,CAAC,GAAGC,eAAQ,CAACC,SAAS,CAAC7B,KAAK,CAAC;IAE7C8B,MAAM,CAACH,OAAO,CAAC,CAACI,IAAI,CAAC,IAAI,CAAC;EAC5B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFjC,QAAQ,CAAC,YAAY,EAAE,MAAM;EAC3BC,EAAE,CAAC,kCAAkC,EAAE,MAAM;IAC3C;IACA,MAAMiC,KAAK,GAAG,CACZ,wBAAwB,EACxB,UAAU,EACV,CACE;MACEb,IAAI,EAAE,mBAAmB;MACzBc,MAAM,EAAE;QACNd,IAAI,EAAE,cAAc;QACpBe,MAAM,EAAE;UACNC,iBAAiB,EAAE,wBAAwB;UAC3CC,eAAe,EAAE,MAAM;UACvBC,YAAY,EAAE;QAChB;MACF;IACF,CAAC,CACF,CACF;IAED,MAAM;MAAEV;IAAQ,CAAC,GAAGW,iBAAU,CAACT,SAAS,CAACG,KAAK,CAAC;IAC/CF,MAAM,CAACH,OAAO,CAAC,CAACI,IAAI,CAAC,IAAI,CAAC;EAC5B,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["_types","require","describe","it","token","header","typ","alg","kid","payload","_sd","sub","_sd_alg","vct","iss","cnf","jwk","kty","crv","x","y","exp","status","status_attestation","credential_hash_alg","success","SdJwt4VC","safeParse","expect","toBe","value","type","record","source","organization_name","organization_id","country_code","Disclosure"],"sourceRoot":"../../../../src","sources":["sd-jwt/__test__/types.test.ts"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEAC,QAAQ,CAAC,UAAU,EAAE,MAAM;EACzBC,EAAE,CAAC,6BAA6B,EAAE,MAAM;IACtC;IACA,MAAMC,KAAK,GAAG;MACZC,MAAM,EAAE;QACNC,GAAG,EAAE,WAAW;QAChBC,GAAG,EAAE,OAAO;QACZC,GAAG,EAAE;MACP,CAAC;MACDC,OAAO,EAAE;QACPC,GAAG,EAAE,CACH,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,CAC9C;QACDC,GAAG,EAAE,sCAAsC;QAC3CC,OAAO,EAAE,SAAS;QAClBC,GAAG,EAAE,0BAA0B;QAC/BC,GAAG,EAAE,iCAAiC;QACtCC,GAAG,EAAE;UACHC,GAAG,EAAE;YACHC,GAAG,EAAE,IAAI;YACTC,GAAG,EAAE,OAAO;YACZV,GAAG,EAAE,6CAA6C;YAClDW,CAAC,EAAE,6CAA6C;YAChDC,CAAC,EAAE;UACL;QACF,CAAC;QACDC,GAAG,EAAE,UAAU;QACfC,MAAM,EAAE;UACNC,kBAAkB,EAAE;YAClBC,mBAAmB,EAAE;UACvB;QACF;MACF;IACF,CAAC;IAED,MAAM;MAAEC;IAAQ,CAAC,GAAGC,eAAQ,CAACC,SAAS,CAACvB,KAAK,CAAC;IAE7CwB,MAAM,CAACH,OAAO,CAAC,CAACI,IAAI,CAAC,IAAI,CAAC;EAC5B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF3B,QAAQ,CAAC,YAAY,EAAE,MAAM;EAC3BC,EAAE,CAAC,kCAAkC,EAAE,MAAM;IAC3C;IACA,MAAM2B,KAAK,GAAG,CACZ,wBAAwB,EACxB,UAAU,EACV,CACE;MACEC,IAAI,EAAE,mBAAmB;MACzBC,MAAM,EAAE;QACND,IAAI,EAAE,cAAc;QACpBE,MAAM,EAAE;UACNC,iBAAiB,EAAE,wBAAwB;UAC3CC,eAAe,EAAE,MAAM;UACvBC,YAAY,EAAE;QAChB;MACF;IACF,CAAC,CACF,CACF;IAED,MAAM;MAAEX;IAAQ,CAAC,GAAGY,iBAAU,CAACV,SAAS,CAACG,KAAK,CAAC;IAC/CF,MAAM,CAACH,OAAO,CAAC,CAACI,IAAI,CAAC,IAAI,CAAC;EAC5B,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -102,18 +102,12 @@ const disclose = async (token, claims) => {
102
102
 
103
103
  // _sd is defined in verified_claims.claims and verified_claims.verification
104
104
  // we must look into both
105
- if (sdJwt.payload.verified_claims.claims._sd.includes(hash)) {
106
- const index = sdJwt.payload.verified_claims.claims._sd.indexOf(hash);
105
+ if (sdJwt.payload._sd.includes(hash)) {
106
+ const index = sdJwt.payload._sd.indexOf(hash);
107
107
  return {
108
108
  claim,
109
109
  path: `verified_claims.claims._sd[${index}]`
110
110
  };
111
- } else if (sdJwt.payload.verified_claims.verification._sd.includes(hash)) {
112
- const index = sdJwt.payload.verified_claims.verification._sd.indexOf(hash);
113
- return {
114
- claim,
115
- path: `verified_claims.verification._sd[${index}]`
116
- };
117
111
  }
118
112
  throw new _errors.ClaimsNotFoundInToken(claim);
119
113
  }));
@@ -158,7 +152,7 @@ const verify = async (token, publicKey, customSchema) => {
158
152
  await (0, _ioReactNativeJwt.verify)(rawSdJwt, publicKey);
159
153
 
160
154
  //Check disclosures in sd-jwt
161
- const claims = [...decoded.sdJwt.payload.verified_claims.verification._sd, ...decoded.sdJwt.payload.verified_claims.claims._sd];
155
+ const claims = [...decoded.sdJwt.payload._sd];
162
156
  await Promise.all(decoded.disclosures.map(async disclosure => await (0, _verifier.verifyDisclosure)(disclosure, claims)));
163
157
  return {
164
158
  sdJwt: decoded.sdJwt,
@@ -1 +1 @@
1
- {"version":3,"names":["_ioReactNativeJwt","require","_types","_verifier","_errors","decodeDisclosure","encoded","decoded","Disclosure","parse","JSON","decodeBase64","decode","token","customSchema","slice","rawSdJwt","rawDisclosures","split","decodedJwt","decodeJwt","parser","SdJwt4VC","sdJwt","header","protectedHeader","payload","disclosures","map","exports","disclose","claims","paths","Promise","all","claim","disclosure","find","_ref","name","ClaimsNotFoundBetweenDislosures","hash","sha256ToBase64","verified_claims","_sd","includes","index","indexOf","path","verification","ClaimsNotFoundInToken","filteredDisclosures","filter","d","disclosedToken","join","verify","publicKey","verifyJwt","verifyDisclosure"],"sourceRoot":"../../../src","sources":["sd-jwt/index.ts"],"mappings":";;;;;;;;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAKA,MAAMI,gBAAgB,GAAIC,OAAe,IAA4B;EACnE,MAAMC,OAAO,GAAGC,iBAAU,CAACC,KAAK,CAACC,IAAI,CAACD,KAAK,CAAC,IAAAE,8BAAY,EAACL,OAAO,CAAC,CAAC,CAAC;EACnE,OAAO;IAAEC,OAAO;IAAED;EAAQ,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,MAAM,GAAGA,CACpBC,KAAa,EACbC,YAAgB,KAIb;EACH;EACA,IAAID,KAAK,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;IAC3BF,KAAK,GAAGA,KAAK,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAC5B;EACA,MAAM,CAACC,QAAQ,GAAG,EAAE,EAAE,GAAGC,cAAc,CAAC,GAAGJ,KAAK,CAACK,KAAK,CAAC,GAAG,CAAC;;EAE3D;EACA;EACA,MAAMC,UAAU,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4C,SAAsB,EACtB3C,YAAgB,KAC8C;EAC9D;EACA,MAAM,CAACE,QAAQ,GAAG,EAAE,CAAC,GAAGH,KAAK,CAACK,KAAK,CAAC,GAAG,CAAC;EACxC,MAAMX,OAAO,GAAGK,MAAM,CAACC,KAAK,EAAEC,YAAY,CAAC;;EAE3C;EACA,MAAM,IAAA4C,wBAAS,EAAC1C,QAAQ,EAAEyC,SAAS,CAAC;;EAEpC;EACA,MAAM1B,MAAM,GAAG,CACb,GAAGxB,OAAO,CAACgB,KAAK,CAACG,OAAO,CAACiB,eAAe,CAACM,YAAY,CAACL,GAAG,EACzD,GAAGrC,OAAO,CAACgB,KAAK,CAACG,OAAO,CAACiB,eAAe,CAACZ,MAAM,CAACa,GAAG,CACpD;EAED,MAAMX,OAAO,CAACC,GAAG,CACf3B,OAAO,CAACoB,WAAW,CAACC,GAAG,CACrB,MAAOQ,UAAU,IAAK,MAAM,IAAAuB,0BAAgB,EAACvB,UAAU,EAAEL,MAAM,CACjE,CACF,CAAC;EAED,OAAO;IACLR,KAAK,EAAEhB,OAAO,CAACgB,KAAK;IACpBI,WAAW,EAAEpB,OAAO,CAACoB,WAAW,CAACC,GAAG,CAAEyB,CAAC,IAAKA,CAAC,CAAC9C,OAAO;EACvD,CAAC;AACH,CAAC;AAACsB,OAAA,CAAA2B,MAAA,GAAAA,MAAA"}
1
+ {"version":3,"names":["_ioReactNativeJwt","require","_types","_verifier","_errors","decodeDisclosure","encoded","decoded","Disclosure","parse","JSON","decodeBase64","decode","token","customSchema","slice","rawSdJwt","rawDisclosures","split","decodedJwt","decodeJwt","parser","SdJwt4VC","sdJwt","header","protectedHeader","payload","disclosures","map","exports","disclose","claims","paths","Promise","all","claim","disclosure","find","_ref","name","ClaimsNotFoundBetweenDislosures","hash","sha256ToBase64","_sd","includes","index","indexOf","path","ClaimsNotFoundInToken","filteredDisclosures","filter","d","disclosedToken","join","verify","publicKey","verifyJwt","verifyDisclosure"],"sourceRoot":"../../../src","sources":["sd-jw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zod.z.object({
35
35
  typ: _zod.z.literal("vc+sd-jwt"),
36
36
  alg: _zod.z.string(),
37
- kid: _zod.z.string().optional(),
38
- trust_chain: _zod.z.array(_zod.z.string())
37
+ kid: _zod.z.string().optional()
39
38
  }),
40
- payload: _zod.z.object({
39
+ payload: _zod.z.intersection(_zod.z.object({
41
40
  iss: _zod.z.string(),
42
41
  sub: _zod.z.string(),
43
- jti: _zod.z.string(),
44
- iat: UnixTime,
42
+ iat: UnixTime.optional(),
45
43
  exp: UnixTime,
46
- status: _zod.z.string(),
44
+ _sd_alg: _zod.z.literal("sha-256"),
45
+ status: _zod.z.object({
46
+ status_attestation: _zod.z.object({
47
+ credential_hash_alg: _zod.z.literal("sha-256")
48
+ })
49
+ }),
47
50
  cnf: _zod.z.object({
48
51
  jwk: _jwk.JWK
49
52
  }),
50
- type: _zod.z.string(),
51
- verified_claims: _zod.z.object({
52
- verification: _zod.z.intersection(_zod.z.object({
53
- trust_framework: _zod.z.literal("eidas"),
54
- assurance_level: _zod.z.string()
55
- }), ObfuscatedDisclosures),
56
- claims: ObfuscatedDisclosures
57
- }),
58
- _sd_alg: _zod.z.literal("sha-256")
59
- })
53
+ vct: _zod.z.string()
54
+ }), ObfuscatedDisclosures)
60
55
  });
61
56
  exports.SdJwt4VC = SdJwt4VC;
62
57
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_jwk","require","_zod","UnixTime","z","number","min","max","exports","ObfuscatedDisclosures","object","_sd","array","string","Disclosure","tuple","unknown","SdJwt4VC","header","typ","literal","alg","kid","optional","trust_chain","payload","iss","sub","jti","iat","exp","status","cnf","jwk","JWK","type","verified_claims","verification","intersection","trust_framework","assurance_level","claims","_sd_alg"],"sourceRoot":"../../../src","sources":["sd-jwt/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAEO,MAAME,QAAQ,GAAGC,MAAC,CAACC,MAAM,CAAC,CA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Q;IACb4B,MAAM,EAAE3B,MAAC,CAACS,MAAM,CAAC,CAAC;IAClBmB,GAAG,EAAE5B,MAAC,CAACM,MAAM,CAAC;MACZuB,GAAG,EAAEC;IACP,CAAC,CAAC;IACFC,IAAI,EAAE/B,MAAC,CAACS,MAAM,CAAC,CAAC;IAChBuB,eAAe,EAAEhC,MAAC,CAACM,MAAM,CAAC;MACxB2B,YAAY,EAAEjC,MAAC,CAACkC,YAAY,CAC1BlC,MAAC,CAACM,MAAM,CAAC;QACP6B,eAAe,EAAEnC,MAAC,CAACgB,OAAO,CAAC,OAAO,CAAC;QACnCoB,eAAe,EAAEpC,MAAC,CAACS,MAAM,CAAC;MAC5B,CAAC,CAAC,EACFJ,qBACF,CAAC;MACDgC,MAAM,EAAEhC;IACV,CAAC,CAAC;IACFiC,OAAO,EAAEtC,MAAC,CAACgB,OAAO,CAAC,SAAS;EAC9B,CAAC;AACH,CAAC,CAAC;AAACZ,OAAA,CAAAS,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"names":["_jwk","require","_zod","UnixTime","z","number","min","max","exports","ObfuscatedDisclosures","object","_sd","array","string","Disclosure","tuple","unknown","SdJwt4VC","header","typ","literal","alg","kid","optional","payload","intersection","iss","sub","iat","exp","_sd_alg","status","status_attestation","credential_hash_alg","cnf","jwk","JWK","vct"],"sourceRoot":"../../../src","sources":["sd-jwt/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAEO,MAAME,QAAQ,GAAGC,MAAC,CAACC,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,aAAa,CAAC;AAACC,OAAA,CAAAL,QAAA,GAAAA,QAAA;AAItD,MAAMM,qBAAqB,GAAGL,MAAC,CAACM,MAAM,CAAC;EAAEC,GAAG,EAAEP,MAAC,CAACQ,KAAK,CAACR,MAAC,CAACS,MAAM,CAAC,CAAC;AAAE,CAAC,CAA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;IACFC,GAAG,EAAEjC,MAAC,CAACS,MAAM,CAAC;EAChB,CAAC,CAAC,EACFJ,qBACF;AACF,CAAC,CAAC;AAACD,OAAA,CAAAS,QAAA,GAAAA,QAAA"}
@@ -33,30 +33,40 @@ const CredentialDisplayMetadata = z.object({
33
33
  logo: z.object({
34
34
  url: z.string(),
35
35
  alt_text: z.string()
36
- }),
37
- background_color: z.string(),
38
- text_color: z.string()
36
+ }).optional(),
37
+ // TODO [SIW-1268]: should not be optional
38
+ background_color: z.string().optional(),
39
+ // TODO [SIW-1268]: should not be optional
40
+ text_color: z.string().optional() // TODO [SIW-1268]: should not be optional
39
41
  });
40
- const CredentialDefinitionMetadata = z.object({
41
- type: z.array(z.string()),
42
- credentialSubject: z.record(z.object({
43
- mandatory: z.boolean(),
44
- display: z.array(z.object({
45
- name: z.string(),
46
- locale: z.string()
47
- }))
48
- }))
42
+
43
+ // Metadata for displaying issuer information
44
+
45
+ const CredentialIssuerDisplayMetadata = z.object({
46
+ name: z.string(),
47
+ locale: z.string(),
48
+ logo: z.object({
49
+ url: z.string(),
50
+ alt_text: z.string()
51
+ })
49
52
  });
53
+ const ClaimsMetadata = z.record(z.object({
54
+ value_type: z.string(),
55
+ display: z.array(z.object({
56
+ name: z.string(),
57
+ locale: z.string()
58
+ }))
59
+ }));
50
60
 
51
61
  // Metadata for a credentia which i supported by a Issuer
52
62
 
53
63
  const SupportedCredentialMetadata = z.object({
54
- id: z.string(),
55
64
  format: z.union([z.literal("vc+sd-jwt"), z.literal("vc+mdoc-cbor")]),
56
- cryptographic_binding_methods_supported: z.array(z.string()),
57
- cryptographic_suites_supported: z.array(z.string()),
65
+ scope: z.string(),
58
66
  display: z.array(CredentialDisplayMetadata),
59
- credential_definition: CredentialDefinitionMetadata
67
+ claims: ClaimsMetadata,
68
+ cryptographic_binding_methods_supported: z.array(z.string()),
69
+ credential_signing_alg_values_supported: z.array(z.string())
60
70
  });
61
71
  const EntityStatement = z.object({
62
72
  header: z.object({
@@ -103,17 +113,17 @@ const FederationEntityMetadata = z.object({
103
113
  const BaseEntityConfiguration = z.object({
104
114
  header: EntityConfigurationHeader,
105
115
  payload: z.object({
106
- exp: _types.UnixTime,
107
- iat: _types.UnixTime,
108
116
  iss: z.string(),
109
117
  sub: z.string(),
110
- jwks: z.object({
111
- keys: z.array(_jwk.JWK)
112
- }),
118
+ iat: _types.UnixTime,
119
+ exp: _types.UnixTime,
120
+ authority_hints: z.array(z.string()).optional(),
113
121
  metadata: z.object({
114
122
  federation_entity: FederationEntityMetadata
115
123
  }).passthrough(),
116
- authority_hints: z.array(z.string()).optional()
124
+ jwks: z.object({
125
+ keys: z.array(_jwk.JWK)
126
+ })
117
127
  }).passthrough()
118
128
  });
119
129
 
@@ -131,20 +141,51 @@ const CredentialIssuerEntityConfiguration = BaseEntityConfiguration.and(z.object
131
141
  metadata: z.object({
132
142
  openid_credential_issuer: z.object({
133
143
  credential_issuer: z.string(),
134
- authorization_endpoint: z.string(),
135
- token_endpoint: z.string(),
136
- pushed_authorization_request_endpoint: z.string(),
137
- dpop_signing_alg_values_supported: z.array(z.string()),
138
144
  credential_endpoint: z.string(),
139
- credentials_supported: z.array(SupportedCredentialMetadata),
145
+ revocation_endpoint: z.string(),
146
+ status_attestation_endpoint: z.string(),
147
+ display: z.array(CredentialIssuerDisplayMetadata),
148
+ credential_configurations_supported: z.record(SupportedCredentialMetadata),
140
149
  jwks: z.object({
141
150
  keys: z.array(_jwk.JWK)
142
151
  })
143
152
  }),
153
+ oauth_authorization_server: z.object({
154
+ authorization_endpoint: z.string(),
155
+ pushed_authorization_request_endpoint: z.string(),
156
+ dpop_signing_alg_values_supported: z.array(z.string()).optional(),
157
+ // TODO [SIW-1268]: should not be optional
158
+ token_endpoint: z.string(),
159
+ introspection_endpoint: z.string().optional(),
160
+ // TODO [SIW-1268]: should not be optional
161
+ client_registration_types_supported: z.array(z.string()),
162
+ code_challenge_methods_supported: z.array(z.string()),
163
+ authorization_details_types_supported: z.array(z.string()).optional(),
164
+ // TODO [SIW-1268]: should not be optional,
165
+ acr_values_supported: z.array(z.string()),
166
+ grant_types_supported: z.array(z.string()),
167
+ issuer: z.string(),
168
+ jwks: z.object({
169
+ keys: z.array(_jwk.JWK)
170
+ }),
171
+ scopes_supported: z.array(z.string()),
172
+ request_parameter_supported: z.boolean().optional(),
173
+ // TODO [SIW-1268]: should not be optional
174
+ request_uri_parameter_supported: z.boolean().optional(),
175
+ // TODO [SIW-1268]: should not be optional
176
+ response_types_supported: z.array(z.string()).optional(),
177
+ // TODO [SIW-1268]: should not be optional
178
+ response_modes_supported: z.array(z.string()),
179
+ subject_types_supported: z.array(z.string()).optional(),
180
+ // TODO [SIW-1268]: should not be optional
181
+ token_endpoint_auth_methods_supported: z.array(z.string()),
182
+ token_endpoint_auth_signing_alg_values_supported: z.array(z.string()),
183
+ request_object_signing_alg_values_supported: z.array(z.string())
184
+ }),
144
185
  /** Credential Issuers act as Relying Party
145
186
  when they require the presentation of other credentials.
146
187
  This does not apply for PID issuance, which requires CIE authz. */
147
- wallet_relying_party: RelyingPartyMetadata.optional()
188
+ openid_relying_party: RelyingPartyMetadata.optional()
148
189
  })
149
190
  })
150
191
  }));
@@ -166,7 +207,7 @@ const WalletProviderEntityConfiguration = BaseEntityConfiguration.and(z.object({
166
207
  metadata: z.object({
167
208
  wallet_provider: z.object({
168
209
  token_endpoint: z.string(),
169
- attested_security_context_values_supported: z.array(z.string()).optional(),
210
+ aal_values_supported: z.array(z.string()).optional(),
170
211
  grant_types_supported: z.array(z.string()),
171
212
  token_endpoint_auth_methods_supported: z.array(z.string()),
172
213
  token_endpoint_auth_signing_alg_values_supported: z.array(z.string()),
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TrustMark","object","id","string","trust_mark","exports","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","JWK","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialDefinitionMetadata","type","credentialSubject","record","mandatory","boolean","display","SupportedCredentialMetadata","format","union","literal","cryptographic_binding_methods_supported","cryptographic_suites_supported","credential_definition","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","UnixTime","metadata","federation_entity","authority_hints","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","authorization_endpoint","token_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","credential_endpoint","credentials_supported","wallet_relying_party","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","attested_security_context_values_supported","grant_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","EntityConfiguration","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,CAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAyB,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA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,QAAQ,EAAExF,CAAC,CAACyB,MAAM,CAAC;MACjBgF,eAAe,EAAEzG,CAAC,CACfyB,MAAM,CAAC;QACNwE,cAAc,EAAEjG,CAAC,CAAC2B,MAAM,CAAC,CAAC;QAC1B+E,0CAA0C,EAAE1G,CAAC,CAC1CqC,KAAK,CAACrC,CAAC,CAAC2B,MAAM,CAAC,CAAC,CAAC,CACjBK,QAAQ,CAAC,CAAC;QACb2E,qBAAqB,EAAE3G,CAAC,CAACqC,KAAK,CAACrC,CAAC,CAAC2B,MAAM,CAAC,CAAC,CAAC;QAC1CiF,qCAAqC,EAAE5G,CAAC,CAACqC,KAAK,CAACrC,CAAC,CAAC2B,MAAM,CAAC,CAAC,CAAC;QAC1DkF,gDAAgD,EAAE7G,CAAC,CAACqC,KAAK,CACvDrC,CAAC,CAAC2B,MAAM,CAAC,CACX,CAAC;QACDQ,IAAI,EAAEnC,CAAC,CAACyB,MAAM,CAAC;UAAEW,IAAI,EAAEpC,CAAC,CAACqC,KAAK,CAACC,QAAG;QAAE,CAAC;MACvC,CAAC,CAAC,CACD+C,WAAW,CAAC;IACjB,CAAC;EACH,CAAC;AACH,CAAC,CACH,CAAC;;AAED;AAAAxD,OAAA,CAAA2E,iCAAA,GAAAA,iCAAA;AAEO,MAAMM,mBAAmB,GAAG9G,CAAC,CAACyD,KAAK,CACxC,CACE+C,iCAAiC,EACjCZ,mCAAmC,EACnCD,8BAA8B,EAC9BY,+BAA+B,CAChC,EACD;EACEQ,WAAW,EAAE;AACf,CACF,CAAC;AAAClF,OAAA,CAAAiF,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TrustMark","object","id","string","trust_mark","exports","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","JWK","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialIssuerDisplayMetadata","ClaimsMetadata","record","value_type","display","SupportedCredentialMetadata","format","union","literal","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","UnixTime","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","status_attestation_endpoint","credential_configurations_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","token_endpoint","introspection_endpoint","client_registration_types_supported","code_challenge_methods_supported","authorization_details_types_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","request_parameter_supported","boolean","request_uri_parameter_supported","response_types_supported","response_modes_supported","subject_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","openid_relying_party","RelyingPartyEntityConfiguration","wallet_relying_party","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,CAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAyB,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA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AC,CAAC;QAC1BmG,oBAAoB,EAAE9H,CAAC,CAACqC,KAAK,CAACrC,CAAC,CAAC2B,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CAAC,CAAC;QACpD6E,qBAAqB,EAAE7G,CAAC,CAACqC,KAAK,CAACrC,CAAC,CAAC2B,MAAM,CAAC,CAAC,CAAC;QAC1C2F,qCAAqC,EAAEtH,CAAC,CAACqC,KAAK,CAACrC,CAAC,CAAC2B,MAAM,CAAC,CAAC,CAAC;QAC1D4F,gDAAgD,EAAEvH,CAAC,CAACqC,KAAK,CACvDrC,CAAC,CAAC2B,MAAM,CAAC,CACX,CAAC;QACDQ,IAAI,EAAEnC,CAAC,CAACyB,MAAM,CAAC;UAAEW,IAAI,EAAEpC,CAAC,CAACqC,KAAK,CAACC,QAAG;QAAE,CAAC;MACvC,CAAC,CAAC,CACD8C,WAAW,CAAC;IACjB,CAAC;EACH,CAAC;AACH,CAAC,CACH,CAAC;;AAED;AAAAvD,OAAA,CAAA+F,iCAAA,GAAAA,iCAAA;AAEO,MAAMG,mBAAmB,GAAG/H,CAAC,CAACuD,KAAK,CACxC,CACEqE,iCAAiC,EACjCjC,mCAAmC,EACnCD,8BAA8B,EAC9BgC,+BAA+B,CAChC,EACD;EACEM,WAAW,EAAE;AACf,CACF,CAAC;AAACnG,OAAA,CAAAkG,mBAAA,GAAAA,mBAAA"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AuthorizationResultShape = exports.AuthorizationErrorShape = void 0;
7
+ var z = _interopRequireWildcard(require("zod"));
8
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ /**
11
+ * Context for authorization during the {@link 03-start-user-authorization.ts} phase.
12
+ * It consists of a single method to identify the user which takes a URL and a redirect schema as input.
13
+ * Once the authorization is completed and the URL calls the redirect schema, the method should return the redirect URL.
14
+ */
15
+
16
+ /**
17
+ * The result of the identification process.
18
+ */
19
+ const AuthorizationResultShape = z.object({
20
+ code: z.string(),
21
+ state: z.string(),
22
+ iss: z.string().optional()
23
+ });
24
+
25
+ /**
26
+ * The error of the identification process.
27
+ * It follows the OAuth/OIDC error response format.
28
+ * @see https://openid.net/specs/openid-connect-core-1_0.html#AuthError
29
+ * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1
30
+ */
31
+ exports.AuthorizationResultShape = AuthorizationResultShape;
32
+ const AuthorizationErrorShape = z.object({
33
+ error: z.string(),
34
+ // not enforcing the error code format
35
+ error_description: z.string().optional(),
36
+ error_uri: z.string().optional(),
37
+ state: z.string().optional()
38
+ });
39
+
40
+ /**
41
+ * Type of the identification result.
42
+ */
43
+ exports.AuthorizationErrorShape = AuthorizationErrorShape;
44
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["z","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","AuthorizationResultShape","object","code","string","state","iss","optional","exports","AuthorizationErrorShape","error","error_description","error_uri"],"sourceRoot":"../../../src","sources":["utils/auth.ts"],"mappings":";;;;;;AAAA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAyB,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAEzB;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACO,MAAMW,wBAAwB,GAAGzB,CAAC,CAAC0B,MAAM,CAAC;EAC/CC,IAAI,EAAE3B,CAAC,CAAC4B,MAAM,CAAC,CAAC;EAChBC,KAAK,EAAE7B,CAAC,CAAC4B,MAAM,CAAC,CAAC;EACjBE,GAAG,EAAE9B,CAAC,CAAC4B,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC;AAC3B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AALAC,OAAA,CAAAP,wBAAA,GAAAA,wBAAA;AAMO,MAAMQ,uBAAuB,GAAGjC,CAAC,CAAC0B,MAAM,CAAC;EAC9CQ,KAAK,EAAElC,CAAC,CAAC4B,MAAM,CAAC,CAAC;EAAE;EACnBO,iBAAiB,EAAEnC,CAAC,CAAC4B,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EACxCK,SAAS,EAAEpC,CAAC,CAAC4B,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAChCF,KAAK,EAAE7B,CAAC,CAAC4B,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC;AAC7B,CAAC,CAAC;;AAEF;AACA;AACA;AAFAC,OAAA,CAAAC,uBAAA,GAAAA,uBAAA"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WalletProviderResponseError = exports.WalletInstanceAttestationIssuingError = exports.ValidationFailed = exports.PidMetadataError = exports.PidIssuingError = exports.NoSuitableKeysFoundInEntityConfiguration = exports.IoWalletError = exports.ClaimsNotFoundInToken = exports.ClaimsNotFoundBetweenDislosures = exports.AuthRequestDecodeError = void 0;
6
+ exports.WalletProviderResponseError = exports.WalletInstanceRevokedError = exports.WalletInstanceNotFoundError = exports.WalletInstanceAttestationIssuingError = exports.ValidationFailed = exports.PidMetadataError = exports.PidIssuingError = exports.NoSuitableKeysFoundInEntityConfiguration = exports.IoWalletError = exports.ClaimsNotFoundInToken = exports.ClaimsNotFoundBetweenDislosures = exports.AuthorizationIdpError = exports.AuthorizationError = exports.AuthRequestDecodeError = void 0;
7
7
  /**
8
8
  * utility to format a set of attributes into an error message string
9
9
  *
@@ -248,17 +248,92 @@ class WalletProviderResponseError extends IoWalletError {
248
248
 
249
249
  /** Reason code for the validation failure. */
250
250
 
251
+ /** HTTP status code */
252
+
251
253
  constructor(message) {
252
254
  let claim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "unspecified";
253
255
  let reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "unspecified";
256
+ let statusCode = arguments.length > 3 ? arguments[3] : undefined;
254
257
  super(serializeAttrs({
255
258
  message,
256
259
  claim,
257
- reason
260
+ reason,
261
+ statusCode: statusCode.toString()
258
262
  }));
259
263
  this.claim = claim;
260
264
  this.reason = reason;
265
+ this.statusCode = statusCode;
261
266
  }
262
267
  }
263
268
  exports.WalletProviderResponseError = WalletProviderResponseError;
269
+ class WalletInstanceRevokedError extends IoWalletError {
270
+ static get code() {
271
+ return "ERR_IO_WALLET_INSTANCE_REVOKED";
272
+ }
273
+ code = "ERR_IO_WALLET_INSTANCE_REVOKED";
274
+ constructor(message, claim) {
275
+ let reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "unspecified";
276
+ super(serializeAttrs({
277
+ message,
278
+ claim,
279
+ reason
280
+ }));
281
+ this.reason = reason;
282
+ this.claim = claim;
283
+ }
284
+ }
285
+ exports.WalletInstanceRevokedError = WalletInstanceRevokedError;
286
+ class WalletInstanceNotFoundError extends IoWalletError {
287
+ static get code() {
288
+ return "ERR_IO_WALLET_INSTANCE_NOT_FOUND";
289
+ }
290
+ code = "ERR_IO_WALLET_INSTANCE_NOT_FOUND";
291
+ constructor(message, claim) {
292
+ let reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "unspecified";
293
+ super(serializeAttrs({
294
+ message,
295
+ claim,
296
+ reason
297
+ }));
298
+ this.reason = reason;
299
+ this.claim = claim;
300
+ }
301
+ }
302
+
303
+ /**
304
+ * An error subclass thrown when an error occurs during the authorization process.
305
+ */
306
+ exports.WalletInstanceNotFoundError = WalletInstanceNotFoundError;
307
+ class AuthorizationError extends IoWalletError {
308
+ static get code() {
309
+ return "ERR_IO_WALLET_AUTHORIZATION_ERROR";
310
+ }
311
+ code = "ERR_IO_WALLET_AUTHORIZATION_ERROR";
312
+ constructor(message) {
313
+ super(message);
314
+ }
315
+ }
316
+
317
+ /**
318
+ * An error subclass thrown when an error occurs during the authorization process with the IDP.
319
+ * It contains the error and error description returned by the IDP.
320
+ */
321
+ exports.AuthorizationError = AuthorizationError;
322
+ class AuthorizationIdpError extends IoWalletError {
323
+ static get code() {
324
+ return "ERR_IO_WALLET_IDENTIFICATION_RESPONSE_ERROR";
325
+ }
326
+ code = "ERR_IO_WALLET_IDENTIFICATION_RESPONSE_PARSING_FAILED";
327
+ constructor(error, errorDescription) {
328
+ super(serializeAttrs(errorDescription ? {
329
+ error,
330
+ errorDescription
331
+ } : {
332
+ error
333
+ }));
334
+ this.error = error;
335
+ this.errorDescription = errorDescription;
336
+ }
337
+ }
338
+ exports.AuthorizationIdpError = AuthorizationIdpError;
264
339
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","exports","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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CAACA,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AAHAK,OAAA,CAAAgB,gBAAA,GAAAA,gBAAA;AAIO,MAAMC,2BAA2B,SAAS1B,aAAa,CAAC;EAC7D,WAAWE,IAAIA,CAAA,EAA6C;IAC1D,OAAO,wCAAwC;EACjD;EAEAA,IAAI,GAAG,wCAAwC;;EAE/C;;EAGA;;EAGAC,WAAWA,CACTC,OAAe,EAGf;IAAA,IAFAO,KAAa,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAAA,IAC7BG,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAE9B,KAAK,CAACxB,cAAc,CAAC;MAAEgB,OAAO;MAAEO,KAAK;MAAEI;IAAO,CAAC,CAAC,CAAC;IACjD,IAAI,CAACJ,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACI,MAAM,GAAGA,MAAM;EACtB;AACF;AAACN,OAAA,CAAAiB,2BAAA,GAAAA,2BAAA"}
1
+ {"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","exports","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError","statusCode","toString","WalletInstanceRevokedError","WalletInstanceNotFoundError","AuthorizationError","AuthorizationIdpError","error","errorDescription"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,cAAc,GAAIC,KAAsC,IAC5DC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC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AuB,qBAAA,GAAAA,qBAAA"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.hasStatus = void 0;
6
+ exports.until = exports.hasStatus = exports.generateRandomAlphaNumericString = void 0;
7
7
  var _errors = require("./errors");
8
8
  /**
9
9
  * Check if a response is in the expected status, other
@@ -20,4 +20,37 @@ const hasStatus = status => async res => {
20
20
  // extract a type from an async function output
21
21
  // helpful to bind the input of a function to the output of another
22
22
  exports.hasStatus = hasStatus;
23
+ /**
24
+ * TODO [SIW-1310]: replace this function with a cryptographically secure one.
25
+ * @param size - The size of the string to generate
26
+ * @returns A random alphanumeric string of the given size
27
+ */
28
+ const generateRandomAlphaNumericString = size => Array.from(Array(size), () => Math.floor(Math.random() * 36).toString(36)).join("");
29
+
30
+ /**
31
+ * Repeatedly checks a condition function until it returns true,
32
+ * then resolves the returned promise. If the condition function does not return true
33
+ * within the specified timeout, the promise is rejected.
34
+ *
35
+ * @param conditionFunction - A function that returns a boolean value.
36
+ * The promise resolves when this function returns true.
37
+ * @param timeout - An optional timeout in seconds. The promise is rejected if the
38
+ * condition function does not return true within this time.
39
+ * @returns A promise that resolves once the conditionFunction returns true or rejects if timed out.
40
+ */
41
+ exports.generateRandomAlphaNumericString = generateRandomAlphaNumericString;
42
+ const until = (conditionFunction, timeoutSeconds) => new Promise((resolve, reject) => {
43
+ const start = Date.now();
44
+ const poll = () => {
45
+ if (conditionFunction()) {
46
+ resolve();
47
+ } else if (timeoutSeconds !== undefined && Date.now() - start >= timeoutSeconds * 1000) {
48
+ reject(new Error("Timeout exceeded"));
49
+ } else {
50
+ setTimeout(poll, 400);
51
+ }
52
+ };
53
+ poll();
54
+ });
55
+ exports.until = until;
23
56
  //# sourceMappingURL=misc.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_errors","require","hasStatus","status","res","IoWalletError","url","text","exports"],"sourceRoot":"../../../src","sources":["utils/misc.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GACnBC,MAAc,IACf,MAAOC,GAAa,IAAwB;EAC1C,IAAIA,GAAG,CAACD,MAAM,KAAKA,MAAM,EAAE;IACzB,MAAM,IAAIE,qBAAa,CACpB,iCAAgCF,MAAO,SAAQC,GAAG,CAACD,MAAO,UACzDC,GAAG,CAACE,GACL,mBAAkB,MAAMF,GAAG,CAACG,IAAI,CAAC,CAAE,EACtC,CAAC;EACH;EACA,OAAOH,GAAG;AACZ,CAAC;;AAEH;AACA;AAAAI,OAAA,CAAAN,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_errors","require","hasStatus","status","res","IoWalletError","url","text","exports","generateRandomAlphaNumericString","size","Array","from","Math","floor","random","toString","join","until","conditionFunction","timeoutSeconds","Promise","resolve","reject","start","Date","now","poll","undefined","Error","setTimeout"],"sourceRoot":"../../../src","sources":["utils/misc.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GACnBC,MAAc,IACf,MAAOC,GAAa,IAAwB;EAC1C,IAAIA,GAAG,CAACD,MAAM,KAAKA,MAAM,EAAE;IACzB,MAAM,IAAIE,qBAAa,CACpB,iCAAgCF,MAAO,SAAQC,GAAG,CAACD,MAAO,UACzDC,GAAG,CAACE,GACL,mBAAkB,MAAMF,GAAG,CAACG,IAAI,CAAC,CAAE,EACtC,CAAC;EACH;EACA,OAAOH,GAAG;AACZ,CAAC;;AAEH;AACA;AAAAI,OAAA,CAAAN,SAAA,GAAAA,SAAA;AAOA;AACA;AACA;AACA;AACA;AACO,MAAMO,gCAAgC,GAAIC,IAAY,IAC3DC,KAAK,CAACC,IAAI,CAACD,KAAK,CAACD,IAAI,CAAC,EAAE,MACtBG,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,CAACC,QAAQ,CAAC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