Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebAuthnIdentity

A SignIdentity that uses navigator.credentials. See https://webauthn.guide/ for more information about WebAuthentication.

Hierarchy

  • SignIdentity
    • WebAuthnIdentity

Index

Constructors

  • new WebAuthnIdentity(rawId: ArrayBuffer, cose: ArrayBuffer, authenticatorAttachment: undefined | AuthenticatorAttachment): WebAuthnIdentity

Properties

_principal: undefined | Principal
_publicKey: CosePublicKey
authenticatorAttachment: undefined | AuthenticatorAttachment
rawId: ArrayBuffer

Methods

  • getAuthenticatorAttachment(): undefined | AuthenticatorAttachment
  • getPrincipal(): Principal
  • Get the principal represented by this identity. Normally should be a Principal.selfAuthenticating().

    Returns Principal

  • getPublicKey(): PublicKey
  • sign(blob: ArrayBuffer): Promise<Signature>
  • toJSON(): JsonnableWebAuthnIdentity
  • transformRequest(request: HttpAgentRequest): Promise<unknown>
  • Transform a request into a signed version of the request. This is done last after the transforms on the body of a request. The returned object can be anything, but must be serializable to CBOR.

    Parameters

    • request: HttpAgentRequest

      internet computer request to transform

    Returns Promise<unknown>

  • create(credentialCreationOptions?: CredentialCreationOptions): Promise<WebAuthnIdentity>

Generated using TypeDoc