@simplewebauthn/server 11.0.0 → 13.0.0-alpha1

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 (372) hide show
  1. package/README.md +11 -12
  2. package/esm/authentication/generateAuthenticationOptions.d.ts +14 -13
  3. package/esm/authentication/generateAuthenticationOptions.d.ts.map +1 -0
  4. package/esm/authentication/verifyAuthenticationResponse.d.ts +19 -15
  5. package/esm/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
  6. package/esm/helpers/convertAAGUIDToString.d.ts +1 -0
  7. package/esm/helpers/convertAAGUIDToString.d.ts.map +1 -0
  8. package/esm/helpers/convertAAGUIDToString.js +4 -4
  9. package/esm/helpers/convertCOSEtoPKCS.d.ts +1 -0
  10. package/esm/helpers/convertCOSEtoPKCS.d.ts.map +1 -0
  11. package/esm/helpers/convertCertBufferToPEM.d.ts +2 -1
  12. package/esm/helpers/convertCertBufferToPEM.d.ts.map +1 -0
  13. package/esm/helpers/convertPEMToBytes.d.ts +1 -0
  14. package/esm/helpers/convertPEMToBytes.d.ts.map +1 -0
  15. package/esm/helpers/convertX509PublicKeyToCOSE.d.ts +1 -0
  16. package/esm/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -0
  17. package/esm/helpers/convertX509PublicKeyToCOSE.js +4 -1
  18. package/esm/helpers/cose.d.ts +23 -0
  19. package/esm/helpers/cose.d.ts.map +1 -0
  20. package/esm/helpers/cose.js +20 -0
  21. package/esm/helpers/decodeAttestationObject.d.ts +5 -0
  22. package/esm/helpers/decodeAttestationObject.d.ts.map +1 -0
  23. package/esm/helpers/decodeAttestationObject.js +4 -1
  24. package/esm/helpers/decodeAuthenticatorExtensions.d.ts +1 -0
  25. package/esm/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
  26. package/esm/helpers/decodeClientDataJSON.d.ts +6 -1
  27. package/esm/helpers/decodeClientDataJSON.d.ts.map +1 -0
  28. package/esm/helpers/decodeClientDataJSON.js +4 -1
  29. package/esm/helpers/decodeCredentialPublicKey.d.ts +5 -0
  30. package/esm/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
  31. package/esm/helpers/decodeCredentialPublicKey.js +4 -1
  32. package/esm/helpers/fetch.d.ts +5 -0
  33. package/esm/helpers/fetch.d.ts.map +1 -0
  34. package/esm/helpers/fetch.js +5 -2
  35. package/esm/helpers/generateChallenge.d.ts +5 -0
  36. package/esm/helpers/generateChallenge.d.ts.map +1 -0
  37. package/esm/helpers/generateChallenge.js +4 -1
  38. package/esm/helpers/generateUserID.d.ts +5 -0
  39. package/esm/helpers/generateUserID.d.ts.map +1 -0
  40. package/esm/helpers/generateUserID.js +4 -1
  41. package/esm/helpers/getCertificateInfo.d.ts +2 -1
  42. package/esm/helpers/getCertificateInfo.d.ts.map +1 -0
  43. package/esm/helpers/getCertificateInfo.js +2 -1
  44. package/esm/helpers/index.d.ts +17 -23
  45. package/esm/helpers/index.d.ts.map +1 -0
  46. package/esm/helpers/index.js +16 -17
  47. package/esm/helpers/isCertRevoked.d.ts +2 -1
  48. package/esm/helpers/isCertRevoked.d.ts.map +1 -0
  49. package/esm/helpers/isCertRevoked.js +2 -1
  50. package/esm/helpers/iso/index.d.ts +1 -0
  51. package/esm/helpers/iso/index.d.ts.map +1 -0
  52. package/esm/helpers/iso/isoBase64URL.d.ts +2 -1
  53. package/esm/helpers/iso/isoBase64URL.d.ts.map +1 -0
  54. package/esm/helpers/iso/isoBase64URL.js +5 -1
  55. package/esm/helpers/iso/isoCBOR.d.ts +6 -1
  56. package/esm/helpers/iso/isoCBOR.d.ts.map +1 -0
  57. package/esm/helpers/iso/isoCBOR.js +5 -1
  58. package/esm/helpers/iso/isoCrypto/digest.d.ts +1 -0
  59. package/esm/helpers/iso/isoCrypto/digest.d.ts.map +1 -0
  60. package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts +1 -0
  61. package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -0
  62. package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts +2 -1
  63. package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -0
  64. package/esm/helpers/iso/isoCrypto/importKey.d.ts +1 -0
  65. package/esm/helpers/iso/isoCrypto/importKey.d.ts.map +1 -0
  66. package/esm/helpers/iso/isoCrypto/index.d.ts +5 -0
  67. package/esm/helpers/iso/isoCrypto/index.d.ts.map +1 -0
  68. package/esm/helpers/iso/isoCrypto/index.js +4 -0
  69. package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts +1 -0
  70. package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts.map +1 -0
  71. package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts +1 -0
  72. package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts.map +1 -0
  73. package/esm/helpers/iso/isoCrypto/structs.d.ts +1 -0
  74. package/esm/helpers/iso/isoCrypto/structs.d.ts.map +1 -0
  75. package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +1 -0
  76. package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
  77. package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.js +2 -1
  78. package/esm/helpers/iso/isoCrypto/verify.d.ts +1 -0
  79. package/esm/helpers/iso/isoCrypto/verify.d.ts.map +1 -0
  80. package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts +1 -0
  81. package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -0
  82. package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts +1 -0
  83. package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -0
  84. package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts +1 -0
  85. package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -0
  86. package/esm/helpers/iso/isoUint8Array.d.ts +5 -0
  87. package/esm/helpers/iso/isoUint8Array.d.ts.map +1 -0
  88. package/esm/helpers/iso/isoUint8Array.js +4 -0
  89. package/esm/helpers/logging.d.ts +1 -0
  90. package/esm/helpers/logging.d.ts.map +1 -0
  91. package/esm/helpers/logging.js +0 -1
  92. package/esm/helpers/mapX509SignatureAlgToCOSEAlg.d.ts +1 -0
  93. package/esm/helpers/mapX509SignatureAlgToCOSEAlg.d.ts.map +1 -0
  94. package/esm/helpers/matchExpectedRPID.d.ts +1 -0
  95. package/esm/helpers/matchExpectedRPID.d.ts.map +1 -0
  96. package/esm/helpers/parseAuthenticatorData.d.ts +5 -0
  97. package/esm/helpers/parseAuthenticatorData.d.ts.map +1 -0
  98. package/esm/helpers/parseAuthenticatorData.js +10 -7
  99. package/esm/helpers/parseBackupFlags.d.ts +2 -1
  100. package/esm/helpers/parseBackupFlags.d.ts.map +1 -0
  101. package/esm/helpers/toHash.d.ts +1 -0
  102. package/esm/helpers/toHash.d.ts.map +1 -0
  103. package/esm/helpers/validateCertificatePath.d.ts +4 -3
  104. package/esm/helpers/validateCertificatePath.d.ts.map +1 -0
  105. package/esm/helpers/validateCertificatePath.js +82 -59
  106. package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts +2 -1
  107. package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
  108. package/esm/helpers/validateExtFIDOGenCEAAGUID.js +1 -1
  109. package/esm/helpers/verifySignature.d.ts +5 -0
  110. package/esm/helpers/verifySignature.d.ts.map +1 -0
  111. package/esm/helpers/verifySignature.js +4 -1
  112. package/esm/index.d.ts +9 -17
  113. package/esm/index.d.ts.map +1 -0
  114. package/esm/index.js +8 -11
  115. package/esm/metadata/mdsTypes.d.ts +6 -1
  116. package/esm/metadata/mdsTypes.d.ts.map +1 -0
  117. package/esm/metadata/parseJWT.d.ts +1 -0
  118. package/esm/metadata/parseJWT.d.ts.map +1 -0
  119. package/esm/metadata/verifyAttestationWithMetadata.d.ts +3 -2
  120. package/esm/metadata/verifyAttestationWithMetadata.d.ts.map +1 -0
  121. package/esm/metadata/verifyAttestationWithMetadata.js +1 -1
  122. package/esm/metadata/verifyJWT.d.ts +1 -0
  123. package/esm/metadata/verifyJWT.d.ts.map +1 -0
  124. package/esm/registration/generateRegistrationOptions.d.ts +22 -19
  125. package/esm/registration/generateRegistrationOptions.d.ts.map +1 -0
  126. package/esm/registration/generateRegistrationOptions.js +22 -1
  127. package/esm/registration/verifications/tpm/constants.d.ts +1 -0
  128. package/esm/registration/verifications/tpm/constants.d.ts.map +1 -0
  129. package/esm/registration/verifications/tpm/constants.js +4 -4
  130. package/esm/registration/verifications/tpm/parseCertInfo.d.ts +1 -0
  131. package/esm/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -0
  132. package/esm/registration/verifications/tpm/parsePubArea.d.ts +1 -0
  133. package/esm/registration/verifications/tpm/parsePubArea.d.ts.map +1 -0
  134. package/esm/registration/verifications/tpm/verifyAttestationTPM.d.ts +1 -0
  135. package/esm/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -0
  136. package/esm/registration/verifications/tpm/verifyAttestationTPM.js +2 -1
  137. package/esm/registration/verifications/verifyAttestationAndroidKey.d.ts +1 -0
  138. package/esm/registration/verifications/verifyAttestationAndroidKey.d.ts.map +1 -0
  139. package/esm/registration/verifications/verifyAttestationAndroidKey.js +3 -1
  140. package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts +1 -0
  141. package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -0
  142. package/esm/registration/verifications/verifyAttestationApple.d.ts +1 -0
  143. package/esm/registration/verifications/verifyAttestationApple.d.ts.map +1 -0
  144. package/esm/registration/verifications/verifyAttestationApple.js +2 -1
  145. package/esm/registration/verifications/verifyAttestationFIDOU2F.d.ts +1 -0
  146. package/esm/registration/verifications/verifyAttestationFIDOU2F.d.ts.map +1 -0
  147. package/esm/registration/verifications/verifyAttestationPacked.d.ts +1 -0
  148. package/esm/registration/verifications/verifyAttestationPacked.d.ts.map +1 -0
  149. package/esm/registration/verifyRegistrationResponse.d.ts +18 -14
  150. package/esm/registration/verifyRegistrationResponse.d.ts.map +1 -0
  151. package/esm/services/defaultRootCerts/android-key.d.ts +1 -0
  152. package/esm/services/defaultRootCerts/android-key.d.ts.map +1 -0
  153. package/esm/services/defaultRootCerts/android-safetynet.d.ts +1 -0
  154. package/esm/services/defaultRootCerts/android-safetynet.d.ts.map +1 -0
  155. package/esm/services/defaultRootCerts/apple.d.ts +1 -0
  156. package/esm/services/defaultRootCerts/apple.d.ts.map +1 -0
  157. package/esm/services/defaultRootCerts/mds.d.ts +1 -0
  158. package/esm/services/defaultRootCerts/mds.d.ts.map +1 -0
  159. package/esm/services/metadataService.d.ts +30 -11
  160. package/esm/services/metadataService.d.ts.map +1 -0
  161. package/esm/services/metadataService.js +8 -22
  162. package/esm/services/settingsService.d.ts +18 -5
  163. package/esm/services/settingsService.d.ts.map +1 -0
  164. package/esm/services/settingsService.js +14 -10
  165. package/esm/types/dom.d.ts +329 -0
  166. package/esm/types/dom.d.ts.map +1 -0
  167. package/esm/types/dom.js +1 -0
  168. package/esm/types/index.d.ts +205 -0
  169. package/esm/types/index.d.ts.map +1 -0
  170. package/esm/types/index.js +1 -0
  171. package/package.json +27 -32
  172. package/script/authentication/generateAuthenticationOptions.d.ts +14 -13
  173. package/script/authentication/generateAuthenticationOptions.d.ts.map +1 -0
  174. package/script/authentication/generateAuthenticationOptions.js +1 -2
  175. package/script/authentication/verifyAuthenticationResponse.d.ts +19 -15
  176. package/script/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
  177. package/script/authentication/verifyAuthenticationResponse.js +1 -2
  178. package/script/helpers/convertAAGUIDToString.d.ts +1 -0
  179. package/script/helpers/convertAAGUIDToString.d.ts.map +1 -0
  180. package/script/helpers/convertAAGUIDToString.js +5 -6
  181. package/script/helpers/convertCOSEtoPKCS.d.ts +1 -0
  182. package/script/helpers/convertCOSEtoPKCS.d.ts.map +1 -0
  183. package/script/helpers/convertCOSEtoPKCS.js +1 -2
  184. package/script/helpers/convertCertBufferToPEM.d.ts +2 -1
  185. package/script/helpers/convertCertBufferToPEM.d.ts.map +1 -0
  186. package/script/helpers/convertCertBufferToPEM.js +1 -2
  187. package/script/helpers/convertPEMToBytes.d.ts +1 -0
  188. package/script/helpers/convertPEMToBytes.d.ts.map +1 -0
  189. package/script/helpers/convertPEMToBytes.js +1 -2
  190. package/script/helpers/convertX509PublicKeyToCOSE.d.ts +1 -0
  191. package/script/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -0
  192. package/script/helpers/convertX509PublicKeyToCOSE.js +11 -9
  193. package/script/helpers/cose.d.ts +23 -0
  194. package/script/helpers/cose.d.ts.map +1 -0
  195. package/script/helpers/cose.js +31 -11
  196. package/script/helpers/decodeAttestationObject.d.ts +5 -0
  197. package/script/helpers/decodeAttestationObject.d.ts.map +1 -0
  198. package/script/helpers/decodeAttestationObject.js +6 -3
  199. package/script/helpers/decodeAuthenticatorExtensions.d.ts +1 -0
  200. package/script/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
  201. package/script/helpers/decodeAuthenticatorExtensions.js +1 -2
  202. package/script/helpers/decodeClientDataJSON.d.ts +6 -1
  203. package/script/helpers/decodeClientDataJSON.d.ts.map +1 -0
  204. package/script/helpers/decodeClientDataJSON.js +6 -3
  205. package/script/helpers/decodeCredentialPublicKey.d.ts +5 -0
  206. package/script/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
  207. package/script/helpers/decodeCredentialPublicKey.js +6 -3
  208. package/script/helpers/fetch.d.ts +5 -0
  209. package/script/helpers/fetch.d.ts.map +1 -0
  210. package/script/helpers/fetch.js +8 -5
  211. package/script/helpers/generateChallenge.d.ts +5 -0
  212. package/script/helpers/generateChallenge.d.ts.map +1 -0
  213. package/script/helpers/generateChallenge.js +6 -3
  214. package/script/helpers/generateUserID.d.ts +5 -0
  215. package/script/helpers/generateUserID.d.ts.map +1 -0
  216. package/script/helpers/generateUserID.js +6 -3
  217. package/script/helpers/getCertificateInfo.d.ts +2 -1
  218. package/script/helpers/getCertificateInfo.d.ts.map +1 -0
  219. package/script/helpers/getCertificateInfo.js +6 -6
  220. package/script/helpers/index.d.ts +17 -23
  221. package/script/helpers/index.d.ts.map +1 -0
  222. package/script/helpers/index.js +20 -36
  223. package/script/helpers/isCertRevoked.d.ts +2 -1
  224. package/script/helpers/isCertRevoked.d.ts.map +1 -0
  225. package/script/helpers/isCertRevoked.js +10 -10
  226. package/script/helpers/iso/index.d.ts +1 -0
  227. package/script/helpers/iso/index.d.ts.map +1 -0
  228. package/script/helpers/iso/isoBase64URL.d.ts +2 -1
  229. package/script/helpers/iso/isoBase64URL.d.ts.map +1 -0
  230. package/script/helpers/iso/isoBase64URL.js +24 -18
  231. package/script/helpers/iso/isoCBOR.d.ts +6 -1
  232. package/script/helpers/iso/isoCBOR.d.ts.map +1 -0
  233. package/script/helpers/iso/isoCBOR.js +32 -6
  234. package/script/helpers/iso/isoCrypto/digest.d.ts +1 -0
  235. package/script/helpers/iso/isoCrypto/digest.d.ts.map +1 -0
  236. package/script/helpers/iso/isoCrypto/digest.js +1 -2
  237. package/script/helpers/iso/isoCrypto/getRandomValues.d.ts +1 -0
  238. package/script/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -0
  239. package/script/helpers/iso/isoCrypto/getRandomValues.js +1 -2
  240. package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts +2 -1
  241. package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -0
  242. package/script/helpers/iso/isoCrypto/getWebCrypto.js +2 -2
  243. package/script/helpers/iso/isoCrypto/importKey.d.ts +1 -0
  244. package/script/helpers/iso/isoCrypto/importKey.d.ts.map +1 -0
  245. package/script/helpers/iso/isoCrypto/importKey.js +1 -2
  246. package/script/helpers/iso/isoCrypto/index.d.ts +5 -0
  247. package/script/helpers/iso/isoCrypto/index.d.ts.map +1 -0
  248. package/script/helpers/iso/isoCrypto/index.js +4 -0
  249. package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts +1 -0
  250. package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts.map +1 -0
  251. package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.js +1 -2
  252. package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts +1 -0
  253. package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts.map +1 -0
  254. package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.js +1 -2
  255. package/script/helpers/iso/isoCrypto/structs.d.ts +1 -0
  256. package/script/helpers/iso/isoCrypto/structs.d.ts.map +1 -0
  257. package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +1 -0
  258. package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
  259. package/script/helpers/iso/isoCrypto/unwrapEC2Signature.js +4 -4
  260. package/script/helpers/iso/isoCrypto/verify.d.ts +1 -0
  261. package/script/helpers/iso/isoCrypto/verify.d.ts.map +1 -0
  262. package/script/helpers/iso/isoCrypto/verify.js +1 -2
  263. package/script/helpers/iso/isoCrypto/verifyEC2.d.ts +1 -0
  264. package/script/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -0
  265. package/script/helpers/iso/isoCrypto/verifyEC2.js +1 -2
  266. package/script/helpers/iso/isoCrypto/verifyOKP.d.ts +1 -0
  267. package/script/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -0
  268. package/script/helpers/iso/isoCrypto/verifyOKP.js +1 -2
  269. package/script/helpers/iso/isoCrypto/verifyRSA.d.ts +1 -0
  270. package/script/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -0
  271. package/script/helpers/iso/isoCrypto/verifyRSA.js +1 -2
  272. package/script/helpers/iso/isoUint8Array.d.ts +5 -0
  273. package/script/helpers/iso/isoUint8Array.d.ts.map +1 -0
  274. package/script/helpers/iso/isoUint8Array.js +12 -9
  275. package/script/helpers/logging.d.ts +1 -0
  276. package/script/helpers/logging.d.ts.map +1 -0
  277. package/script/helpers/logging.js +2 -4
  278. package/script/helpers/mapX509SignatureAlgToCOSEAlg.d.ts +1 -0
  279. package/script/helpers/mapX509SignatureAlgToCOSEAlg.d.ts.map +1 -0
  280. package/script/helpers/mapX509SignatureAlgToCOSEAlg.js +1 -2
  281. package/script/helpers/matchExpectedRPID.d.ts +1 -0
  282. package/script/helpers/matchExpectedRPID.d.ts.map +1 -0
  283. package/script/helpers/matchExpectedRPID.js +1 -2
  284. package/script/helpers/parseAuthenticatorData.d.ts +5 -0
  285. package/script/helpers/parseAuthenticatorData.d.ts.map +1 -0
  286. package/script/helpers/parseAuthenticatorData.js +12 -9
  287. package/script/helpers/parseBackupFlags.d.ts +2 -1
  288. package/script/helpers/parseBackupFlags.d.ts.map +1 -0
  289. package/script/helpers/parseBackupFlags.js +2 -2
  290. package/script/helpers/toHash.d.ts +1 -0
  291. package/script/helpers/toHash.d.ts.map +1 -0
  292. package/script/helpers/toHash.js +1 -2
  293. package/script/helpers/validateCertificatePath.d.ts +4 -3
  294. package/script/helpers/validateCertificatePath.d.ts.map +1 -0
  295. package/script/helpers/validateCertificatePath.js +83 -61
  296. package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts +2 -1
  297. package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
  298. package/script/helpers/validateExtFIDOGenCEAAGUID.js +3 -4
  299. package/script/helpers/verifySignature.d.ts +5 -0
  300. package/script/helpers/verifySignature.d.ts.map +1 -0
  301. package/script/helpers/verifySignature.js +6 -3
  302. package/script/index.d.ts +9 -17
  303. package/script/index.d.ts.map +1 -0
  304. package/script/index.js +22 -17
  305. package/script/metadata/mdsTypes.d.ts +6 -1
  306. package/script/metadata/mdsTypes.d.ts.map +1 -0
  307. package/script/metadata/parseJWT.d.ts +1 -0
  308. package/script/metadata/parseJWT.d.ts.map +1 -0
  309. package/script/metadata/parseJWT.js +1 -2
  310. package/script/metadata/verifyAttestationWithMetadata.d.ts +3 -2
  311. package/script/metadata/verifyAttestationWithMetadata.d.ts.map +1 -0
  312. package/script/metadata/verifyAttestationWithMetadata.js +2 -2
  313. package/script/metadata/verifyJWT.d.ts +1 -0
  314. package/script/metadata/verifyJWT.d.ts.map +1 -0
  315. package/script/metadata/verifyJWT.js +1 -2
  316. package/script/registration/generateRegistrationOptions.d.ts +22 -19
  317. package/script/registration/generateRegistrationOptions.d.ts.map +1 -0
  318. package/script/registration/generateRegistrationOptions.js +24 -3
  319. package/script/registration/verifications/tpm/constants.d.ts +1 -0
  320. package/script/registration/verifications/tpm/constants.d.ts.map +1 -0
  321. package/script/registration/verifications/tpm/constants.js +4 -4
  322. package/script/registration/verifications/tpm/parseCertInfo.d.ts +1 -0
  323. package/script/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -0
  324. package/script/registration/verifications/tpm/parseCertInfo.js +1 -2
  325. package/script/registration/verifications/tpm/parsePubArea.d.ts +1 -0
  326. package/script/registration/verifications/tpm/parsePubArea.d.ts.map +1 -0
  327. package/script/registration/verifications/tpm/parsePubArea.js +1 -2
  328. package/script/registration/verifications/tpm/verifyAttestationTPM.d.ts +1 -0
  329. package/script/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -0
  330. package/script/registration/verifications/tpm/verifyAttestationTPM.js +8 -8
  331. package/script/registration/verifications/verifyAttestationAndroidKey.d.ts +1 -0
  332. package/script/registration/verifications/verifyAttestationAndroidKey.d.ts.map +1 -0
  333. package/script/registration/verifications/verifyAttestationAndroidKey.js +7 -6
  334. package/script/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts +1 -0
  335. package/script/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -0
  336. package/script/registration/verifications/verifyAttestationAndroidSafetyNet.js +1 -2
  337. package/script/registration/verifications/verifyAttestationApple.d.ts +1 -0
  338. package/script/registration/verifications/verifyAttestationApple.d.ts.map +1 -0
  339. package/script/registration/verifications/verifyAttestationApple.js +4 -4
  340. package/script/registration/verifications/verifyAttestationFIDOU2F.d.ts +1 -0
  341. package/script/registration/verifications/verifyAttestationFIDOU2F.d.ts.map +1 -0
  342. package/script/registration/verifications/verifyAttestationFIDOU2F.js +1 -2
  343. package/script/registration/verifications/verifyAttestationPacked.d.ts +1 -0
  344. package/script/registration/verifications/verifyAttestationPacked.d.ts.map +1 -0
  345. package/script/registration/verifications/verifyAttestationPacked.js +1 -2
  346. package/script/registration/verifyRegistrationResponse.d.ts +18 -14
  347. package/script/registration/verifyRegistrationResponse.d.ts.map +1 -0
  348. package/script/registration/verifyRegistrationResponse.js +1 -2
  349. package/script/services/defaultRootCerts/android-key.d.ts +1 -0
  350. package/script/services/defaultRootCerts/android-key.d.ts.map +1 -0
  351. package/script/services/defaultRootCerts/android-safetynet.d.ts +1 -0
  352. package/script/services/defaultRootCerts/android-safetynet.d.ts.map +1 -0
  353. package/script/services/defaultRootCerts/apple.d.ts +1 -0
  354. package/script/services/defaultRootCerts/apple.d.ts.map +1 -0
  355. package/script/services/defaultRootCerts/mds.d.ts +1 -0
  356. package/script/services/defaultRootCerts/mds.d.ts.map +1 -0
  357. package/script/services/metadataService.d.ts +30 -11
  358. package/script/services/metadataService.d.ts.map +1 -0
  359. package/script/services/metadataService.js +8 -22
  360. package/script/services/settingsService.d.ts +18 -5
  361. package/script/services/settingsService.d.ts.map +1 -0
  362. package/script/services/settingsService.js +14 -10
  363. package/script/types/dom.d.ts +329 -0
  364. package/script/types/dom.d.ts.map +1 -0
  365. package/script/types/dom.js +2 -0
  366. package/script/types/index.d.ts +205 -0
  367. package/script/types/index.d.ts.map +1 -0
  368. package/script/types/index.js +2 -0
  369. package/esm/deps.d.ts +0 -9
  370. package/esm/deps.js +0 -12
  371. package/script/deps.d.ts +0 -9
  372. package/script/deps.js +0 -70
