From 61edee2f24aad68cdab53eb53e03c4ad3057c585 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 22 May 2020 15:24:42 -0700 Subject: Add some notes on output from verification methods --- packages/typescript-types/src/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'packages/typescript-types/src') diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts index 6a2a4e8..e828d7e 100644 --- a/packages/typescript-types/src/index.ts +++ b/packages/typescript-types/src/index.ts @@ -136,6 +136,17 @@ export type ClientDataJSON = { /** * Result of attestation verification + * + * @param verified If the assertion response could be verified + * @param userVerified Whether the user was uniquely identified during attestation + * @param authenticatorInfo.fmt Type of attestation + * @param authenticatorInfo.counter The number of times the authenticator reported it has been used. + * Should be kept in a DB for later reference to help prevent replay attacks + * @param authenticatorInfo.base64PublicKey Base64-encoded ArrayBuffer containing the + * authenticator's public key. **Should be kept in a DB for later reference!** + * @param authenticatorInfo.base64CredentialID Base64-encoded ArrayBuffer containing the + * authenticator's credential ID for the public key above. **Should be kept in a DB for later + * reference!** */ export type VerifiedAttestation = { verified: boolean, @@ -150,6 +161,10 @@ export type VerifiedAttestation = { /** * Result of assertion verification + * + * @param verified If the assertion response could be verified + * @param counter The number of times the authenticator reported it has been used. **Should be + * kept in a DB for later reference to help prevent replay attacks!** */ export type VerifiedAssertion = { verified: boolean; -- cgit v1.2.3