@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.
- package/README.md +11 -12
- package/esm/authentication/generateAuthenticationOptions.d.ts +14 -13
- package/esm/authentication/generateAuthenticationOptions.d.ts.map +1 -0
- package/esm/authentication/verifyAuthenticationResponse.d.ts +19 -15
- package/esm/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
- 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 +23 -0
- package/esm/helpers/cose.d.ts.map +1 -0
- package/esm/helpers/cose.js +20 -0
- package/esm/helpers/decodeAttestationObject.d.ts +5 -0
- package/esm/helpers/decodeAttestationObject.d.ts.map +1 -0
- package/esm/helpers/decodeAttestationObject.js +4 -1
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts +1 -0
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
- package/esm/helpers/decodeClientDataJSON.d.ts +6 -1
- package/esm/helpers/decodeClientDataJSON.d.ts.map +1 -0
- package/esm/helpers/decodeClientDataJSON.js +4 -1
- package/esm/helpers/decodeCredentialPublicKey.d.ts +5 -0
- package/esm/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
- package/esm/helpers/decodeCredentialPublicKey.js +4 -1
- package/esm/helpers/fetch.d.ts +5 -0
- package/esm/helpers/fetch.d.ts.map +1 -0
- package/esm/helpers/fetch.js +5 -2
- package/esm/helpers/generateChallenge.d.ts +5 -0
- package/esm/helpers/generateChallenge.d.ts.map +1 -0
- package/esm/helpers/generateChallenge.js +4 -1
- package/esm/helpers/generateUserID.d.ts +5 -0
- package/esm/helpers/generateUserID.d.ts.map +1 -0
- package/esm/helpers/generateUserID.js +4 -1
- 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 +17 -23
- package/esm/helpers/index.d.ts.map +1 -0
- package/esm/helpers/index.js +16 -17
- 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 +5 -1
- package/esm/helpers/iso/isoCBOR.d.ts +6 -1
- package/esm/helpers/iso/isoCBOR.d.ts.map +1 -0
- package/esm/helpers/iso/isoCBOR.js +5 -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 +5 -0
- package/esm/helpers/iso/isoCrypto/index.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/index.js +4 -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 +1 -0
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.js +2 -1
- 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/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 +5 -0
- package/esm/helpers/iso/isoUint8Array.d.ts.map +1 -0
- package/esm/helpers/iso/isoUint8Array.js +4 -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 +5 -0
- package/esm/helpers/parseAuthenticatorData.d.ts.map +1 -0
- package/esm/helpers/parseAuthenticatorData.js +10 -7
- 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 +4 -3
- package/esm/helpers/validateCertificatePath.d.ts.map +1 -0
- package/esm/helpers/validateCertificatePath.js +82 -59
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts +2 -1
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
- package/esm/helpers/validateExtFIDOGenCEAAGUID.js +1 -1
- package/esm/helpers/verifySignature.d.ts +5 -0
- package/esm/helpers/verifySignature.d.ts.map +1 -0
- package/esm/helpers/verifySignature.js +4 -1
- package/esm/index.d.ts +9 -17
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +8 -11
- package/esm/metadata/mdsTypes.d.ts +6 -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 +3 -2
- package/esm/metadata/verifyAttestationWithMetadata.d.ts.map +1 -0
- package/esm/metadata/verifyAttestationWithMetadata.js +1 -1
- package/esm/metadata/verifyJWT.d.ts +1 -0
- package/esm/metadata/verifyJWT.d.ts.map +1 -0
- package/esm/registration/generateRegistrationOptions.d.ts +22 -19
- package/esm/registration/generateRegistrationOptions.d.ts.map +1 -0
- package/esm/registration/generateRegistrationOptions.js +22 -1
- 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 +4 -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 +2 -1
- 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/verifyRegistrationResponse.d.ts +18 -14
- package/esm/registration/verifyRegistrationResponse.d.ts.map +1 -0
- 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 +30 -11
- package/esm/services/metadataService.d.ts.map +1 -0
- package/esm/services/metadataService.js +8 -22
- package/esm/services/settingsService.d.ts +18 -5
- package/esm/services/settingsService.d.ts.map +1 -0
- package/esm/services/settingsService.js +14 -10
- package/esm/types/dom.d.ts +329 -0
- package/esm/types/dom.d.ts.map +1 -0
- package/esm/types/dom.js +1 -0
- package/esm/types/index.d.ts +205 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +1 -0
- package/package.json +27 -32
- package/script/authentication/generateAuthenticationOptions.d.ts +14 -13
- package/script/authentication/generateAuthenticationOptions.d.ts.map +1 -0
- package/script/authentication/generateAuthenticationOptions.js +1 -2
- package/script/authentication/verifyAuthenticationResponse.d.ts +19 -15
- package/script/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
- package/script/authentication/verifyAuthenticationResponse.js +1 -2
- 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 +23 -0
- package/script/helpers/cose.d.ts.map +1 -0
- package/script/helpers/cose.js +31 -11
- package/script/helpers/decodeAttestationObject.d.ts +5 -0
- package/script/helpers/decodeAttestationObject.d.ts.map +1 -0
- package/script/helpers/decodeAttestationObject.js +6 -3
- package/script/helpers/decodeAuthenticatorExtensions.d.ts +1 -0
- package/script/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
- package/script/helpers/decodeAuthenticatorExtensions.js +1 -2
- package/script/helpers/decodeClientDataJSON.d.ts +6 -1
- package/script/helpers/decodeClientDataJSON.d.ts.map +1 -0
- package/script/helpers/decodeClientDataJSON.js +6 -3
- package/script/helpers/decodeCredentialPublicKey.d.ts +5 -0
- package/script/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
- package/script/helpers/decodeCredentialPublicKey.js +6 -3
- package/script/helpers/fetch.d.ts +5 -0
- package/script/helpers/fetch.d.ts.map +1 -0
- package/script/helpers/fetch.js +8 -5
- package/script/helpers/generateChallenge.d.ts +5 -0
- package/script/helpers/generateChallenge.d.ts.map +1 -0
- package/script/helpers/generateChallenge.js +6 -3
- package/script/helpers/generateUserID.d.ts +5 -0
- package/script/helpers/generateUserID.d.ts.map +1 -0
- package/script/helpers/generateUserID.js +6 -3
- 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 +17 -23
- package/script/helpers/index.d.ts.map +1 -0
- package/script/helpers/index.js +20 -36
- 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 +24 -18
- package/script/helpers/iso/isoCBOR.d.ts +6 -1
- package/script/helpers/iso/isoCBOR.d.ts.map +1 -0
- package/script/helpers/iso/isoCBOR.js +32 -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 +5 -0
- package/script/helpers/iso/isoCrypto/index.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/index.js +4 -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 +1 -0
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.js +4 -4
- 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 +1 -2
- 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 +5 -0
- package/script/helpers/iso/isoUint8Array.d.ts.map +1 -0
- package/script/helpers/iso/isoUint8Array.js +12 -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 +5 -0
- package/script/helpers/parseAuthenticatorData.d.ts.map +1 -0
- package/script/helpers/parseAuthenticatorData.js +12 -9
- 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 +4 -3
- package/script/helpers/validateCertificatePath.d.ts.map +1 -0
- package/script/helpers/validateCertificatePath.js +83 -61
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts +2 -1
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
- package/script/helpers/validateExtFIDOGenCEAAGUID.js +3 -4
- package/script/helpers/verifySignature.d.ts +5 -0
- package/script/helpers/verifySignature.d.ts.map +1 -0
- package/script/helpers/verifySignature.js +6 -3
- package/script/index.d.ts +9 -17
- package/script/index.d.ts.map +1 -0
- package/script/index.js +22 -17
- package/script/metadata/mdsTypes.d.ts +6 -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 +3 -2
- 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 +22 -19
- package/script/registration/generateRegistrationOptions.d.ts.map +1 -0
- package/script/registration/generateRegistrationOptions.js +24 -3
- 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 +4 -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 +8 -8
- 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 +1 -2
- package/script/registration/verifyRegistrationResponse.d.ts +18 -14
- package/script/registration/verifyRegistrationResponse.d.ts.map +1 -0
- package/script/registration/verifyRegistrationResponse.js +1 -2
- 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 +30 -11
- package/script/services/metadataService.d.ts.map +1 -0
- package/script/services/metadataService.js +8 -22
- package/script/services/settingsService.d.ts +18 -5
- package/script/services/settingsService.d.ts.map +1 -0
- package/script/services/settingsService.js +14 -10
- package/script/types/dom.d.ts +329 -0
- package/script/types/dom.d.ts.map +1 -0
- package/script/types/dom.js +2 -0
- package/script/types/index.d.ts +205 -0
- package/script/types/index.d.ts.map +1 -0
- package/script/types/index.js +2 -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 -70
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/types/dom.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH;;;;GAIG;AACH;;;;GAIG;AACH,MAAM,WAAW,8BAA+B,SAAQ,qBAAqB;IACzE,mHAAmH;IACnH,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC;IACxC,2GAA2G;IAC3G,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,4GAA4G;IAC5G,QAAQ,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,gCAAiC,SAAQ,qBAAqB;IAC3E,qHAAqH;IACrH,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC;IACxC,wHAAwH;IACxH,oBAAoB,IAAI,WAAW,CAAC;IACpC,gHAAgH;IAChH,YAAY,IAAI,WAAW,GAAG,IAAI,CAAC;IACnC,yHAAyH;IACzH,qBAAqB,IAAI,uBAAuB,CAAC;IACjD,iHAAiH;IACjH,aAAa,IAAI,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,oCAAoC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,qCAAqC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,0BAA0B,CAAC;IACvC,gBAAgB,CAAC,EAAE,OAA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
+
* DO NOT MODIFY THESE FILES!
|
|
3
|
+
*
|
|
4
|
+
* These files were copied from the **types** package. To update this file, make changes to those
|
|
5
|
+
* files instead and then run the following command from the monorepo root folder:
|
|
6
|
+
*
|
|
7
|
+
* deno task codegen:types
|
|
8
|
+
*/
|
|
9
|
+
import type { AttestationConveyancePreference, AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs, AuthenticatorAssertionResponse, AuthenticatorAttachment, AuthenticatorAttestationResponse, AuthenticatorSelectionCriteria, COSEAlgorithmIdentifier, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, PublicKeyCredentialParameters, PublicKeyCredentialRequestOptions, PublicKeyCredentialRpEntity, PublicKeyCredentialType, UserVerificationRequirement } from './dom.js';
|
|
10
|
+
export type { AttestationConveyancePreference, AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs, AuthenticatorAssertionResponse, AuthenticatorAttachment, AuthenticatorAttestationResponse, AuthenticatorSelectionCriteria, AuthenticatorTransport, COSEAlgorithmIdentifier, Crypto, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, PublicKeyCredentialParameters, PublicKeyCredentialRequestOptions, PublicKeyCredentialRpEntity, PublicKeyCredentialType, PublicKeyCredentialUserEntity, UserVerificationRequirement, } from './dom.js';
|
|
11
|
+
/**
|
|
12
|
+
* A variant of PublicKeyCredentialCreationOptions suitable for JSON transmission to the browser to
|
|
13
|
+
* (eventually) get passed into navigator.credentials.create(...) in the browser.
|
|
14
|
+
*
|
|
15
|
+
* This should eventually get replaced with official TypeScript DOM types when WebAuthn L3 types
|
|
16
|
+
* eventually make it into the language:
|
|
17
|
+
*
|
|
18
|
+
* https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptionsjson
|
|
19
|
+
*/
|
|
20
|
+
export interface PublicKeyCredentialCreationOptionsJSON {
|
|
21
|
+
rp: PublicKeyCredentialRpEntity;
|
|
22
|
+
user: PublicKeyCredentialUserEntityJSON;
|
|
23
|
+
challenge: Base64URLString;
|
|
24
|
+
pubKeyCredParams: PublicKeyCredentialParameters[];
|
|
25
|
+
timeout?: number;
|
|
26
|
+
excludeCredentials?: PublicKeyCredentialDescriptorJSON[];
|
|
27
|
+
authenticatorSelection?: AuthenticatorSelectionCriteria;
|
|
28
|
+
hints?: PublicKeyCredentialHint[];
|
|
29
|
+
attestation?: AttestationConveyancePreference;
|
|
30
|
+
attestationFormats?: AttestationFormat[];
|
|
31
|
+
extensions?: AuthenticationExtensionsClientInputs;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to
|
|
35
|
+
* (eventually) get passed into navigator.credentials.get(...) in the browser.
|
|
36
|
+
*/
|
|
37
|
+
export interface PublicKeyCredentialRequestOptionsJSON {
|
|
38
|
+
challenge: Base64URLString;
|
|
39
|
+
timeout?: number;
|
|
40
|
+
rpId?: string;
|
|
41
|
+
allowCredentials?: PublicKeyCredentialDescriptorJSON[];
|
|
42
|
+
userVerification?: UserVerificationRequirement;
|
|
43
|
+
hints?: PublicKeyCredentialHint[];
|
|
44
|
+
extensions?: AuthenticationExtensionsClientInputs;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptorjson
|
|
48
|
+
*/
|
|
49
|
+
export interface PublicKeyCredentialDescriptorJSON {
|
|
50
|
+
id: Base64URLString;
|
|
51
|
+
type: PublicKeyCredentialType;
|
|
52
|
+
transports?: AuthenticatorTransportFuture[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentityjson
|
|
56
|
+
*/
|
|
57
|
+
export interface PublicKeyCredentialUserEntityJSON {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
displayName: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The value returned from navigator.credentials.create()
|
|
64
|
+
*/
|
|
65
|
+
export interface RegistrationCredential extends PublicKeyCredentialFuture {
|
|
66
|
+
response: AuthenticatorAttestationResponseFuture;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A slightly-modified RegistrationCredential to simplify working with ArrayBuffers that
|
|
70
|
+
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
|
|
71
|
+
*
|
|
72
|
+
* https://w3c.github.io/webauthn/#dictdef-registrationresponsejson
|
|
73
|
+
*/
|
|
74
|
+
export interface RegistrationResponseJSON {
|
|
75
|
+
id: Base64URLString;
|
|
76
|
+
rawId: Base64URLString;
|
|
77
|
+
response: AuthenticatorAttestationResponseJSON;
|
|
78
|
+
authenticatorAttachment?: AuthenticatorAttachment;
|
|
79
|
+
clientExtensionResults: AuthenticationExtensionsClientOutputs;
|
|
80
|
+
type: PublicKeyCredentialType;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The value returned from navigator.credentials.get()
|
|
84
|
+
*/
|
|
85
|
+
export interface AuthenticationCredential extends PublicKeyCredentialFuture {
|
|
86
|
+
response: AuthenticatorAssertionResponse;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A slightly-modified AuthenticationCredential to simplify working with ArrayBuffers that
|
|
90
|
+
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
|
|
91
|
+
*
|
|
92
|
+
* https://w3c.github.io/webauthn/#dictdef-authenticationresponsejson
|
|
93
|
+
*/
|
|
94
|
+
export interface AuthenticationResponseJSON {
|
|
95
|
+
id: Base64URLString;
|
|
96
|
+
rawId: Base64URLString;
|
|
97
|
+
response: AuthenticatorAssertionResponseJSON;
|
|
98
|
+
authenticatorAttachment?: AuthenticatorAttachment;
|
|
99
|
+
clientExtensionResults: AuthenticationExtensionsClientOutputs;
|
|
100
|
+
type: PublicKeyCredentialType;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that
|
|
104
|
+
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
|
|
105
|
+
*
|
|
106
|
+
* https://w3c.github.io/webauthn/#dictdef-authenticatorattestationresponsejson
|
|
107
|
+
*/
|
|
108
|
+
export interface AuthenticatorAttestationResponseJSON {
|
|
109
|
+
clientDataJSON: Base64URLString;
|
|
110
|
+
attestationObject: Base64URLString;
|
|
111
|
+
authenticatorData?: Base64URLString;
|
|
112
|
+
transports?: AuthenticatorTransportFuture[];
|
|
113
|
+
publicKeyAlgorithm?: COSEAlgorithmIdentifier;
|
|
114
|
+
publicKey?: Base64URLString;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that
|
|
118
|
+
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
|
|
119
|
+
*
|
|
120
|
+
* https://w3c.github.io/webauthn/#dictdef-authenticatorassertionresponsejson
|
|
121
|
+
*/
|
|
122
|
+
export interface AuthenticatorAssertionResponseJSON {
|
|
123
|
+
clientDataJSON: Base64URLString;
|
|
124
|
+
authenticatorData: Base64URLString;
|
|
125
|
+
signature: Base64URLString;
|
|
126
|
+
userHandle?: Base64URLString;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Public key credential information needed to verify authentication responses
|
|
130
|
+
*/
|
|
131
|
+
export type WebAuthnCredential = {
|
|
132
|
+
id: Base64URLString;
|
|
133
|
+
publicKey: Uint8Array;
|
|
134
|
+
counter: number;
|
|
135
|
+
transports?: AuthenticatorTransportFuture[];
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* An attempt to communicate that this isn't just any string, but a Base64URL-encoded string
|
|
139
|
+
*/
|
|
140
|
+
export type Base64URLString = string;
|
|
141
|
+
/**
|
|
142
|
+
* AuthenticatorAttestationResponse in TypeScript's DOM lib is outdated (up through v3.9.7).
|
|
143
|
+
* Maintain an augmented version here so we can implement additional properties as the WebAuthn
|
|
144
|
+
* spec evolves.
|
|
145
|
+
*
|
|
146
|
+
* See https://www.w3.org/TR/webauthn-2/#iface-authenticatorattestationresponse
|
|
147
|
+
*
|
|
148
|
+
* Properties marked optional are not supported in all browsers.
|
|
149
|
+
*/
|
|
150
|
+
export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAttestationResponse {
|
|
151
|
+
getTransports(): AuthenticatorTransportFuture[];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* A super class of TypeScript's `AuthenticatorTransport` that includes support for the latest
|
|
155
|
+
* transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
|
|
156
|
+
* know about it (sometime after 4.6.3)
|
|
157
|
+
*/
|
|
158
|
+
export type AuthenticatorTransportFuture = 'ble' | 'cable' | 'hybrid' | 'internal' | 'nfc' | 'smart-card' | 'usb';
|
|
159
|
+
/**
|
|
160
|
+
* A super class of TypeScript's `PublicKeyCredentialDescriptor` that knows about the latest
|
|
161
|
+
* transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
|
|
162
|
+
* know about it (sometime after 4.6.3)
|
|
163
|
+
*/
|
|
164
|
+
export interface PublicKeyCredentialDescriptorFuture extends Omit<PublicKeyCredentialDescriptor, 'transports'> {
|
|
165
|
+
transports?: AuthenticatorTransportFuture[];
|
|
166
|
+
}
|
|
167
|
+
/** */
|
|
168
|
+
export type PublicKeyCredentialJSON = RegistrationResponseJSON | AuthenticationResponseJSON;
|
|
169
|
+
/**
|
|
170
|
+
* A super class of TypeScript's `PublicKeyCredential` that knows about upcoming WebAuthn features
|
|
171
|
+
*/
|
|
172
|
+
export interface PublicKeyCredentialFuture extends PublicKeyCredential {
|
|
173
|
+
type: PublicKeyCredentialType;
|
|
174
|
+
isConditionalMediationAvailable?(): Promise<boolean>;
|
|
175
|
+
parseCreationOptionsFromJSON?(options: PublicKeyCredentialCreationOptionsJSON): PublicKeyCredentialCreationOptions;
|
|
176
|
+
parseRequestOptionsFromJSON?(options: PublicKeyCredentialRequestOptionsJSON): PublicKeyCredentialRequestOptions;
|
|
177
|
+
toJSON?(): PublicKeyCredentialJSON;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The two types of credentials as defined by bit 3 ("Backup Eligibility") in authenticator data:
|
|
181
|
+
* - `"singleDevice"` credentials will never be backed up
|
|
182
|
+
* - `"multiDevice"` credentials can be backed up
|
|
183
|
+
*/
|
|
184
|
+
export type CredentialDeviceType = 'singleDevice' | 'multiDevice';
|
|
185
|
+
/**
|
|
186
|
+
* Categories of authenticators that Relying Parties can pass along to browsers during
|
|
187
|
+
* registration. Browsers that understand these values can optimize their modal experience to
|
|
188
|
+
* start the user off in a particular registration flow:
|
|
189
|
+
*
|
|
190
|
+
* - `hybrid`: A platform authenticator on a mobile device
|
|
191
|
+
* - `security-key`: A portable FIDO2 authenticator capable of being used on multiple devices via a USB or NFC connection
|
|
192
|
+
* - `client-device`: The device that WebAuthn is being called on. Typically synonymous with platform authenticators
|
|
193
|
+
*
|
|
194
|
+
* See https://w3c.github.io/webauthn/#enumdef-publickeycredentialhint
|
|
195
|
+
*
|
|
196
|
+
* These values are less strict than `authenticatorAttachment`
|
|
197
|
+
*/
|
|
198
|
+
export type PublicKeyCredentialHint = 'hybrid' | 'security-key' | 'client-device';
|
|
199
|
+
/**
|
|
200
|
+
* Values for an attestation object's `fmt`
|
|
201
|
+
*
|
|
202
|
+
* See https://www.iana.org/assignments/webauthn/webauthn.xhtml#webauthn-attestation-statement-format-ids
|
|
203
|
+
*/
|
|
204
|
+
export type AttestationFormat = 'fido-u2f' | 'packed' | 'android-safetynet' | 'android-key' | 'tpm' | 'apple' | 'none';
|
|
205
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,E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,OAAO,EAAE,qCAAqC,GAC7C,iCAAiC,CAAC;IAErC,MAAM,CAAC,IAAI,uBAAuB,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,aAAa,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,CAAC;AAElF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,aAAa,GACb,KAAK,GACL,OAAO,GACP,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
"module": "./esm/index.js",
|
|
3
|
-
"main": "./script/index.js",
|
|
4
2
|
"name": "@simplewebauthn/server",
|
|
5
|
-
"version": "
|
|
3
|
+
"version": "13.0.0-alpha1",
|
|
6
4
|
"description": "SimpleWebAuthn for Servers",
|
|
7
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typescript",
|
|
7
|
+
"webauthn",
|
|
8
|
+
"passkeys",
|
|
9
|
+
"fido",
|
|
10
|
+
"node"
|
|
11
|
+
],
|
|
8
12
|
"author": "Matthew Miller <matthew@millerti.me>",
|
|
13
|
+
"homepage": "https://github.com/MasterKale/SimpleWebAuthn/tree/master/packages/server#readme",
|
|
9
14
|
"repository": {
|
|
10
15
|
"type": "git",
|
|
11
16
|
"url": "git+https://github.com/MasterKale/SimpleWebAuthn.git",
|
|
12
17
|
"directory": "packages/server"
|
|
13
18
|
},
|
|
14
|
-
"
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/MasterKale/SimpleWebAuthn/issues"
|
|
22
|
+
},
|
|
23
|
+
"main": "./script/index.js",
|
|
24
|
+
"module": "./esm/index.js",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": "./esm/index.js",
|
|
28
|
+
"require": "./script/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./helpers": {
|
|
31
|
+
"import": "./esm/helpers/index.js",
|
|
32
|
+
"require": "./script/helpers/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
15
35
|
"publishConfig": {
|
|
16
36
|
"access": "public"
|
|
17
37
|
},
|
|
18
38
|
"engines": {
|
|
19
39
|
"node": ">=20.0.0"
|
|
20
40
|
},
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/MasterKale/SimpleWebAuthn/issues"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"typescript",
|
|
26
|
-
"webauthn",
|
|
27
|
-
"passkeys",
|
|
28
|
-
"fido",
|
|
29
|
-
"node"
|
|
30
|
-
],
|
|
31
41
|
"typesVersions": {
|
|
32
42
|
"*": {
|
|
33
43
|
".": [
|
|
@@ -38,16 +48,6 @@
|
|
|
38
48
|
]
|
|
39
49
|
}
|
|
40
50
|
},
|
|
41
|
-
"exports": {
|
|
42
|
-
".": {
|
|
43
|
-
"import": "./esm/index.js",
|
|
44
|
-
"require": "./script/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./helpers": {
|
|
47
|
-
"import": "./esm/helpers/index.js",
|
|
48
|
-
"require": "./script/helpers/index.js"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@hexagon/base64": "^1.1.27",
|
|
53
53
|
"@levischuck/tiny-cbor": "^0.2.2",
|
|
@@ -56,15 +56,10 @@
|
|
|
56
56
|
"@peculiar/asn1-rsa": "^2.3.8",
|
|
57
57
|
"@peculiar/asn1-schema": "^2.3.8",
|
|
58
58
|
"@peculiar/asn1-x509": "^2.3.8",
|
|
59
|
-
"@simplewebauthn/types": "^11.0.0",
|
|
60
59
|
"cross-fetch": "^4.0.0"
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
63
|
-
"@types/node": "^
|
|
64
|
-
"picocolors": "^1.0.0",
|
|
65
|
-
"@deno/shim-deno-test": "~0.4.0"
|
|
62
|
+
"@types/node": "^20.9.0"
|
|
66
63
|
},
|
|
67
|
-
"
|
|
68
|
-
"test": "node test_runner.js"
|
|
69
|
-
}
|
|
64
|
+
"_generatedBy": "dnt@dev"
|
|
70
65
|
}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import type { AuthenticationExtensionsClientInputs, AuthenticatorTransportFuture, Base64URLString, PublicKeyCredentialRequestOptionsJSON
|
|
2
|
-
export type GenerateAuthenticationOptionsOpts =
|
|
3
|
-
rpID: string;
|
|
4
|
-
allowCredentials?: {
|
|
5
|
-
id: Base64URLString;
|
|
6
|
-
transports?: AuthenticatorTransportFuture[];
|
|
7
|
-
}[];
|
|
8
|
-
challenge?: string | Uint8Array;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
userVerification?: UserVerificationRequirement;
|
|
11
|
-
extensions?: AuthenticationExtensionsClientInputs;
|
|
12
|
-
};
|
|
1
|
+
import type { AuthenticationExtensionsClientInputs, AuthenticatorTransportFuture, Base64URLString, PublicKeyCredentialRequestOptionsJSON } from '../types/index.js';
|
|
2
|
+
export type GenerateAuthenticationOptionsOpts = Parameters<typeof generateAuthenticationOptions>[0];
|
|
13
3
|
/**
|
|
14
4
|
* Prepare a value to pass into navigator.credentials.get(...) for authenticator authentication
|
|
15
5
|
*
|
|
@@ -22,4 +12,15 @@ export type GenerateAuthenticationOptionsOpts = {
|
|
|
22
12
|
* @param userVerification **(Optional)** - Set to `'discouraged'` when asserting as part of a 2FA flow, otherwise set to `'preferred'` or `'required'` as desired. Defaults to `"preferred"`
|
|
23
13
|
* @param extensions **(Optional)** - Additional plugins the authenticator or browser should use during authentication
|
|
24
14
|
*/
|
|
25
|
-
export declare function generateAuthenticationOptions(options:
|
|
15
|
+
export declare function generateAuthenticationOptions(options: {
|
|
16
|
+
rpID: string;
|
|
17
|
+
allowCredentials?: {
|
|
18
|
+
id: Base64URLString;
|
|
19
|
+
transports?: AuthenticatorTransportFuture[];
|
|
20
|
+
}[];
|
|
21
|
+
challenge?: string | Uint8Array;
|
|
22
|
+
timeout?: number;
|
|
23
|
+
userVerification?: 'required' | 'preferred' | 'discouraged';
|
|
24
|
+
extensions?: AuthenticationExtensionsClientInputs;
|
|
25
|
+
}): 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,EACtC,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,iCAAiC,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpG;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE;IACP,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,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;IAC5D,UAAU,CAAC,EAAE,oCAAoC,CAAC;CACnD,GACA,OAAO,CAAC,qCAAqC,CAAC,CAoChD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateAuthenticationOptions =
|
|
3
|
+
exports.generateAuthenticationOptions = generateAuthenticationOptions;
|
|
4
4
|
const index_js_1 = require("../helpers/iso/index.js");
|
|
5
5
|
const generateChallenge_js_1 = require("../helpers/generateChallenge.js");
|
|
6
6
|
/**
|
|
@@ -42,4 +42,3 @@ async function generateAuthenticationOptions(options) {
|
|
|
42
42
|
extensions,
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
exports.generateAuthenticationOptions = generateAuthenticationOptions;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type { AuthenticationResponseJSON, Base64URLString, CredentialDeviceType, UserVerificationRequirement, WebAuthnCredential } from '../
|
|
2
|
-
import { AuthenticationExtensionsAuthenticatorOutputs } from '../helpers/decodeAuthenticatorExtensions.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
expectedRPID: string | string[];
|
|
8
|
-
credential: WebAuthnCredential;
|
|
9
|
-
expectedType?: string | string[];
|
|
10
|
-
requireUserVerification?: boolean;
|
|
11
|
-
advancedFIDOConfig?: {
|
|
12
|
-
userVerification?: UserVerificationRequirement;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
1
|
+
import type { AuthenticationResponseJSON, Base64URLString, CredentialDeviceType, UserVerificationRequirement, WebAuthnCredential } from '../types/index.js';
|
|
2
|
+
import type { AuthenticationExtensionsAuthenticatorOutputs } from '../helpers/decodeAuthenticatorExtensions.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configurable options when calling `verifyAuthenticationResponse()`
|
|
5
|
+
*/
|
|
6
|
+
export type VerifyAuthenticationResponseOpts = Parameters<typeof verifyAuthenticationResponse>[0];
|
|
15
7
|
/**
|
|
16
8
|
* Verify that the user has legitimately completed the authentication process
|
|
17
9
|
*
|
|
@@ -27,7 +19,18 @@ export type VerifyAuthenticationResponseOpts = {
|
|
|
27
19
|
* @param advancedFIDOConfig **(Optional)** - Options for satisfying more stringent FIDO RP feature requirements
|
|
28
20
|
* @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"`
|
|
29
21
|
*/
|
|
30
|
-
export declare function verifyAuthenticationResponse(options:
|
|
22
|
+
export declare function verifyAuthenticationResponse(options: {
|
|
23
|
+
response: AuthenticationResponseJSON;
|
|
24
|
+
expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>);
|
|
25
|
+
expectedOrigin: string | string[];
|
|
26
|
+
expectedRPID: string | string[];
|
|
27
|
+
credential: WebAuthnCredential;
|
|
28
|
+
expectedType?: string | string[];
|
|
29
|
+
requireUserVerification?: boolean;
|
|
30
|
+
advancedFIDOConfig?: {
|
|
31
|
+
userVerification?: UserVerificationRequirement;
|
|
32
|
+
};
|
|
33
|
+
}): Promise<VerifiedAuthenticationResponse>;
|
|
31
34
|
/**
|
|
32
35
|
* Result of authentication verification
|
|
33
36
|
*
|
|
@@ -61,3 +64,4 @@ export type VerifiedAuthenticationResponse = {
|
|
|
61
64
|
authenticatorExtensionResults?: AuthenticationExtensionsAuthenticatorOutputs;
|
|
62
65
|
};
|
|
63
66
|
};
|
|
67
|
+
//# 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,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,6CAA6C,CAAC;AAIhH;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;AAElG;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE;IACP,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,GACA,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.verifyAuthenticationResponse =
|
|
3
|
+
exports.verifyAuthenticationResponse = verifyAuthenticationResponse;
|
|
4
4
|
const decodeClientDataJSON_js_1 = require("../helpers/decodeClientDataJSON.js");
|
|
5
5
|
const toHash_js_1 = require("../helpers/toHash.js");
|
|
6
6
|
const verifySignature_js_1 = require("../helpers/verifySignature.js");
|
|
@@ -172,4 +172,3 @@ async function verifyAuthenticationResponse(options) {
|
|
|
172
172
|
};
|
|
173
173
|
return toReturn;
|
|
174
174
|
}
|
|
175
|
-
exports.verifyAuthenticationResponse = verifyAuthenticationResponse;
|
|
@@ -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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertAAGUIDToString =
|
|
3
|
+
exports.convertAAGUIDToString = convertAAGUIDToString;
|
|
4
4
|
const index_js_1 = require("./iso/index.js");
|
|
5
5
|
/**
|
|
6
6
|
* Convert the aaguid buffer in authData into a UUID string
|
|
@@ -9,13 +9,12 @@ function convertAAGUIDToString(aaguid) {
|
|
|
9
9
|
// Raw Hex: adce000235bcc60a648b0b25f1f05503
|
|
10
10
|
const hex = index_js_1.isoUint8Array.toHex(aaguid);
|
|
11
11
|
const segments = [
|
|
12
|
-
hex.slice(0, 8),
|
|
13
|
-
hex.slice(8, 12),
|
|
14
|
-
hex.slice(12, 16),
|
|
15
|
-
hex.slice(16, 20),
|
|
12
|
+
hex.slice(0, 8), // 8
|
|
13
|
+
hex.slice(8, 12), // 4
|
|
14
|
+
hex.slice(12, 16), // 4
|
|
15
|
+
hex.slice(16, 20), // 4
|
|
16
16
|
hex.slice(20, 32), // 8
|
|
17
17
|
];
|
|
18
18
|
// Formatted: adce0002-35bc-c60a-648b-0b25f1f05503
|
|
19
19
|
return segments.join('-');
|
|
20
20
|
}
|
|
21
|
-
exports.convertAAGUIDToString = convertAAGUIDToString;
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertCOSEtoPKCS =
|
|
3
|
+
exports.convertCOSEtoPKCS = convertCOSEtoPKCS;
|
|
4
4
|
const index_js_1 = require("./iso/index.js");
|
|
5
5
|
const cose_js_1 = require("./cose.js");
|
|
6
6
|
/**
|
|
@@ -22,4 +22,3 @@ function convertCOSEtoPKCS(cosePublicKey) {
|
|
|
22
22
|
}
|
|
23
23
|
return index_js_1.isoUint8Array.concat([tag, x]);
|
|
24
24
|
}
|
|
25
|
-
exports.convertCOSEtoPKCS = convertCOSEtoPKCS;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Base64URLString } from '../
|
|
1
|
+
import type { Base64URLString } from '../types/index.js';
|
|
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,mBAAmB,CAAC;AAGzD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,GAAG,eAAe,GACvC,MAAM,CA4BR"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertCertBufferToPEM =
|
|
3
|
+
exports.convertCertBufferToPEM = convertCertBufferToPEM;
|
|
4
4
|
const index_js_1 = require("./iso/index.js");
|
|
5
5
|
/**
|
|
6
6
|
* Convert buffer to an OpenSSL-compatible PEM text format.
|
|
@@ -32,4 +32,3 @@ function convertCertBufferToPEM(certBuffer) {
|
|
|
32
32
|
PEMKey = `-----BEGIN CERTIFICATE-----\n${PEMKey}-----END CERTIFICATE-----\n`;
|
|
33
33
|
return PEMKey;
|
|
34
34
|
}
|
|
35
|
-
exports.convertCertBufferToPEM = convertCertBufferToPEM;
|
|
@@ -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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertPEMToBytes =
|
|
3
|
+
exports.convertPEMToBytes = convertPEMToBytes;
|
|
4
4
|
const index_js_1 = require("./iso/index.js");
|
|
5
5
|
/**
|
|
6
6
|
* Take a certificate in PEM format and convert it to bytes
|
|
@@ -12,4 +12,3 @@ function convertPEMToBytes(pem) {
|
|
|
12
12
|
.replace(/[\n ]/g, '');
|
|
13
13
|
return index_js_1.isoBase64URL.toBuffer(certBase64, 'base64');
|
|
14
14
|
}
|
|
15
|
-
exports.convertPEMToBytes = convertPEMToBytes;
|
|
@@ -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,33 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertX509PublicKeyToCOSE =
|
|
4
|
-
const
|
|
3
|
+
exports.convertX509PublicKeyToCOSE = convertX509PublicKeyToCOSE;
|
|
4
|
+
const asn1_schema_1 = require("@peculiar/asn1-schema");
|
|
5
|
+
const asn1_x509_1 = require("@peculiar/asn1-x509");
|
|
6
|
+
const asn1_ecc_1 = require("@peculiar/asn1-ecc");
|
|
5
7
|
const cose_js_1 = require("./cose.js");
|
|
8
|
+
const asn1_rsa_1 = require("@peculiar/asn1-rsa");
|
|
6
9
|
const mapX509SignatureAlgToCOSEAlg_js_1 = require("./mapX509SignatureAlgToCOSEAlg.js");
|
|
7
10
|
function convertX509PublicKeyToCOSE(x509Certificate) {
|
|
8
11
|
let cosePublicKey = new Map();
|
|
9
12
|
/**
|
|
10
13
|
* Time to extract the public key from an X.509 certificate
|
|
11
14
|
*/
|
|
12
|
-
const x509 =
|
|
15
|
+
const x509 = asn1_schema_1.AsnParser.parse(x509Certificate, asn1_x509_1.Certificate);
|
|
13
16
|
const { tbsCertificate } = x509;
|
|
14
17
|
const { subjectPublicKeyInfo, signature: _tbsSignature } = tbsCertificate;
|
|
15
18
|
const signatureAlgorithm = _tbsSignature.algorithm;
|
|
16
19
|
const publicKeyAlgorithmID = subjectPublicKeyInfo.algorithm.algorithm;
|
|
17
|
-
if (publicKeyAlgorithmID ===
|
|
20
|
+
if (publicKeyAlgorithmID === asn1_ecc_1.id_ecPublicKey) {
|
|
18
21
|
/**
|
|
19
22
|
* EC2 Public Key
|
|
20
23
|
*/
|
|
21
24
|
if (!subjectPublicKeyInfo.algorithm.parameters) {
|
|
22
25
|
throw new Error('Certificate public key was missing parameters (EC2)');
|
|
23
26
|
}
|
|
24
|
-
const ecParameters =
|
|
27
|
+
const ecParameters = asn1_schema_1.AsnParser.parse(new Uint8Array(subjectPublicKeyInfo.algorithm.parameters), asn1_ecc_1.ECParameters);
|
|
25
28
|
let crv = -999;
|
|
26
29
|
const { namedCurve } = ecParameters;
|
|
27
|
-
if (namedCurve ===
|
|
30
|
+
if (namedCurve === asn1_ecc_1.id_secp256r1) {
|
|
28
31
|
crv = cose_js_1.COSECRV.P256;
|
|
29
32
|
}
|
|
30
|
-
else if (namedCurve ===
|
|
33
|
+
else if (namedCurve === asn1_ecc_1.id_secp384r1) {
|
|
31
34
|
crv = cose_js_1.COSECRV.P384;
|
|
32
35
|
}
|
|
33
36
|
else {
|
|
@@ -58,7 +61,7 @@ function convertX509PublicKeyToCOSE(x509Certificate) {
|
|
|
58
61
|
/**
|
|
59
62
|
* RSA public key
|
|
60
63
|
*/
|
|
61
|
-
const rsaPublicKey =
|
|
64
|
+
const rsaPublicKey = asn1_schema_1.AsnParser.parse(subjectPublicKeyInfo.subjectPublicKey, asn1_rsa_1.RSAPublicKey);
|
|
62
65
|
const coseRSAPubKey = new Map();
|
|
63
66
|
coseRSAPubKey.set(cose_js_1.COSEKEYS.kty, cose_js_1.COSEKTY.RSA);
|
|
64
67
|
coseRSAPubKey.set(cose_js_1.COSEKEYS.alg, (0, mapX509SignatureAlgToCOSEAlg_js_1.mapX509SignatureAlgToCOSEAlg)(signatureAlgorithm));
|
|
@@ -71,4 +74,3 @@ function convertX509PublicKeyToCOSE(x509Certificate) {
|
|
|
71
74
|
}
|
|
72
75
|
return cosePublicKey;
|
|
73
76
|
}
|
|
74
|
-
exports.convertX509PublicKeyToCOSE = convertX509PublicKeyToCOSE;
|