Skip to main content
Module

x/fido2/lib/main.js

A node.js library for performing FIDO 2.0 / WebAuthn server functionality
Go to Latest
import * as fido2 from "https://deno.land/x/fido2@3.2.5/lib/main.js";

Classes

A validated assertion result

A validated attesetation result

A class for managing, validating, and finding metadata that describes authenticators

Holds a single MDS entry that provides the metadata for an authenticator. Contains both the TOC data (such as statusReports and url) as well as all the metadata statment data. All the metadata has been converted from the integers found in the FIDORegistry and FIDO UAF Registry have been converted to more friendly values. The following values are converted:

  • attachmentHint - converted to Array of Strings
  • attestationTypes - converted to Array of Strings
  • authenticationAlgorithm - converted to String
  • keyProtection - converted to Array of Strings
  • matcherProtection - converted to Array of Strings
  • publicKeyAlgAndEncoding - converted to String
  • tcDisplay - converted to Array of Strings
  • userVerificationDetails - converted to Array of Array of UserVerificationDesc

Class representing a generic public key, with utility functions to convert between different formats using Webcrypto

Functions

Utility function to convert a cose hashing algorithm to string

Utility function to convert a cose algorithm to string

Parses the clientData JSON byte stream into an Object

Given an Iterable/Iterator input which yields buffers, returns an IterableIterator which yields sync decoded objects Or, given an Async Iterable/Iterator which yields promises resolving in buffers, returns an AsyncIterableIterator.

Given an Iterable first argument, returns an Iterable where each value is encoded as a Buffer If the argument is only Async Iterable, the return value will be an Async Iterable.

Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.

Imports a JWK to a runtime-specific key representation (KeyLike). Either JWK "alg" (Algorithm) Parameter must be present or the optional "alg" argument. When running on a runtime using Web Cryptography API the jwk parameters "use", "key_ops", and "ext" are also used in the resulting CryptoKey. See Algorithm Key Requirements to learn about key to algorithm requirements and mapping.