@@ -7,6 +7,10 @@
7
7
  *
8
8
  * These types are an unorthodox way of saying "these Maps should involve these discrete lists of
9
9
  * keys", but it works.
10
+ * @module
11
+ */
12
+ /**
13
+ * COSE public key common values
10
14
  */
11
15
  export type COSEPublicKey = {
12
16
  get(key: COSEKEYS.kty): COSEKTY | undefined;
@@ -14,12 +18,18 @@ export type COSEPublicKey = {
14
18
  set(key: COSEKEYS.kty, value: COSEKTY): void;
15
19
  set(key: COSEKEYS.alg, value: COSEALG): void;
16
20
  };
21
+ /**
22
+ * Values specific to Octet Key Pair public keys
23
+ */
17
24
  export type COSEPublicKeyOKP = COSEPublicKey & {
18
25
  get(key: COSEKEYS.crv): number | undefined;
19
26
  get(key: COSEKEYS.x): Uint8Array | undefined;
20
27
  set(key: COSEKEYS.crv, value: number): void;
21
28
  set(key: COSEKEYS.x, value: Uint8Array): void;
22
29
  };
30
+ /**
31
+ * Values specific to Elliptic Curve Cryptography public keys
32
+ */
23
33
  export type COSEPublicKeyEC2 = COSEPublicKey & {
24
34
  get(key: COSEKEYS.crv): number | undefined;
25
35
  get(key: COSEKEYS.x): Uint8Array | undefined;
@@ -28,14 +38,26 @@ export type COSEPublicKeyEC2 = COSEPublicKey & {
28
38
  set(key: COSEKEYS.x, value: Uint8Array): void;
29
39
  set(key: COSEKEYS.y, value: Uint8Array): void;
30
40
  };
41
+ /**
42
+ * Values specific to RSA public keys
43
+ */
31
44
  export type COSEPublicKeyRSA = COSEPublicKey & {
32
45
  get(key: COSEKEYS.n): Uint8Array | undefined;
33
46
  get(key: COSEKEYS.e): Uint8Array | undefined;
34
47
  set(key: COSEKEYS.n, value: Uint8Array): void;
35
48
  set(key: COSEKEYS.e, value: Uint8Array): void;
36
49
  };
50
+ /**
51
+ * A type guard for determining if a COSE public key is an OKP key pair
52
+ */
37
53
  export declare function isCOSEPublicKeyOKP(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyOKP;
54
+ /**
55
+ * A type guard for determining if a COSE public key is an EC2 key pair
56
+ */
38
57
  export declare function isCOSEPublicKeyEC2(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyEC2;
58
+ /**
59
+ * A type guard for determining if a COSE public key is an RSA key pair
60
+ */
39
61
  export declare function isCOSEPublicKeyRSA(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyRSA;
40
62
  /**
41
63
  * COSE Keys
@@ -96,3 +118,4 @@ export declare enum COSEALG {
96
118
  RS1 = -65535
97
119
  }
98
120
  export declare function isCOSEAlg(alg: number | undefined): alg is COSEALG;
121
+ //# sourceMappingURL=cose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cose.d.ts","sourceRoot":"","sources":["../../src/helpers/cose.ts"],"names":[],"mappings":"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"}
@@ -1,21 +1,44 @@
1
1
  "use strict";
2
+ /**
3
+ * Fundamental values that are needed to discern the more specific COSE public key types below.
4
+ *
5
+ * The use of `Maps` here is due to CBOR encoding being used with public keys, and the CBOR "Map"
6
+ * type is being decoded to JavaScript's `Map` type instead of, say, a basic Object as us JS
7
+ * developers might prefer.
8
+ *
9
+ * These types are an unorthodox way of saying "these Maps should involve these discrete lists of
10
+ * keys", but it works.
11
+ * @module
12
+ */
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isCOSEAlg = exports.COSEALG = exports.isCOSECrv = exports.COSECRV = exports.isCOSEKty = exports.COSEKTY = exports.COSEKEYS = exports.isCOSEPublicKeyRSA = exports.isCOSEPublicKeyEC2 = exports.isCOSEPublicKeyOKP = void 0;
14
+ exports.COSEALG = exports.COSECRV = exports.COSEKTY = exports.COSEKEYS = void 0;
15
+ exports.isCOSEPublicKeyOKP = isCOSEPublicKeyOKP;
16
+ exports.isCOSEPublicKeyEC2 = isCOSEPublicKeyEC2;
17
+ exports.isCOSEPublicKeyRSA = isCOSEPublicKeyRSA;
18
+ exports.isCOSEKty = isCOSEKty;
19
+ exports.isCOSECrv = isCOSECrv;
20
+ exports.isCOSEAlg = isCOSEAlg;
21
+ /**
22
+ * A type guard for determining if a COSE public key is an OKP key pair
23
+ */
4
24
  function isCOSEPublicKeyOKP(cosePublicKey) {
5
25
  const kty = cosePublicKey.get(COSEKEYS.kty);
6
26
  return isCOSEKty(kty) && kty === COSEKTY.OKP;
7
27
  }
8
- exports.isCOSEPublicKeyOKP = isCOSEPublicKeyOKP;
28
+ /**
29
+ * A type guard for determining if a COSE public key is an EC2 key pair
30
+ */
9
31
  function isCOSEPublicKeyEC2(cosePublicKey) {
10
32
  const kty = cosePublicKey.get(COSEKEYS.kty);
11
33
  return isCOSEKty(kty) && kty === COSEKTY.EC2;
12
34
  }
13
- exports.isCOSEPublicKeyEC2 = isCOSEPublicKeyEC2;
35
+ /**
36
+ * A type guard for determining if a COSE public key is an RSA key pair
37
+ */
14
38
  function isCOSEPublicKeyRSA(cosePublicKey) {
15
39
  const kty = cosePublicKey.get(COSEKEYS.kty);
16
40
  return isCOSEKty(kty) && kty === COSEKTY.RSA;
17
41
  }
18
- exports.isCOSEPublicKeyRSA = isCOSEPublicKeyRSA;
19
42
  /**
20
43
  * COSE Keys
21
44
  *
@@ -31,7 +54,7 @@ var COSEKEYS;
31
54
  COSEKEYS[COSEKEYS["y"] = -3] = "y";
32
55
  COSEKEYS[COSEKEYS["n"] = -1] = "n";
33
56
  COSEKEYS[COSEKEYS["e"] = -2] = "e";
34
- })(COSEKEYS = exports.COSEKEYS || (exports.COSEKEYS = {}));
57
+ })(COSEKEYS || (exports.COSEKEYS = COSEKEYS = {}));
35
58
  /**
36
59
  * COSE Key Types
37
60
  *
@@ -42,11 +65,10 @@ var COSEKTY;
42
65
  COSEKTY[COSEKTY["OKP"] = 1] = "OKP";
43
66
  COSEKTY[COSEKTY["EC2"] = 2] = "EC2";
44
67
  COSEKTY[COSEKTY["RSA"] = 3] = "RSA";
45
- })(COSEKTY = exports.COSEKTY || (exports.COSEKTY = {}));
68
+ })(COSEKTY || (exports.COSEKTY = COSEKTY = {}));
46
69
  function isCOSEKty(kty) {
47
70
  return Object.values(COSEKTY).indexOf(kty) >= 0;
48
71
  }
49
- exports.isCOSEKty = isCOSEKty;
50
72
  /**
51
73
  * COSE Curves
52
74
  *
@@ -59,11 +81,10 @@ var COSECRV;
59
81
  COSECRV[COSECRV["P521"] = 3] = "P521";
60
82
  COSECRV[COSECRV["ED25519"] = 6] = "ED25519";
61
83
  COSECRV[COSECRV["SECP256K1"] = 8] = "SECP256K1";
62
- })(COSECRV = exports.COSECRV || (exports.COSECRV = {}));
84
+ })(COSECRV || (exports.COSECRV = COSECRV = {}));
63
85
  function isCOSECrv(crv) {
64
86
  return Object.values(COSECRV).indexOf(crv) >= 0;
65
87
  }
66
- exports.isCOSECrv = isCOSECrv;
67
88
  /**
68
89
  * COSE Algorithms
69
90
  *
@@ -83,8 +104,7 @@ var COSEALG;
83
104
  COSEALG[COSEALG["RS384"] = -258] = "RS384";
84
105
  COSEALG[COSEALG["RS512"] = -259] = "RS512";
85
106
  COSEALG[COSEALG["RS1"] = -65535] = "RS1";
86
- })(COSEALG = exports.COSEALG || (exports.COSEALG = {}));
107
+ })(COSEALG || (exports.COSEALG = COSEALG = {}));
87
108
  function isCOSEAlg(alg) {
88
109
  return Object.values(COSEALG).indexOf(alg) >= 0;
89
110
  }
90
- exports.isCOSEAlg = isCOSEAlg;
@@ -24,6 +24,11 @@ export type AttestationStatement = {
24
24
  get(key: 'pubArea'): Uint8Array | undefined;
25
25
  readonly size: number;
26
26
  };
27
+ /**
28
+ * Make it possible to stub the return value during testing
29
+ * @ignore Don't include this in docs output
30
+ */
27
31
  export declare const _decodeAttestationObjectInternals: {
28
32
  stubThis: (value: AttestationObject) => AttestationObject;
29
33
  };
34
+ //# sourceMappingURL=decodeAttestationObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeAttestationObject.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeAttestationObject.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,UAAU,GAC5B,iBAAiB,CAInB;AAED,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,aAAa,GACb,KAAK,GACL,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,iBAAiB,CAAC;IACnC,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,oBAAoB,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;IACxC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7C,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7C,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAE5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC;sBAC1B,iBAAiB;CACpC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._decodeAttestationObjectInternals = exports.decodeAttestationObject = void 0;
3
+ exports._decodeAttestationObjectInternals = void 0;
4
+ exports.decodeAttestationObject = decodeAttestationObject;
4
5
  const index_js_1 = require("./iso/index.js");
5
6
  /**
6
7
  * Convert an AttestationObject buffer to a proper object
@@ -10,8 +11,10 @@ const index_js_1 = require("./iso/index.js");
10
11
  function decodeAttestationObject(attestationObject) {
11
12
  return exports._decodeAttestationObjectInternals.stubThis(index_js_1.isoCBOR.decodeFirst(attestationObject));
12
13
  }
13
- exports.decodeAttestationObject = decodeAttestationObject;
14
- // Make it possible to stub the return value during testing
14
+ /**
15
+ * Make it possible to stub the return value during testing
16
+ * @ignore Don't include this in docs output
17
+ */
15
18
  exports._decodeAttestationObjectInternals = {
16
19
  stubThis: (value) => value,
17
20
  };
@@ -8,3 +8,4 @@ export declare function decodeAuthenticatorExtensions(extensionData: Uint8Array)
8
8
  * Attempt to support authenticator extensions we might not know about in WebAuthn
9
9
  */
10
10
  export type AuthenticationExtensionsAuthenticatorOutputs = unknown;
11
+ //# sourceMappingURL=decodeAuthenticatorExtensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeAuthenticatorExtensions.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeAuthenticatorExtensions.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,UAAU,GACxB,4CAA4C,GAAG,SAAS,CAU1D;AAED;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,OAAO,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.decodeAuthenticatorExtensions = void 0;
3
+ exports.decodeAuthenticatorExtensions = decodeAuthenticatorExtensions;
4
4
  const index_js_1 = require("./iso/index.js");
5
5
  /**
6
6
  * Convert authenticator extension data buffer to a proper object
@@ -18,7 +18,6 @@ function decodeAuthenticatorExtensions(extensionData) {
18
18
  }
19
19
  return convertMapToObjectDeep(toCBOR);
20
20
  }
21
- exports.decodeAuthenticatorExtensions = decodeAuthenticatorExtensions;
22
21
  /**
23
22
  * CBOR-encoded extensions can be deeply-nested Maps, which are too deep for a simple
24
23
  * `Object.entries()`. This method will recursively make sure that all Maps are converted into
@@ -1,4 +1,4 @@
1
- import type { Base64URLString } from '../deps.js';
1
+ import type { Base64URLString } from '../types/index.js';
2
2
  /**
3
3
  * Decode an authenticator's base64url-encoded clientDataJSON to JSON
4
4
  */
@@ -13,6 +13,11 @@ export type ClientDataJSON = {
13
13
  status: 'present' | 'supported' | 'not-supported';
14
14
  };
15
15
  };
16
+ /**
17
+ * Make it possible to stub the return value during testing
18
+ * @ignore Don't include this in docs output
19
+ */
16
20
  export declare const _decodeClientDataJSONInternals: {
17
21
  stubThis: (value: ClientDataJSON) => ClientDataJSON;
18
22
  };
23
+ //# sourceMappingURL=decodeClientDataJSON.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeClientDataJSON.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeClientDataJSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAK1E;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;KACnD,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B;sBACvB,cAAc;CACjC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._decodeClientDataJSONInternals = exports.decodeClientDataJSON = void 0;
3
+ exports._decodeClientDataJSONInternals = void 0;
4
+ exports.decodeClientDataJSON = decodeClientDataJSON;
4
5
  const index_js_1 = require("./iso/index.js");
5
6
  /**
6
7
  * Decode an authenticator's base64url-encoded clientDataJSON to JSON
@@ -10,8 +11,10 @@ function decodeClientDataJSON(data) {
10
11
  const clientData = JSON.parse(toString);
11
12
  return exports._decodeClientDataJSONInternals.stubThis(clientData);
12
13
  }
13
- exports.decodeClientDataJSON = decodeClientDataJSON;
14
- // Make it possible to stub the return value during testing
14
+ /**
15
+ * Make it possible to stub the return value during testing
16
+ * @ignore Don't include this in docs output
17
+ */
15
18
  exports._decodeClientDataJSONInternals = {
16
19
  stubThis: (value) => value,
17
20
  };
@@ -1,5 +1,10 @@
1
1
  import { COSEPublicKey } from './cose.js';
2
2
  export declare function decodeCredentialPublicKey(publicKey: Uint8Array): COSEPublicKey;
3
+ /**
4
+ * Make it possible to stub the return value during testing
5
+ * @ignore Don't include this in docs output
6
+ */
3
7
  export declare const _decodeCredentialPublicKeyInternals: {
4
8
  stubThis: (value: COSEPublicKey) => COSEPublicKey;
5
9
  };
10
+ //# sourceMappingURL=decodeCredentialPublicKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeCredentialPublicKey.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeCredentialPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,UAAU,GACpB,aAAa,CAIf;AAED;;;GAGG;AACH,eAAO,MAAM,mCAAmC;sBAC5B,aAAa;CAChC,CAAC"}
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._decodeCredentialPublicKeyInternals = exports.decodeCredentialPublicKey = void 0;
3
+ exports._decodeCredentialPublicKeyInternals = void 0;
4
+ exports.decodeCredentialPublicKey = decodeCredentialPublicKey;
4
5
  const index_js_1 = require("./iso/index.js");
5
6
  function decodeCredentialPublicKey(publicKey) {
6
7
  return exports._decodeCredentialPublicKeyInternals.stubThis(index_js_1.isoCBOR.decodeFirst(publicKey));
7
8
  }
8
- exports.decodeCredentialPublicKey = decodeCredentialPublicKey;
9
- // Make it possible to stub the return value during testing
9
+ /**
10
+ * Make it possible to stub the return value during testing
11
+ * @ignore Don't include this in docs output
12
+ */
10
13
  exports._decodeCredentialPublicKeyInternals = {
11
14
  stubThis: (value) => value,
12
15
  };
@@ -3,6 +3,11 @@
3
3
  * across multiple runtimes.
4
4
  */
5
5
  export declare function fetch(url: string): Promise<Response>;
6
+ /**
7
+ * Make it possible to stub the return value during testing
8
+ * @ignore Don't include this in docs output
9
+ */
6
10
  export declare const _fetchInternals: {
7
11
  stubThis: (url: string) => Promise<Response>;
8
12
  };
13
+ //# sourceMappingURL=fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/helpers/fetch.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEpD;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe;oBACV,MAAM;CACvB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._fetchInternals = exports.fetch = void 0;
4
- const deps_js_1 = require("../deps.js");
3
+ exports._fetchInternals = void 0;
4
+ exports.fetch = fetch;
5
+ const cross_fetch_1 = require("cross-fetch");
5
6
  /**
6
7
  * A simple method for requesting data via standard `fetch`. Should work
7
8
  * across multiple runtimes.
@@ -9,8 +10,10 @@ const deps_js_1 = require("../deps.js");
9
10
  function fetch(url) {
10
11
  return exports._fetchInternals.stubThis(url);
11
12
  }
12
- exports.fetch = fetch;
13
- // Make it possible to stub the return value during testing
13
+ /**
14
+ * Make it possible to stub the return value during testing
15
+ * @ignore Don't include this in docs output
16
+ */
14
17
  exports._fetchInternals = {
15
- stubThis: (url) => (0, deps_js_1.crossFetch)(url),
18
+ stubThis: (url) => (0, cross_fetch_1.fetch)(url),
16
19
  };
@@ -2,6 +2,11 @@
2
2
  * Generate a suitably random value to be used as an attestation or assertion challenge
3
3
  */
4
4
  export declare function generateChallenge(): Promise<Uint8Array>;
5
+ /**
6
+ * Make it possible to stub the return value during testing
7
+ * @ignore Don't include this in docs output
8
+ */
5
9
  export declare const _generateChallengeInternals: {
6
10
  stubThis: (value: Uint8Array) => Uint8Array;
7
11
  };
12
+ //# sourceMappingURL=generateChallenge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateChallenge.d.ts","sourceRoot":"","sources":["../../src/helpers/generateChallenge.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,UAAU,CAAC,CAc7D;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B;sBACpB,UAAU;CAC7B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._generateChallengeInternals = exports.generateChallenge = void 0;
3
+ exports._generateChallengeInternals = void 0;
4
+ exports.generateChallenge = generateChallenge;
4
5
  const index_js_1 = require("./iso/index.js");
5
6
  /**
6
7
  * Generate a suitably random value to be used as an attestation or assertion challenge
@@ -18,8 +19,10 @@ async function generateChallenge() {
18
19
  await index_js_1.isoCrypto.getRandomValues(challenge);
19
20
  return exports._generateChallengeInternals.stubThis(challenge);
20
21
  }
21
- exports.generateChallenge = generateChallenge;
22
- // Make it possible to stub the return value during testing
22
+ /**
23
+ * Make it possible to stub the return value during testing
24
+ * @ignore Don't include this in docs output
25
+ */
23
26
  exports._generateChallengeInternals = {
24
27
  stubThis: (value) => value,
25
28
  };
@@ -2,6 +2,11 @@
2
2
  * Generate a suitably random value to be used as user ID
3
3
  */
4
4
  export declare function generateUserID(): Promise<Uint8Array>;
5
+ /**
6
+ * Make it possible to stub the return value during testing
7
+ * @ignore Don't include this in docs output
8
+ */
5
9
  export declare const _generateUserIDInternals: {
6
10
  stubThis: (value: Uint8Array) => Uint8Array;
7
11
  };
12
+ //# sourceMappingURL=generateUserID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateUserID.d.ts","sourceRoot":"","sources":["../../src/helpers/generateUserID.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAU1D;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;sBACjB,UAAU;CAC7B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._generateUserIDInternals = exports.generateUserID = void 0;
3
+ exports._generateUserIDInternals = void 0;
4
+ exports.generateUserID = generateUserID;
4
5
  const index_js_1 = require("./iso/index.js");
5
6
  /**
6
7
  * Generate a suitably random value to be used as user ID
@@ -14,8 +15,10 @@ async function generateUserID() {
14
15
  await index_js_1.isoCrypto.getRandomValues(newUserID);
15
16
  return exports._generateUserIDInternals.stubThis(newUserID);
16
17
  }
17
- exports.generateUserID = generateUserID;
18
- // Make it possible to stub the return value during testing
18
+ /**
19
+ * Make it possible to stub the return value during testing
20
+ * @ignore Don't include this in docs output
21
+ */
19
22
  exports._generateUserIDInternals = {
20
23
  stubThis: (value) => value,
21
24
  };
@@ -1,4 +1,4 @@
1
- import { Certificate } from '../deps.js';
1
+ import { Certificate } from '@peculiar/asn1-x509';
2
2
  export type CertificateInfo = {
3
3
  issuer: Issuer;
4
4
  subject: Subject;
@@ -29,3 +29,4 @@ type Subject = {
29
29
  */
30
30
  export declare function getCertificateInfo(leafCertBuffer: Uint8Array): CertificateInfo;
31
31
  export {};
32
+ //# sourceMappingURL=getCertificateInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCertificateInfo.d.ts","sourceRoot":"","sources":["../../src/helpers/getCertificateInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,WAAW,EAA0B,MAAM,qBAAqB,CAAC;AAE5F,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,IAAI,CAAC;IACf,iBAAiB,EAAE,WAAW,CAAC;CAChC,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AASF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,UAAU,GACzB,eAAe,CA+CjB"}
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCertificateInfo = void 0;
4
- const deps_js_1 = require("../deps.js");
3
+ exports.getCertificateInfo = getCertificateInfo;
4
+ const asn1_schema_1 = require("@peculiar/asn1-schema");
5
+ const asn1_x509_1 = require("@peculiar/asn1-x509");
5
6
  const issuerSubjectIDKey = {
6
7
  '2.5.4.6': 'C',
7
8
  '2.5.4.10': 'O',
@@ -14,7 +15,7 @@ const issuerSubjectIDKey = {
14
15
  * @param pemCertificate Result from call to `convertASN1toPEM(x5c[0])`
15
16
  */
16
17
  function getCertificateInfo(leafCertBuffer) {
17
- const x509 = deps_js_1.AsnParser.parse(leafCertBuffer, deps_js_1.Certificate);
18
+ const x509 = asn1_schema_1.AsnParser.parse(leafCertBuffer, asn1_x509_1.Certificate);
18
19
  const parsedCert = x509.tbsCertificate;
19
20
  // Issuer
20
21
  const issuer = { combined: '' };
@@ -38,8 +39,8 @@ function getCertificateInfo(leafCertBuffer) {
38
39
  if (parsedCert.extensions) {
39
40
  // console.log(parsedCert.extensions);
40
41
  for (const ext of parsedCert.extensions) {
41
- if (ext.extnID === deps_js_1.id_ce_basicConstraints) {
42
- const basicConstraints = deps_js_1.AsnParser.parse(ext.extnValue, deps_js_1.BasicConstraints);
42
+ if (ext.extnID === asn1_x509_1.id_ce_basicConstraints) {
43
+ const basicConstraints = asn1_schema_1.AsnParser.parse(ext.extnValue, asn1_x509_1.BasicConstraints);
43
44
  basicConstraintsCA = basicConstraints.cA;
44
45
  }
45
46
  }
@@ -54,7 +55,6 @@ function getCertificateInfo(leafCertBuffer) {
54
55
  parsedCertificate: x509,
55
56
  };
56
57
  }
57
- exports.getCertificateInfo = getCertificateInfo;
58
58
  /**
59
59
  * Stringify the parts of Issuer or Subject info for easier comparison of subject issuers with
60
60
  * issuer subjects.
@@ -1,23 +1,17 @@
1
- import { convertAAGUIDToString } from './convertAAGUIDToString.js';
2
- import { convertCertBufferToPEM } from './convertCertBufferToPEM.js';
3
- import { convertCOSEtoPKCS } from './convertCOSEtoPKCS.js';
4
- import { decodeAttestationObject } from './decodeAttestationObject.js';
5
- import { decodeClientDataJSON } from './decodeClientDataJSON.js';
6
- import { decodeCredentialPublicKey } from './decodeCredentialPublicKey.js';
7
- import { generateChallenge } from './generateChallenge.js';
8
- import { generateUserID } from './generateUserID.js';
9
- import { getCertificateInfo } from './getCertificateInfo.js';
10
- import { isCertRevoked } from './isCertRevoked.js';
11
- import { parseAuthenticatorData } from './parseAuthenticatorData.js';
12
- import { toHash } from './toHash.js';
13
- import { validateCertificatePath } from './validateCertificatePath.js';
14
- import { verifySignature } from './verifySignature.js';
15
- import { isoBase64URL, isoCBOR, isoCrypto, isoUint8Array } from './iso/index.js';
16
- import * as cose from './cose.js';
17
- export { convertAAGUIDToString, convertCertBufferToPEM, convertCOSEtoPKCS, cose, decodeAttestationObject, decodeClientDataJSON, decodeCredentialPublicKey, generateChallenge, generateUserID, getCertificateInfo, isCertRevoked, isoBase64URL, isoCBOR, isoCrypto, isoUint8Array, parseAuthenticatorData, toHash, validateCertificatePath, verifySignature, };
18
- import type { AttestationFormat, AttestationObject, AttestationStatement } from './decodeAttestationObject.js';
19
- import type { CertificateInfo } from './getCertificateInfo.js';
20
- import type { ClientDataJSON } from './decodeClientDataJSON.js';
21
- import type { COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA } from './cose.js';
22
- import type { ParsedAuthenticatorData } from './parseAuthenticatorData.js';
23
- export type { AttestationFormat, AttestationObject, AttestationStatement, CertificateInfo, ClientDataJSON, COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA, ParsedAuthenticatorData, };
1
+ export * from './convertAAGUIDToString.js';
2
+ export * from './convertCertBufferToPEM.js';
3
+ export * from './convertCOSEtoPKCS.js';
4
+ export * from './decodeAttestationObject.js';
5
+ export * from './decodeClientDataJSON.js';
6
+ export * from './decodeCredentialPublicKey.js';
7
+ export * from './generateChallenge.js';
8
+ export * from './generateUserID.js';
9
+ export * from './getCertificateInfo.js';
10
+ export * from './isCertRevoked.js';
11
+ export * from './parseAuthenticatorData.js';
12
+ export * from './toHash.js';
13
+ export * from './validateCertificatePath.js';
14
+ export * from './verifySignature.js';
15
+ export * from './iso/index.js';
16
+ export * as cose from './cose.js';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC"}
@@ -15,6 +15,9 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
18
21
  var __importStar = (this && this.__importStar) || function (mod) {
19
22
  if (mod && mod.__esModule) return mod;
20
23
  var result = {};
@@ -23,39 +26,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
26
  return result;
24
27
  };
25
28
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.verifySignature = exports.validateCertificatePath = exports.toHash = exports.parseAuthenticatorData = exports.isoUint8Array = exports.isoCrypto = exports.isoCBOR = exports.isoBase64URL = exports.isCertRevoked = exports.getCertificateInfo = exports.generateUserID = exports.generateChallenge = exports.decodeCredentialPublicKey = exports.decodeClientDataJSON = exports.decodeAttestationObject = exports.cose = exports.convertCOSEtoPKCS = exports.convertCertBufferToPEM = exports.convertAAGUIDToString = void 0;
27
- const convertAAGUIDToString_js_1 = require("./convertAAGUIDToString.js");
28
- Object.defineProperty(exports, "convertAAGUIDToString", { enumerable: true, get: function () { return convertAAGUIDToString_js_1.convertAAGUIDToString; } });
29
- const convertCertBufferToPEM_js_1 = require("./convertCertBufferToPEM.js");
30
- Object.defineProperty(exports, "convertCertBufferToPEM", { enumerable: true, get: function () { return convertCertBufferToPEM_js_1.convertCertBufferToPEM; } });
31
- const convertCOSEtoPKCS_js_1 = require("./convertCOSEtoPKCS.js");
32
- Object.defineProperty(exports, "convertCOSEtoPKCS", { enumerable: true, get: function () { return convertCOSEtoPKCS_js_1.convertCOSEtoPKCS; } });
33
- const decodeAttestationObject_js_1 = require("./decodeAttestationObject.js");
34
- Object.defineProperty(exports, "decodeAttestationObject", { enumerable: true, get: function () { return decodeAttestationObject_js_1.decodeAttestationObject; } });
35
- const decodeClientDataJSON_js_1 = require("./decodeClientDataJSON.js");
36
- Object.defineProperty(exports, "decodeClientDataJSON", { enumerable: true, get: function () { return decodeClientDataJSON_js_1.decodeClientDataJSON; } });
37
- const decodeCredentialPublicKey_js_1 = require("./decodeCredentialPublicKey.js");
38
- Object.defineProperty(exports, "decodeCredentialPublicKey", { enumerable: true, get: function () { return decodeCredentialPublicKey_js_1.decodeCredentialPublicKey; } });
39
- const generateChallenge_js_1 = require("./generateChallenge.js");
40
- Object.defineProperty(exports, "generateChallenge", { enumerable: true, get: function () { return generateChallenge_js_1.generateChallenge; } });
41
- const generateUserID_js_1 = require("./generateUserID.js");
42
- Object.defineProperty(exports, "generateUserID", { enumerable: true, get: function () { return generateUserID_js_1.generateUserID; } });
43
- const getCertificateInfo_js_1 = require("./getCertificateInfo.js");
44
- Object.defineProperty(exports, "getCertificateInfo", { enumerable: true, get: function () { return getCertificateInfo_js_1.getCertificateInfo; } });
45
- const isCertRevoked_js_1 = require("./isCertRevoked.js");
46
- Object.defineProperty(exports, "isCertRevoked", { enumerable: true, get: function () { return isCertRevoked_js_1.isCertRevoked; } });
47
- const parseAuthenticatorData_js_1 = require("./parseAuthenticatorData.js");
48
- Object.defineProperty(exports, "parseAuthenticatorData", { enumerable: true, get: function () { return parseAuthenticatorData_js_1.parseAuthenticatorData; } });
49
- const toHash_js_1 = require("./toHash.js");
50
- Object.defineProperty(exports, "toHash", { enumerable: true, get: function () { return toHash_js_1.toHash; } });
51
- const validateCertificatePath_js_1 = require("./validateCertificatePath.js");
52
- Object.defineProperty(exports, "validateCertificatePath", { enumerable: true, get: function () { return validateCertificatePath_js_1.validateCertificatePath; } });
53
- const verifySignature_js_1 = require("./verifySignature.js");
54
- Object.defineProperty(exports, "verifySignature", { enumerable: true, get: function () { return verifySignature_js_1.verifySignature; } });
55
- const index_js_1 = require("./iso/index.js");
56
- Object.defineProperty(exports, "isoBase64URL", { enumerable: true, get: function () { return index_js_1.isoBase64URL; } });
57
- Object.defineProperty(exports, "isoCBOR", { enumerable: true, get: function () { return index_js_1.isoCBOR; } });
58
- Object.defineProperty(exports, "isoCrypto", { enumerable: true, get: function () { return index_js_1.isoCrypto; } });
59
- Object.defineProperty(exports, "isoUint8Array", { enumerable: true, get: function () { return index_js_1.isoUint8Array; } });
60
- const cose = __importStar(require("./cose.js"));
61
- exports.cose = cose;
29
+ exports.cose = void 0;
30
+ __exportStar(require("./convertAAGUIDToString.js"), exports);
31
+ __exportStar(require("./convertCertBufferToPEM.js"), exports);
32
+ __exportStar(require("./convertCOSEtoPKCS.js"), exports);
33
+ __exportStar(require("./decodeAttestationObject.js"), exports);
34
+ __exportStar(require("./decodeClientDataJSON.js"), exports);
35
+ __exportStar(require("./decodeCredentialPublicKey.js"), exports);
36
+ __exportStar(require("./generateChallenge.js"), exports);
37
+ __exportStar(require("./generateUserID.js"), exports);
38
+ __exportStar(require("./getCertificateInfo.js"), exports);
39
+ __exportStar(require("./isCertRevoked.js"), exports);
40
+ __exportStar(require("./parseAuthenticatorData.js"), exports);
41
+ __exportStar(require("./toHash.js"), exports);
42
+ __exportStar(require("./validateCertificatePath.js"), exports);
43
+ __exportStar(require("./verifySignature.js"), exports);
44
+ __exportStar(require("./iso/index.js"), exports);
45
+ exports.cose = __importStar(require("./cose.js"));
@@ -1,4 +1,4 @@
1
- import { Certificate } from '../deps.js';
1
+ import { Certificate } from '@peculiar/asn1-x509';
2
2
  /**
3
3
  * A method to pull a CRL from a certificate and compare its serial number to the list of revoked
4
4
  * certificate serial numbers within the CRL.
@@ -6,3 +6,4 @@ import { Certificate } from '../deps.js';
6
6
  * CRL certificate structure referenced from https://tools.ietf.org/html/rfc5280#page-117
7
7
  */
8
8
  export declare function isCertRevoked(cert: Certificate): Promise<boolean>;
9
+ //# sourceMappingURL=isCertRevoked.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isCertRevoked.d.ts","sourceRoot":"","sources":["../../src/helpers/isCertRevoked.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EAOZ,MAAM,qBAAqB,CAAC;AAgB7B;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAgHvE"}