diff options
author | Matthew Miller <matthew@millerti.me> | 2021-08-17 22:28:12 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2021-08-17 22:28:29 -0700 |
commit | e16248b90732c897ca72d940b25b7b8217f5841b (patch) | |
tree | 284cd9150fc5bb2c25ef88a6a75fc9f0851c51e3 | |
parent | e7634884eb128f1a3c42880aae5f66aad8a2a678 (diff) |
Add type for opts blob for verifiers
-rw-r--r-- | packages/server/src/attestation/verifyAttestationResponse.ts | 20 |
1 files changed, 19 insertions, 1 deletions
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; +}; |