From e16248b90732c897ca72d940b25b7b8217f5841b Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Tue, 17 Aug 2021 22:28:12 -0700 Subject: Add type for opts blob for verifiers --- .../src/attestation/verifyAttestationResponse.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'packages/server/src') diff --git a/packages/server/src/attestation/verifyAttestationResponse.ts b/packages/server/src/attestation/verifyAttestationResponse.ts index c447379..d24b0f4 100644 --- a/packages/server/src/attestation/verifyAttestationResponse.ts +++ b/packages/server/src/attestation/verifyAttestationResponse.ts @@ -4,7 +4,10 @@ import { COSEAlgorithmIdentifier, } from '@simplewebauthn/typescript-types'; -import decodeAttestationObject, { AttestationFormat } from '../helpers/decodeAttestationObject'; +import decodeAttestationObject, { + AttestationFormat, + AttestationStatement, +} from '../helpers/decodeAttestationObject'; import decodeClientDataJSON from '../helpers/decodeClientDataJSON'; import parseAuthenticatorData from '../helpers/parseAuthenticatorData'; import toHash from '../helpers/toHash'; @@ -289,3 +292,18 @@ export type VerifiedAttestation = { attestationObject: Buffer; }; }; + +/** + * Values passed to all attestation format verifiers, from which they are free to use as they please + */ +export type AttestationFormatVerifierOpts = { + aaguid: Buffer; + attStmt: AttestationStatement; + authData: Buffer; + clientDataHash: Buffer; + credentialID: Buffer; + credentialPublicKey: Buffer; + rootCertificates: string[]; + rpIdHash: Buffer; + verifyTimestampMS?: boolean; +}; -- cgit v1.2.3