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

Properties

_principal: undefined | Principal
_publicKey: CosePublicKey
rawId: ArrayBuffer

Methods

  • 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(): JsonnableWebAuthnIdentitiy
  • 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