summaryrefslogtreecommitdiffhomepage
path: root/packages/typescript-types/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-05-22 15:24:42 -0700
committerMatthew Miller <matthew@millerti.me>2020-05-22 15:24:42 -0700
commit61edee2f24aad68cdab53eb53e03c4ad3057c585 (patch)
treee5ec3acca5b776e9222e2ffe6aba06243690eed1 /packages/typescript-types/src
parent8ce45f0e494e5f9c48420c371a07ece94b4a68be (diff)
Add some notes on output from verification methods
Diffstat (limited to 'packages/typescript-types/src')
-rw-r--r--packages/typescript-types/src/index.ts15
1 files changed, 15 insertions, 0 deletions
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;