Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fido2/lib/main.js>MdsCollection#addToc

A node.js library for performing FIDO 2.0 / WebAuthn server functionality
Go to Latest
method MdsCollection.prototype.addToc
Re-export
import { MdsCollection } from "https://deno.land/x/fido2@3.3.5/lib/main.js";

Validates and stores the Table of Contents (TOC) for future reference. This method validates the TOC JSON Web Token (JWT) signature, as well as the certificate chain. The certiciate chain is validated using the rootCert and crls that are provided.

Parameters

tocStr

The base64url encoded Table of Contents, as described in the [FIDO Metadata Service specification]https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-metadata-service-v2.0-id-20180227.html

rootCert

One or more root certificates that serve as a trust anchor for the Metadata Service. Certificate format is flexible, and can be a PEM string, a base64 encoded string, or an ArrayBuffer, provieded that each of those formats can be decoded to valid ASN.1 If the rootCert is undefined, then the default FIDO MDS root certificate will be used.

crls

An array of Certificate Revocation Lists (CRLs) that should be used when validating the certificate chain. Like rootCert the format of the CRLs is flexible and can be PEM encoded, base64 encoded, or an ArrayBuffer provied that the CRL contains valid ASN.1 encoding.