toip.tools

function · Browser and Node

webAuthnSigner

A passkey as a signer (alg -65600). Each signature is a WebAuthn assertion whose challenge is SHA-256 of the Sig_structure, with user verification required, so each one asks for the biometric or PIN.

@toip-tools/coseView source
TypeScriptImport
import { webAuthnSigner } from "@toip-tools/cose";

Declaration

TypeScriptSignature
webAuthnSigner(opts: {
    credentialId: Uint8Array;
    rpId: string;
    publicKey: Uint8Array;
    kid: Uint8Array;
    get?: WebAuthnGet;
    timeout?: number;
}): AsyncSigner;

Parameters

optsrequired
{ credentialId: Uint8Array; rpId: string; publicKey: Uint8Array; kid: Uint8Array; get?: WebAuthnGet; timeout?: number; }
Fields of opts
credentialIdrequired
Uint8Array<ArrayBufferLike>
rpIdrequired
string
publicKeyrequired
Uint8Array<ArrayBufferLike>
kidrequired
Uint8Array<ArrayBufferLike>
getoptional
WebAuthnGet | undefined
timeoutoptional
number | undefined

Returns