@simplewebauthn/server 10.0.0 → 11.0.0-alpha3
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.
- package/README.md +14 -6
- package/esm/authentication/generateAuthenticationOptions.d.ts +2 -1
- package/esm/authentication/generateAuthenticationOptions.d.ts.map +1 -0
- package/esm/authentication/verifyAuthenticationResponse.d.ts +4 -3
- package/esm/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
- package/esm/authentication/verifyAuthenticationResponse.js +7 -7
- package/esm/helpers/convertAAGUIDToString.d.ts +1 -0
- package/esm/helpers/convertAAGUIDToString.d.ts.map +1 -0
- package/esm/helpers/convertAAGUIDToString.js +4 -4
- package/esm/helpers/convertCOSEtoPKCS.d.ts +1 -0
- package/esm/helpers/convertCOSEtoPKCS.d.ts.map +1 -0
- package/esm/helpers/convertCertBufferToPEM.d.ts +2 -1
- package/esm/helpers/convertCertBufferToPEM.d.ts.map +1 -0
- package/esm/helpers/convertPEMToBytes.d.ts +1 -0
- package/esm/helpers/convertPEMToBytes.d.ts.map +1 -0
- package/esm/helpers/convertX509PublicKeyToCOSE.d.ts +1 -0
- package/esm/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -0
- package/esm/helpers/convertX509PublicKeyToCOSE.js +4 -1
- package/esm/helpers/cose.d.ts +1 -0
- package/esm/helpers/cose.d.ts.map +1 -0
- package/esm/helpers/decodeAttestationObject.d.ts +1 -0
- package/esm/helpers/decodeAttestationObject.d.ts.map +1 -0
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts +5 -14
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
- package/esm/helpers/decodeClientDataJSON.d.ts +2 -1
- package/esm/helpers/decodeClientDataJSON.d.ts.map +1 -0
- package/esm/helpers/decodeCredentialPublicKey.d.ts +1 -0
- package/esm/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
- package/esm/helpers/fetch.d.ts +1 -0
- package/esm/helpers/fetch.d.ts.map +1 -0
- package/esm/helpers/fetch.js +1 -1
- package/esm/helpers/generateChallenge.d.ts +1 -0
- package/esm/helpers/generateChallenge.d.ts.map +1 -0
- package/esm/helpers/generateUserID.d.ts +1 -0
- package/esm/helpers/generateUserID.d.ts.map +1 -0
- package/esm/helpers/getCertificateInfo.d.ts +2 -1
- package/esm/helpers/getCertificateInfo.d.ts.map +1 -0
- package/esm/helpers/getCertificateInfo.js +2 -1
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.d.ts.map +1 -0
- package/esm/helpers/isCertRevoked.d.ts +2 -1
- package/esm/helpers/isCertRevoked.d.ts.map +1 -0
- package/esm/helpers/isCertRevoked.js +2 -1
- package/esm/helpers/iso/index.d.ts +1 -0
- package/esm/helpers/iso/index.d.ts.map +1 -0
- package/esm/helpers/iso/isoBase64URL.d.ts +2 -1
- package/esm/helpers/iso/isoBase64URL.d.ts.map +1 -0
- package/esm/helpers/iso/isoBase64URL.js +1 -1
- package/esm/helpers/iso/isoCBOR.d.ts +2 -1
- package/esm/helpers/iso/isoCBOR.d.ts.map +1 -0
- package/esm/helpers/iso/isoCBOR.js +1 -1
- package/esm/helpers/iso/isoCrypto/digest.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/digest.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts +2 -1
- package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/importKey.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/importKey.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/index.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/index.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/structs.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/structs.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +3 -1
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.js +60 -17
- package/esm/helpers/iso/isoCrypto/verify.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verify.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/verify.js +6 -2
- package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -0
- package/esm/helpers/iso/isoUint8Array.d.ts +1 -0
- package/esm/helpers/iso/isoUint8Array.d.ts.map +1 -0
- package/esm/helpers/logging.d.ts +1 -0
- package/esm/helpers/logging.d.ts.map +1 -0
- package/esm/helpers/logging.js +0 -1
- package/esm/helpers/mapX509SignatureAlgToCOSEAlg.d.ts +1 -0
- package/esm/helpers/mapX509SignatureAlgToCOSEAlg.d.ts.map +1 -0
- package/esm/helpers/matchExpectedRPID.d.ts +1 -0
- package/esm/helpers/matchExpectedRPID.d.ts.map +1 -0
- package/esm/helpers/parseAuthenticatorData.d.ts +1 -0
- package/esm/helpers/parseAuthenticatorData.d.ts.map +1 -0
- package/esm/helpers/parseAuthenticatorData.js +6 -6
- package/esm/helpers/parseBackupFlags.d.ts +2 -1
- package/esm/helpers/parseBackupFlags.d.ts.map +1 -0
- package/esm/helpers/toHash.d.ts +1 -0
- package/esm/helpers/toHash.d.ts.map +1 -0
- package/esm/helpers/validateCertificatePath.d.ts +1 -0
- package/esm/helpers/validateCertificatePath.d.ts.map +1 -0
- package/esm/helpers/validateCertificatePath.js +1 -1
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts +7 -0
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
- package/esm/helpers/validateExtFIDOGenCEAAGUID.js +34 -0
- package/esm/helpers/verifySignature.d.ts +1 -0
- package/esm/helpers/verifySignature.d.ts.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/metadata/mdsTypes.d.ts +2 -1
- package/esm/metadata/mdsTypes.d.ts.map +1 -0
- package/esm/metadata/parseJWT.d.ts +1 -0
- package/esm/metadata/parseJWT.d.ts.map +1 -0
- package/esm/metadata/verifyAttestationWithMetadata.d.ts +2 -1
- package/esm/metadata/verifyAttestationWithMetadata.d.ts.map +1 -0
- package/esm/metadata/verifyJWT.d.ts +1 -0
- package/esm/metadata/verifyJWT.d.ts.map +1 -0
- package/esm/registration/generateRegistrationOptions.d.ts +2 -1
- package/esm/registration/generateRegistrationOptions.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/constants.d.ts +1 -0
- package/esm/registration/verifications/tpm/constants.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/constants.js +8 -4
- package/esm/registration/verifications/tpm/parseCertInfo.d.ts +1 -0
- package/esm/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/parsePubArea.d.ts +1 -0
- package/esm/registration/verifications/tpm/parsePubArea.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/verifyAttestationTPM.d.ts +1 -0
- package/esm/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/verifyAttestationTPM.js +11 -3
- package/esm/registration/verifications/verifyAttestationAndroidKey.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationAndroidKey.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationAndroidKey.js +3 -1
- package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationApple.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationApple.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationApple.js +2 -1
- package/esm/registration/verifications/verifyAttestationFIDOU2F.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationFIDOU2F.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationPacked.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationPacked.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationPacked.js +10 -3
- package/esm/registration/verifyRegistrationResponse.d.ts +5 -4
- package/esm/registration/verifyRegistrationResponse.d.ts.map +1 -0
- package/esm/registration/verifyRegistrationResponse.js +11 -7
- package/esm/services/defaultRootCerts/android-key.d.ts +1 -0
- package/esm/services/defaultRootCerts/android-key.d.ts.map +1 -0
- package/esm/services/defaultRootCerts/android-safetynet.d.ts +1 -0
- package/esm/services/defaultRootCerts/android-safetynet.d.ts.map +1 -0
- package/esm/services/defaultRootCerts/apple.d.ts +1 -0
- package/esm/services/defaultRootCerts/apple.d.ts.map +1 -0
- package/esm/services/defaultRootCerts/mds.d.ts +1 -0
- package/esm/services/defaultRootCerts/mds.d.ts.map +1 -0
- package/esm/services/metadataService.d.ts +19 -4
- package/esm/services/metadataService.d.ts.map +1 -0
- package/esm/services/metadataService.js +8 -3
- package/esm/services/settingsService.d.ts +17 -14
- package/esm/services/settingsService.d.ts.map +1 -0
- package/esm/services/settingsService.js +14 -0
- package/package.json +29 -33
- package/script/authentication/generateAuthenticationOptions.d.ts +2 -1
- package/script/authentication/generateAuthenticationOptions.d.ts.map +1 -0
- package/script/authentication/generateAuthenticationOptions.js +1 -2
- package/script/authentication/verifyAuthenticationResponse.d.ts +4 -3
- package/script/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
- package/script/authentication/verifyAuthenticationResponse.js +8 -9
- package/script/helpers/convertAAGUIDToString.d.ts +1 -0
- package/script/helpers/convertAAGUIDToString.d.ts.map +1 -0
- package/script/helpers/convertAAGUIDToString.js +5 -6
- package/script/helpers/convertCOSEtoPKCS.d.ts +1 -0
- package/script/helpers/convertCOSEtoPKCS.d.ts.map +1 -0
- package/script/helpers/convertCOSEtoPKCS.js +1 -2
- package/script/helpers/convertCertBufferToPEM.d.ts +2 -1
- package/script/helpers/convertCertBufferToPEM.d.ts.map +1 -0
- package/script/helpers/convertCertBufferToPEM.js +1 -2
- package/script/helpers/convertPEMToBytes.d.ts +1 -0
- package/script/helpers/convertPEMToBytes.d.ts.map +1 -0
- package/script/helpers/convertPEMToBytes.js +1 -2
- package/script/helpers/convertX509PublicKeyToCOSE.d.ts +1 -0
- package/script/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -0
- package/script/helpers/convertX509PublicKeyToCOSE.js +11 -9
- package/script/helpers/cose.d.ts +1 -0
- package/script/helpers/cose.d.ts.map +1 -0
- package/script/helpers/cose.js +11 -11
- package/script/helpers/decodeAttestationObject.d.ts +1 -0
- package/script/helpers/decodeAttestationObject.d.ts.map +1 -0
- package/script/helpers/decodeAttestationObject.js +2 -2
- package/script/helpers/decodeAuthenticatorExtensions.d.ts +5 -14
- package/script/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
- package/script/helpers/decodeAuthenticatorExtensions.js +1 -2
- package/script/helpers/decodeClientDataJSON.d.ts +2 -1
- package/script/helpers/decodeClientDataJSON.d.ts.map +1 -0
- package/script/helpers/decodeClientDataJSON.js +2 -2
- package/script/helpers/decodeCredentialPublicKey.d.ts +1 -0
- package/script/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
- package/script/helpers/decodeCredentialPublicKey.js +2 -2
- package/script/helpers/fetch.d.ts +1 -0
- package/script/helpers/fetch.d.ts.map +1 -0
- package/script/helpers/fetch.js +4 -4
- package/script/helpers/generateChallenge.d.ts +1 -0
- package/script/helpers/generateChallenge.d.ts.map +1 -0
- package/script/helpers/generateChallenge.js +2 -2
- package/script/helpers/generateUserID.d.ts +1 -0
- package/script/helpers/generateUserID.d.ts.map +1 -0
- package/script/helpers/generateUserID.js +2 -2
- package/script/helpers/getCertificateInfo.d.ts +2 -1
- package/script/helpers/getCertificateInfo.d.ts.map +1 -0
- package/script/helpers/getCertificateInfo.js +6 -6
- package/script/helpers/index.d.ts +1 -0
- package/script/helpers/index.d.ts.map +1 -0
- package/script/helpers/isCertRevoked.d.ts +2 -1
- package/script/helpers/isCertRevoked.d.ts.map +1 -0
- package/script/helpers/isCertRevoked.js +10 -10
- package/script/helpers/iso/index.d.ts +1 -0
- package/script/helpers/iso/index.d.ts.map +1 -0
- package/script/helpers/iso/isoBase64URL.d.ts +2 -1
- package/script/helpers/iso/isoBase64URL.d.ts.map +1 -0
- package/script/helpers/iso/isoBase64URL.js +20 -18
- package/script/helpers/iso/isoCBOR.d.ts +2 -1
- package/script/helpers/iso/isoCBOR.d.ts.map +1 -0
- package/script/helpers/iso/isoCBOR.js +28 -6
- package/script/helpers/iso/isoCrypto/digest.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/digest.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/digest.js +1 -2
- package/script/helpers/iso/isoCrypto/getRandomValues.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/getRandomValues.js +1 -2
- package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts +2 -1
- package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/getWebCrypto.js +2 -2
- package/script/helpers/iso/isoCrypto/importKey.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/importKey.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/importKey.js +1 -2
- package/script/helpers/iso/isoCrypto/index.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/index.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.js +1 -2
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.js +1 -2
- package/script/helpers/iso/isoCrypto/structs.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/structs.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +3 -1
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.js +62 -20
- package/script/helpers/iso/isoCrypto/verify.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verify.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verify.js +6 -3
- package/script/helpers/iso/isoCrypto/verifyEC2.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verifyEC2.js +1 -2
- package/script/helpers/iso/isoCrypto/verifyOKP.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verifyOKP.js +1 -2
- package/script/helpers/iso/isoCrypto/verifyRSA.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verifyRSA.js +1 -2
- package/script/helpers/iso/isoUint8Array.d.ts +1 -0
- package/script/helpers/iso/isoUint8Array.d.ts.map +1 -0
- package/script/helpers/iso/isoUint8Array.js +8 -9
- package/script/helpers/logging.d.ts +1 -0
- package/script/helpers/logging.d.ts.map +1 -0
- package/script/helpers/logging.js +2 -4
- package/script/helpers/mapX509SignatureAlgToCOSEAlg.d.ts +1 -0
- package/script/helpers/mapX509SignatureAlgToCOSEAlg.d.ts.map +1 -0
- package/script/helpers/mapX509SignatureAlgToCOSEAlg.js +1 -2
- package/script/helpers/matchExpectedRPID.d.ts +1 -0
- package/script/helpers/matchExpectedRPID.d.ts.map +1 -0
- package/script/helpers/matchExpectedRPID.js +1 -2
- package/script/helpers/parseAuthenticatorData.d.ts +1 -0
- package/script/helpers/parseAuthenticatorData.d.ts.map +1 -0
- package/script/helpers/parseAuthenticatorData.js +8 -8
- package/script/helpers/parseBackupFlags.d.ts +2 -1
- package/script/helpers/parseBackupFlags.d.ts.map +1 -0
- package/script/helpers/parseBackupFlags.js +2 -2
- package/script/helpers/toHash.d.ts +1 -0
- package/script/helpers/toHash.d.ts.map +1 -0
- package/script/helpers/toHash.js +1 -2
- package/script/helpers/validateCertificatePath.d.ts +1 -0
- package/script/helpers/validateCertificatePath.d.ts.map +1 -0
- package/script/helpers/validateCertificatePath.js +3 -4
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts +7 -0
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
- package/script/helpers/validateExtFIDOGenCEAAGUID.js +37 -0
- package/script/helpers/verifySignature.d.ts +1 -0
- package/script/helpers/verifySignature.d.ts.map +1 -0
- package/script/helpers/verifySignature.js +2 -2
- package/script/index.d.ts +1 -0
- package/script/index.d.ts.map +1 -0
- package/script/metadata/mdsTypes.d.ts +2 -1
- package/script/metadata/mdsTypes.d.ts.map +1 -0
- package/script/metadata/parseJWT.d.ts +1 -0
- package/script/metadata/parseJWT.d.ts.map +1 -0
- package/script/metadata/parseJWT.js +1 -2
- package/script/metadata/verifyAttestationWithMetadata.d.ts +2 -1
- package/script/metadata/verifyAttestationWithMetadata.d.ts.map +1 -0
- package/script/metadata/verifyAttestationWithMetadata.js +2 -2
- package/script/metadata/verifyJWT.d.ts +1 -0
- package/script/metadata/verifyJWT.d.ts.map +1 -0
- package/script/metadata/verifyJWT.js +1 -2
- package/script/registration/generateRegistrationOptions.d.ts +2 -1
- package/script/registration/generateRegistrationOptions.d.ts.map +1 -0
- package/script/registration/generateRegistrationOptions.js +2 -2
- package/script/registration/verifications/tpm/constants.d.ts +1 -0
- package/script/registration/verifications/tpm/constants.d.ts.map +1 -0
- package/script/registration/verifications/tpm/constants.js +8 -4
- package/script/registration/verifications/tpm/parseCertInfo.d.ts +1 -0
- package/script/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -0
- package/script/registration/verifications/tpm/parseCertInfo.js +1 -2
- package/script/registration/verifications/tpm/parsePubArea.d.ts +1 -0
- package/script/registration/verifications/tpm/parsePubArea.d.ts.map +1 -0
- package/script/registration/verifications/tpm/parsePubArea.js +1 -2
- package/script/registration/verifications/tpm/verifyAttestationTPM.d.ts +1 -0
- package/script/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -0
- package/script/registration/verifications/tpm/verifyAttestationTPM.js +17 -10
- package/script/registration/verifications/verifyAttestationAndroidKey.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationAndroidKey.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationAndroidKey.js +7 -6
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.js +1 -2
- package/script/registration/verifications/verifyAttestationApple.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationApple.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationApple.js +4 -4
- package/script/registration/verifications/verifyAttestationFIDOU2F.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationFIDOU2F.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationFIDOU2F.js +1 -2
- package/script/registration/verifications/verifyAttestationPacked.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationPacked.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationPacked.js +11 -5
- package/script/registration/verifyRegistrationResponse.d.ts +5 -4
- package/script/registration/verifyRegistrationResponse.d.ts.map +1 -0
- package/script/registration/verifyRegistrationResponse.js +12 -9
- package/script/services/defaultRootCerts/android-key.d.ts +1 -0
- package/script/services/defaultRootCerts/android-key.d.ts.map +1 -0
- package/script/services/defaultRootCerts/android-safetynet.d.ts +1 -0
- package/script/services/defaultRootCerts/android-safetynet.d.ts.map +1 -0
- package/script/services/defaultRootCerts/apple.d.ts +1 -0
- package/script/services/defaultRootCerts/apple.d.ts.map +1 -0
- package/script/services/defaultRootCerts/mds.d.ts +1 -0
- package/script/services/defaultRootCerts/mds.d.ts.map +1 -0
- package/script/services/metadataService.d.ts +19 -4
- package/script/services/metadataService.d.ts.map +1 -0
- package/script/services/metadataService.js +8 -3
- package/script/services/settingsService.d.ts +17 -14
- package/script/services/settingsService.d.ts.map +1 -0
- package/script/services/settingsService.js +14 -0
- package/esm/deps.d.ts +0 -9
- package/esm/deps.js +0 -12
- package/script/deps.d.ts +0 -9
- package/script/deps.js +0 -68
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
- [Installation](#installation)
|
|
7
7
|
- [Node LTS 20.x or higher](#node-lts-20x-or-higher)
|
|
8
|
-
- [Deno v1.
|
|
8
|
+
- [Deno v1.43.x or higher](#deno-v143x-or-higher)
|
|
9
9
|
- [Usage](#usage)
|
|
10
10
|
- [Supported Attestation Formats](#supported-attestation-formats)
|
|
11
11
|
|
|
@@ -13,21 +13,29 @@
|
|
|
13
13
|
|
|
14
14
|
### Node LTS 20.x or higher
|
|
15
15
|
|
|
16
|
-
This package
|
|
17
|
-
[ECMAScript modules (ESM)](https://nodejs.org/api/esm.html#enabling)** projects
|
|
16
|
+
This package can be installed from **NPM** (with support for **both CommonJS and
|
|
17
|
+
[ECMAScript modules (ESM)](https://nodejs.org/api/esm.html#enabling)** projects) or **JSR**:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
npm install @simplewebauthn/server
|
|
20
|
+
$ npm install @simplewebauthn/server
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
```sh
|
|
24
|
+
$ npx jsr add @simplewebauthn/server @simplewebauthn/types
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Deno v1.43.x or higher
|
|
24
28
|
|
|
25
|
-
It is also available for import into Deno projects from **deno.land/x**:
|
|
29
|
+
It is also available for import into Deno projects from **deno.land/x** or **JSR**:
|
|
26
30
|
|
|
27
31
|
```ts
|
|
28
32
|
import {...} from 'https://deno.land/x/simplewebauthn/deno/server.ts';
|
|
29
33
|
```
|
|
30
34
|
|
|
35
|
+
```sh
|
|
36
|
+
$ deno add jsr:@simplewebauthn/server jsr:@simplewebauthn/types
|
|
37
|
+
```
|
|
38
|
+
|
|
31
39
|
## Usage
|
|
32
40
|
|
|
33
41
|
You can find in-depth documentation on this package here:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthenticationExtensionsClientInputs, AuthenticatorTransportFuture, Base64URLString, PublicKeyCredentialRequestOptionsJSON, UserVerificationRequirement } from '
|
|
1
|
+
import type { AuthenticationExtensionsClientInputs, AuthenticatorTransportFuture, Base64URLString, PublicKeyCredentialRequestOptionsJSON, UserVerificationRequirement } from '@simplewebauthn/types';
|
|
2
2
|
export type GenerateAuthenticationOptionsOpts = {
|
|
3
3
|
rpID: string;
|
|
4
4
|
allowCredentials?: {
|
|
@@ -23,3 +23,4 @@ export type GenerateAuthenticationOptionsOpts = {
|
|
|
23
23
|
* @param extensions **(Optional)** - Additional plugins the authenticator or browser should use during authentication
|
|
24
24
|
*/
|
|
25
25
|
export declare function generateAuthenticationOptions(options: GenerateAuthenticationOptionsOpts): Promise<PublicKeyCredentialRequestOptionsJSON>;
|
|
26
|
+
//# sourceMappingURL=generateAuthenticationOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateAuthenticationOptions.d.ts","sourceRoot":"","sources":["../../src/authentication/generateAuthenticationOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oCAAoC,EACpC,4BAA4B,EAC5B,eAAe,EACf,qCAAqC,EACrC,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAK/B,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE;QACjB,EAAE,EAAE,eAAe,CAAC;QACpB,UAAU,CAAC,EAAE,4BAA4B,EAAE,CAAC;KAC7C,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;IAC/C,UAAU,CAAC,EAAE,oCAAoC,CAAC;CACnD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,qCAAqC,CAAC,CAoChD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { AuthenticationResponseJSON,
|
|
1
|
+
import type { AuthenticationResponseJSON, Base64URLString, CredentialDeviceType, UserVerificationRequirement, WebAuthnCredential } from '@simplewebauthn/types';
|
|
2
2
|
import { AuthenticationExtensionsAuthenticatorOutputs } from '../helpers/decodeAuthenticatorExtensions.js';
|
|
3
3
|
export type VerifyAuthenticationResponseOpts = {
|
|
4
4
|
response: AuthenticationResponseJSON;
|
|
5
5
|
expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>);
|
|
6
6
|
expectedOrigin: string | string[];
|
|
7
7
|
expectedRPID: string | string[];
|
|
8
|
-
|
|
8
|
+
credential: WebAuthnCredential;
|
|
9
9
|
expectedType?: string | string[];
|
|
10
10
|
requireUserVerification?: boolean;
|
|
11
11
|
advancedFIDOConfig?: {
|
|
@@ -21,7 +21,7 @@ export type VerifyAuthenticationResponseOpts = {
|
|
|
21
21
|
* @param expectedChallenge - The base64url-encoded `options.challenge` returned by `generateAuthenticationOptions()`
|
|
22
22
|
* @param expectedOrigin - Website URL (or array of URLs) that the registration should have occurred on
|
|
23
23
|
* @param expectedRPID - RP ID (or array of IDs) that was specified in the registration options
|
|
24
|
-
* @param
|
|
24
|
+
* @param credential - An internal {@link WebAuthnCredential} corresponding to `id` in the authentication response
|
|
25
25
|
* @param expectedType **(Optional)** - The response type expected ('webauthn.get')
|
|
26
26
|
* @param requireUserVerification **(Optional)** - Enforce user verification by the authenticator (via PIN, fingerprint, etc...) Defaults to `true`
|
|
27
27
|
* @param advancedFIDOConfig **(Optional)** - Options for satisfying more stringent FIDO RP feature requirements
|
|
@@ -61,3 +61,4 @@ export type VerifiedAuthenticationResponse = {
|
|
|
61
61
|
authenticatorExtensionResults?: AuthenticationExtensionsAuthenticatorOutputs;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
+
//# sourceMappingURL=verifyAuthenticationResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyAuthenticationResponse.d.ts","sourceRoot":"","sources":["../../src/authentication/verifyAuthenticationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAAE,4CAA4C,EAAE,MAAM,6CAA6C,CAAC;AAI3G,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,EAAE,0BAA0B,CAAC;IACrC,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAChF,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE;QACnB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;KAChD,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,8BAA8B,CAAC,CAmNzC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE;QAClB,YAAY,EAAE,eAAe,CAAC;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,OAAO,CAAC;QACtB,oBAAoB,EAAE,oBAAoB,CAAC;QAC3C,kBAAkB,EAAE,OAAO,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,6BAA6B,CAAC,EAAE,4CAA4C,CAAC;KAC9E,CAAC;CACH,CAAC"}
|
|
@@ -14,14 +14,14 @@ import { isoBase64URL, isoUint8Array } from '../helpers/iso/index.js';
|
|
|
14
14
|
* @param expectedChallenge - The base64url-encoded `options.challenge` returned by `generateAuthenticationOptions()`
|
|
15
15
|
* @param expectedOrigin - Website URL (or array of URLs) that the registration should have occurred on
|
|
16
16
|
* @param expectedRPID - RP ID (or array of IDs) that was specified in the registration options
|
|
17
|
-
* @param
|
|
17
|
+
* @param credential - An internal {@link WebAuthnCredential} corresponding to `id` in the authentication response
|
|
18
18
|
* @param expectedType **(Optional)** - The response type expected ('webauthn.get')
|
|
19
19
|
* @param requireUserVerification **(Optional)** - Enforce user verification by the authenticator (via PIN, fingerprint, etc...) Defaults to `true`
|
|
20
20
|
* @param advancedFIDOConfig **(Optional)** - Options for satisfying more stringent FIDO RP feature requirements
|
|
21
21
|
* @param advancedFIDOConfig.userVerification **(Optional)** - Enable alternative rules for evaluating the User Presence and User Verified flags in authenticator data: UV (and UP) flags are optional unless this value is `"required"`
|
|
22
22
|
*/
|
|
23
23
|
export async function verifyAuthenticationResponse(options) {
|
|
24
|
-
const { response, expectedChallenge, expectedOrigin, expectedRPID, expectedType,
|
|
24
|
+
const { response, expectedChallenge, expectedOrigin, expectedRPID, expectedType, credential, requireUserVerification = true, advancedFIDOConfig, } = options;
|
|
25
25
|
const { id, rawId, type: credentialType, response: assertionResponse } = response;
|
|
26
26
|
// Ensure credential specified an ID
|
|
27
27
|
if (!id) {
|
|
@@ -141,24 +141,24 @@ export async function verifyAuthenticationResponse(options) {
|
|
|
141
141
|
const clientDataHash = await toHash(isoBase64URL.toBuffer(assertionResponse.clientDataJSON));
|
|
142
142
|
const signatureBase = isoUint8Array.concat([authDataBuffer, clientDataHash]);
|
|
143
143
|
const signature = isoBase64URL.toBuffer(assertionResponse.signature);
|
|
144
|
-
if ((counter > 0 ||
|
|
145
|
-
counter <=
|
|
144
|
+
if ((counter > 0 || credential.counter > 0) &&
|
|
145
|
+
counter <= credential.counter) {
|
|
146
146
|
// Error out when the counter in the DB is greater than or equal to the counter in the
|
|
147
147
|
// dataStruct. It's related to how the authenticator maintains the number of times its been
|
|
148
148
|
// used for this client. If this happens, then someone's somehow increased the counter
|
|
149
149
|
// on the device without going through this site
|
|
150
|
-
throw new Error(`Response counter value ${counter} was lower than expected ${
|
|
150
|
+
throw new Error(`Response counter value ${counter} was lower than expected ${credential.counter}`);
|
|
151
151
|
}
|
|
152
152
|
const { credentialDeviceType, credentialBackedUp } = parseBackupFlags(flags);
|
|
153
153
|
const toReturn = {
|
|
154
154
|
verified: await verifySignature({
|
|
155
155
|
signature,
|
|
156
156
|
data: signatureBase,
|
|
157
|
-
credentialPublicKey:
|
|
157
|
+
credentialPublicKey: credential.publicKey,
|
|
158
158
|
}),
|
|
159
159
|
authenticationInfo: {
|
|
160
160
|
newCounter: counter,
|
|
161
|
-
credentialID:
|
|
161
|
+
credentialID: credential.id,
|
|
162
162
|
userVerified: flags.uv,
|
|
163
163
|
credentialDeviceType,
|
|
164
164
|
credentialBackedUp,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertAAGUIDToString.d.ts","sourceRoot":"","sources":["../../src/helpers/convertAAGUIDToString.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAchE"}
|
|
@@ -6,10 +6,10 @@ export function convertAAGUIDToString(aaguid) {
|
|
|
6
6
|
// Raw Hex: adce000235bcc60a648b0b25f1f05503
|
|
7
7
|
const hex = isoUint8Array.toHex(aaguid);
|
|
8
8
|
const segments = [
|
|
9
|
-
hex.slice(0, 8),
|
|
10
|
-
hex.slice(8, 12),
|
|
11
|
-
hex.slice(12, 16),
|
|
12
|
-
hex.slice(16, 20),
|
|
9
|
+
hex.slice(0, 8), // 8
|
|
10
|
+
hex.slice(8, 12), // 4
|
|
11
|
+
hex.slice(12, 16), // 4
|
|
12
|
+
hex.slice(16, 20), // 4
|
|
13
13
|
hex.slice(20, 32), // 8
|
|
14
14
|
];
|
|
15
15
|
// Formatted: adce0002-35bc-c60a-648b-0b25f1f05503
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertCOSEtoPKCS.d.ts","sourceRoot":"","sources":["../../src/helpers/convertCOSEtoPKCS.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,CAmBvE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Base64URLString } from '
|
|
1
|
+
import type { Base64URLString } from '@simplewebauthn/types';
|
|
2
2
|
/**
|
|
3
3
|
* Convert buffer to an OpenSSL-compatible PEM text format.
|
|
4
4
|
*/
|
|
5
5
|
export declare function convertCertBufferToPEM(certBuffer: Uint8Array | Base64URLString): string;
|
|
6
|
+
//# sourceMappingURL=convertCertBufferToPEM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertCertBufferToPEM.d.ts","sourceRoot":"","sources":["../../src/helpers/convertCertBufferToPEM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,GAAG,eAAe,GACvC,MAAM,CA4BR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertPEMToBytes.d.ts","sourceRoot":"","sources":["../../src/helpers/convertPEMToBytes.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAOzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertX509PublicKeyToCOSE.d.ts","sourceRoot":"","sources":["../../src/helpers/convertX509PublicKeyToCOSE.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,aAAa,EAGd,MAAM,WAAW,CAAC;AAKnB,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,UAAU,GAC1B,aAAa,CA+Ff"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { AsnParser
|
|
1
|
+
import { AsnParser } from '@peculiar/asn1-schema';
|
|
2
|
+
import { Certificate } from '@peculiar/asn1-x509';
|
|
3
|
+
import { ECParameters, id_ecPublicKey, id_secp256r1, id_secp384r1 } from '@peculiar/asn1-ecc';
|
|
2
4
|
import { COSECRV, COSEKEYS, COSEKTY, } from './cose.js';
|
|
5
|
+
import { RSAPublicKey } from '@peculiar/asn1-rsa';
|
|
3
6
|
import { mapX509SignatureAlgToCOSEAlg } from './mapX509SignatureAlgToCOSEAlg.js';
|
|
4
7
|
export function convertX509PublicKeyToCOSE(x509Certificate) {
|
|
5
8
|
let cosePublicKey = new Map();
|
package/esm/helpers/cose.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cose.d.ts","sourceRoot":"","sources":["../../src/helpers/cose.ts"],"names":[],"mappings":"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"}
|
|
@@ -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;AAGF,eAAO,MAAM,iCAAiC;sBAC1B,iBAAiB;CACpC,CAAC"}
|
|
@@ -4,17 +4,8 @@
|
|
|
4
4
|
* @param extensionData Authenticator Extension Data buffer
|
|
5
5
|
*/
|
|
6
6
|
export declare function decodeAuthenticatorExtensions(extensionData: Uint8Array): AuthenticationExtensionsAuthenticatorOutputs | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
dpk?: Uint8Array;
|
|
13
|
-
sig?: string;
|
|
14
|
-
nonce?: Uint8Array;
|
|
15
|
-
scope?: Uint8Array;
|
|
16
|
-
aaguid?: Uint8Array;
|
|
17
|
-
};
|
|
18
|
-
export type UVMAuthenticatorOutput = {
|
|
19
|
-
uvm?: Uint8Array[];
|
|
20
|
-
};
|
|
7
|
+
/**
|
|
8
|
+
* Attempt to support authenticator extensions we might not know about in WebAuthn
|
|
9
|
+
*/
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import type { Base64URLString } from '
|
|
1
|
+
import type { Base64URLString } from '@simplewebauthn/types';
|
|
2
2
|
/**
|
|
3
3
|
* Decode an authenticator's base64url-encoded clientDataJSON to JSON
|
|
4
4
|
*/
|
|
@@ -16,3 +16,4 @@ export type ClientDataJSON = {
|
|
|
16
16
|
export declare const _decodeClientDataJSONInternals: {
|
|
17
17
|
stubThis: (value: ClientDataJSON) => ClientDataJSON;
|
|
18
18
|
};
|
|
19
|
+
//# 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,uBAAuB,CAAC;AAI7D;;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;AAGF,eAAO,MAAM,8BAA8B;sBACvB,cAAc;CACjC,CAAC"}
|
|
@@ -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;AAGD,eAAO,MAAM,mCAAmC;sBAC5B,aAAa;CAChC,CAAC"}
|
package/esm/helpers/fetch.d.ts
CHANGED
|
@@ -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;AAGD,eAAO,MAAM,eAAe;oBACV,MAAM;CACvB,CAAC"}
|
package/esm/helpers/fetch.js
CHANGED
|
@@ -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;AAGD,eAAO,MAAM,2BAA2B;sBACpB,UAAU;CAC7B,CAAC"}
|
|
@@ -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;AAGD,eAAO,MAAM,wBAAwB;sBACjB,UAAU;CAC7B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Certificate } from '
|
|
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,4 +1,5 @@
|
|
|
1
|
-
import { AsnParser
|
|
1
|
+
import { AsnParser } from '@peculiar/asn1-schema';
|
|
2
|
+
import { BasicConstraints, Certificate, id_ce_basicConstraints } from '@peculiar/asn1-x509';
|
|
2
3
|
const issuerSubjectIDKey = {
|
|
3
4
|
'2.5.4.6': 'C',
|
|
4
5
|
'2.5.4.10': 'O',
|
package/esm/helpers/index.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ import type { ClientDataJSON } from './decodeClientDataJSON.js';
|
|
|
21
21
|
import type { COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA } from './cose.js';
|
|
22
22
|
import type { ParsedAuthenticatorData } from './parseAuthenticatorData.js';
|
|
23
23
|
export type { AttestationFormat, AttestationObject, AttestationStatement, CertificateInfo, ClientDataJSON, COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA, ParsedAuthenticatorData, };
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,IAAI,EACJ,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,SAAS,EACT,aAAa,EACb,sBAAsB,EACtB,MAAM,EACN,uBAAuB,EACvB,eAAe,GAChB,CAAC;AAEF,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,GACxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Certificate } from '
|
|
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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AsnParser
|
|
1
|
+
import { AsnParser } from '@peculiar/asn1-schema';
|
|
2
|
+
import { AuthorityKeyIdentifier, CertificateList, CRLDistributionPoints, id_ce_authorityKeyIdentifier, id_ce_cRLDistributionPoints, id_ce_subjectKeyIdentifier, SubjectKeyIdentifier, } from '@peculiar/asn1-x509';
|
|
2
3
|
import { isoUint8Array } from './iso/index.js';
|
|
3
4
|
import { fetch } from './fetch.js';
|
|
4
5
|
const cacheRevokedCerts = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Base64URLString } from '
|
|
1
|
+
import type { Base64URLString } from '@simplewebauthn/types';
|
|
2
2
|
/**
|
|
3
3
|
* Decode from a Base64URL-encoded string to an ArrayBuffer. Best used when converting a
|
|
4
4
|
* credential ID from a JSON string to an ArrayBuffer, like in allowCredentials or
|
|
@@ -40,3 +40,4 @@ export declare function isBase64URL(input: string): boolean;
|
|
|
40
40
|
* Remove optional padding from a base64url-encoded string
|
|
41
41
|
*/
|
|
42
42
|
export declare function trimPadding(input: Base64URLString): Base64URLString;
|
|
43
|
+
//# sourceMappingURL=isoBase64URL.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isoBase64URL.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoBase64URL.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,QAAQ,GAAG,WAAyB,GACzC,UAAU,CAGZ;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,UAAU,EAClB,EAAE,GAAE,QAAQ,GAAG,WAAyB,GACvC,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAEnE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as tinyCbor from '@levischuck/tiny-cbor';
|
|
2
2
|
/**
|
|
3
3
|
* Whatever CBOR encoder is used should keep CBOR data the same length when data is re-encoded
|
|
4
4
|
*
|
|
@@ -21,3 +21,4 @@ export declare function decodeFirst<Type>(input: Uint8Array): Type;
|
|
|
21
21
|
* Encode data to CBOR
|
|
22
22
|
*/
|
|
23
23
|
export declare function encode(input: tinyCbor.CBORType): Uint8Array;
|
|
24
|
+
//# sourceMappingURL=isoCBOR.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isoCBOR.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoCBOR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAQzD;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAE3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/digest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAIxC;;;;;GAKG;AACH,wBAAsB,MAAM,CAC1B,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,UAAU,CAAC,CAQrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRandomValues.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/getRandomValues.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAM5E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Crypto } from '
|
|
1
|
+
import type { Crypto } from '@simplewebauthn/types';
|
|
2
2
|
/**
|
|
3
3
|
* Try to get an instance of the Crypto API from the current runtime. Should support Node,
|
|
4
4
|
* as well as others, like Deno, that implement Web APIs.
|
|
@@ -11,3 +11,4 @@ export declare const _getWebCryptoInternals: {
|
|
|
11
11
|
stubThisGlobalThisCrypto: () => globalThis.Crypto;
|
|
12
12
|
setCachedCrypto: (newCrypto: Crypto | undefined) => void;
|
|
13
13
|
};
|
|
14
|
+
//# sourceMappingURL=getWebCrypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWebCrypto.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/getWebCrypto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAgC9C;AAED,qBAAa,gBAAiB,SAAQ,KAAK;;CAM1C;AAGD,eAAO,MAAM,sBAAsB;;iCAGJ,MAAM,GAAG,SAAS;CAGhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importKey.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/importKey.ts"],"names":[],"mappings":"AAEA,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,OAAO,EAAE,UAAU,CAAC;IACpB,SAAS,EAAE,mBAAmB,GAAG,qBAAqB,GAAG,iBAAiB,CAAC;CAC5E,GAAG,OAAO,CAAC,SAAS,CAAC,CAQrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapCoseAlgToWebCryptoAlg.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,CAetE"}
|
|
@@ -4,3 +4,4 @@ import { SubtleCryptoKeyAlgName } from './structs.js';
|
|
|
4
4
|
* Convert a COSE alg ID into a corresponding key algorithm string value that WebCrypto APIs expect
|
|
5
5
|
*/
|
|
6
6
|
export declare function mapCoseAlgToWebCryptoKeyAlgName(alg: COSEALG): SubtleCryptoKeyAlgName;
|
|
7
|
+
//# sourceMappingURL=mapCoseAlgToWebCryptoKeyAlgName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapCoseAlgToWebCryptoKeyAlgName.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,OAAO,GACX,sBAAsB,CAoBxB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type SubtleCryptoAlg = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
|
|
2
2
|
export type SubtleCryptoCrv = 'P-256' | 'P-384' | 'P-521' | 'Ed25519';
|
|
3
3
|
export type SubtleCryptoKeyAlgName = 'ECDSA' | 'Ed25519' | 'RSASSA-PKCS1-v1_5' | 'RSA-PSS';
|
|
4
|
+
//# sourceMappingURL=structs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structs.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/structs.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AACtE,MAAM,MAAM,sBAAsB,GAC9B,OAAO,GACP,SAAS,GACT,mBAAmB,GACnB,SAAS,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { COSECRV } from '../../cose.js';
|
|
1
2
|
/**
|
|
2
3
|
* In WebAuthn, EC2 signatures are wrapped in ASN.1 structure so we need to peel r and s apart.
|
|
3
4
|
*
|
|
4
5
|
* See https://www.w3.org/TR/webauthn-2/#sctn-signature-attestation-types
|
|
5
6
|
*/
|
|
6
|
-
export declare function unwrapEC2Signature(signature: Uint8Array): Uint8Array;
|
|
7
|
+
export declare function unwrapEC2Signature(signature: Uint8Array, crv: COSECRV): Uint8Array;
|
|
8
|
+
//# sourceMappingURL=unwrapEC2Signature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unwrapEC2Signature.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/unwrapEC2Signature.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,GAAG,UAAU,CAelF"}
|