webauthn

package
v0.0.0-...-c16d098 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 7 Imported by: 3

Documentation

Overview

Package webauthn provides the Chrome DevTools Protocol commands, types, and events for the WebAuthn domain.

This domain allows configuring virtual authenticators to test the WebAuthn API.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandEnable                         = "WebAuthn.enable"
	CommandDisable                        = "WebAuthn.disable"
	CommandAddVirtualAuthenticator        = "WebAuthn.addVirtualAuthenticator"
	CommandSetResponseOverrideBits        = "WebAuthn.setResponseOverrideBits"
	CommandRemoveVirtualAuthenticator     = "WebAuthn.removeVirtualAuthenticator"
	CommandAddCredential                  = "WebAuthn.addCredential"
	CommandGetCredential                  = "WebAuthn.getCredential"
	CommandGetCredentials                 = "WebAuthn.getCredentials"
	CommandRemoveCredential               = "WebAuthn.removeCredential"
	CommandClearCredentials               = "WebAuthn.clearCredentials"
	CommandSetUserVerified                = "WebAuthn.setUserVerified"
	CommandSetAutomaticPresenceSimulation = "WebAuthn.setAutomaticPresenceSimulation"
	CommandSetCredentialProperties        = "WebAuthn.setCredentialProperties"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCredentialParams

type AddCredentialParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	Credential      *Credential     `json:"credential"`
}

AddCredentialParams adds the credential to the specified authenticator.

func AddCredential

func AddCredential(authenticatorID AuthenticatorID, credential *Credential) *AddCredentialParams

AddCredential adds the credential to the specified authenticator.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-addCredential

parameters:

authenticatorID
credential

func (*AddCredentialParams) Do

func (p *AddCredentialParams) Do(ctx context.Context) (err error)

Do executes WebAuthn.addCredential against the provided context.

func (AddCredentialParams) MarshalEasyJSON

func (v AddCredentialParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AddCredentialParams) MarshalJSON

func (v AddCredentialParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AddCredentialParams) UnmarshalEasyJSON

func (v *AddCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AddCredentialParams) UnmarshalJSON

func (v *AddCredentialParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AddVirtualAuthenticatorParams

type AddVirtualAuthenticatorParams struct {
	Options *VirtualAuthenticatorOptions `json:"options"`
}

AddVirtualAuthenticatorParams creates and adds a virtual authenticator.

func AddVirtualAuthenticator

func AddVirtualAuthenticator(options *VirtualAuthenticatorOptions) *AddVirtualAuthenticatorParams

AddVirtualAuthenticator creates and adds a virtual authenticator.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-addVirtualAuthenticator

parameters:

options

func (*AddVirtualAuthenticatorParams) Do

func (p *AddVirtualAuthenticatorParams) Do(ctx context.Context) (authenticatorID AuthenticatorID, err error)

Do executes WebAuthn.addVirtualAuthenticator against the provided context.

returns:

authenticatorID

func (AddVirtualAuthenticatorParams) MarshalEasyJSON

func (v AddVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AddVirtualAuthenticatorParams) MarshalJSON

func (v AddVirtualAuthenticatorParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AddVirtualAuthenticatorParams) UnmarshalEasyJSON

func (v *AddVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AddVirtualAuthenticatorParams) UnmarshalJSON

func (v *AddVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AddVirtualAuthenticatorReturns

type AddVirtualAuthenticatorReturns struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId,omitempty"`
}

AddVirtualAuthenticatorReturns return values.

func (AddVirtualAuthenticatorReturns) MarshalEasyJSON

func (v AddVirtualAuthenticatorReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AddVirtualAuthenticatorReturns) MarshalJSON

func (v AddVirtualAuthenticatorReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AddVirtualAuthenticatorReturns) UnmarshalEasyJSON

func (v *AddVirtualAuthenticatorReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AddVirtualAuthenticatorReturns) UnmarshalJSON

func (v *AddVirtualAuthenticatorReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AuthenticatorID

type AuthenticatorID string

AuthenticatorID [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorId

func (AuthenticatorID) String

func (t AuthenticatorID) String() string

String returns the AuthenticatorID as string value.

type AuthenticatorProtocol

type AuthenticatorProtocol string

AuthenticatorProtocol [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorProtocol

const (
	AuthenticatorProtocolU2f   AuthenticatorProtocol = "u2f"
	AuthenticatorProtocolCtap2 AuthenticatorProtocol = "ctap2"
)

AuthenticatorProtocol values.

func (AuthenticatorProtocol) MarshalEasyJSON

func (t AuthenticatorProtocol) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (AuthenticatorProtocol) MarshalJSON

func (t AuthenticatorProtocol) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (AuthenticatorProtocol) String

func (t AuthenticatorProtocol) String() string

String returns the AuthenticatorProtocol as string value.

func (*AuthenticatorProtocol) UnmarshalEasyJSON

func (t *AuthenticatorProtocol) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*AuthenticatorProtocol) UnmarshalJSON

func (t *AuthenticatorProtocol) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type AuthenticatorTransport

type AuthenticatorTransport string

AuthenticatorTransport [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorTransport

const (
	AuthenticatorTransportUsb      AuthenticatorTransport = "usb"
	AuthenticatorTransportNfc      AuthenticatorTransport = "nfc"
	AuthenticatorTransportBle      AuthenticatorTransport = "ble"
	AuthenticatorTransportCable    AuthenticatorTransport = "cable"
	AuthenticatorTransportInternal AuthenticatorTransport = "internal"
)

AuthenticatorTransport values.

func (AuthenticatorTransport) MarshalEasyJSON

func (t AuthenticatorTransport) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (AuthenticatorTransport) MarshalJSON

func (t AuthenticatorTransport) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (AuthenticatorTransport) String

func (t AuthenticatorTransport) String() string

String returns the AuthenticatorTransport as string value.

func (*AuthenticatorTransport) UnmarshalEasyJSON

func (t *AuthenticatorTransport) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*AuthenticatorTransport) UnmarshalJSON

func (t *AuthenticatorTransport) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type ClearCredentialsParams

type ClearCredentialsParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
}

ClearCredentialsParams clears all the credentials from the specified device.

func ClearCredentials

func ClearCredentials(authenticatorID AuthenticatorID) *ClearCredentialsParams

ClearCredentials clears all the credentials from the specified device.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-clearCredentials

parameters:

authenticatorID

func (*ClearCredentialsParams) Do

func (p *ClearCredentialsParams) Do(ctx context.Context) (err error)

Do executes WebAuthn.clearCredentials against the provided context.

func (ClearCredentialsParams) MarshalEasyJSON

func (v ClearCredentialsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ClearCredentialsParams) MarshalJSON

func (v ClearCredentialsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ClearCredentialsParams) UnmarshalEasyJSON

func (v *ClearCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ClearCredentialsParams) UnmarshalJSON

func (v *ClearCredentialsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Credential

type Credential struct {
	CredentialID         string `json:"credentialId"`
	IsResidentCredential bool   `json:"isResidentCredential"`
	RpID                 string `json:"rpId,omitempty"`              // Relying Party ID the credential is scoped to. Must be set when adding a credential.
	PrivateKey           string `json:"privateKey"`                  // The ECDSA P-256 private key in PKCS#8 format.
	UserHandle           string `json:"userHandle,omitempty"`        // An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.
	SignCount            int64  `json:"signCount"`                   // Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter
	LargeBlob            string `json:"largeBlob,omitempty"`         // The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension
	BackupEligibility    bool   `json:"backupEligibility,omitempty"` // Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.
	BackupState          bool   `json:"backupState,omitempty"`       // Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.
	UserName             string `json:"userName,omitempty"`          // The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name
	UserDisplayName      string `json:"userDisplayName,omitempty"`   // The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname
}

Credential [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-Credential

func (Credential) MarshalEasyJSON

func (v Credential) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Credential) MarshalJSON

func (v Credential) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Credential) UnmarshalEasyJSON

func (v *Credential) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Credential) UnmarshalJSON

func (v *Credential) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Ctap2version

type Ctap2version string

Ctap2version [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-Ctap2Version

const (
	Ctap2versionCtap20 Ctap2version = "ctap2_0"
	Ctap2versionCtap21 Ctap2version = "ctap2_1"
)

Ctap2version values.

func (Ctap2version) MarshalEasyJSON

func (t Ctap2version) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (Ctap2version) MarshalJSON

func (t Ctap2version) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (Ctap2version) String

func (t Ctap2version) String() string

String returns the Ctap2version as string value.

func (*Ctap2version) UnmarshalEasyJSON

func (t *Ctap2version) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*Ctap2version) UnmarshalJSON

func (t *Ctap2version) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type DisableParams

type DisableParams struct{}

DisableParams disable the WebAuthn domain.

func Disable

func Disable() *DisableParams

Disable disable the WebAuthn domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-disable

func (*DisableParams) Do

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes WebAuthn.disable against the provided context.

func (DisableParams) MarshalEasyJSON

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct {
	EnableUI bool `json:"enableUI,omitempty"` // Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.
}

EnableParams enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.

func Enable

func Enable() *EnableParams

Enable enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-enable

parameters:

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes WebAuthn.enable against the provided context.

func (EnableParams) MarshalEasyJSON

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (EnableParams) WithEnableUI

func (p EnableParams) WithEnableUI(enableUI bool) *EnableParams

WithEnableUI whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.

type EventCredentialAdded

type EventCredentialAdded struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	Credential      *Credential     `json:"credential"`
}

EventCredentialAdded triggered when a credential is added to an authenticator.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#event-credentialAdded

func (EventCredentialAdded) MarshalEasyJSON

func (v EventCredentialAdded) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventCredentialAdded) MarshalJSON

func (v EventCredentialAdded) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventCredentialAdded) UnmarshalEasyJSON

func (v *EventCredentialAdded) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventCredentialAdded) UnmarshalJSON

func (v *EventCredentialAdded) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventCredentialAsserted

type EventCredentialAsserted struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	Credential      *Credential     `json:"credential"`
}

EventCredentialAsserted triggered when a credential is used in a webauthn assertion.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#event-credentialAsserted

func (EventCredentialAsserted) MarshalEasyJSON

func (v EventCredentialAsserted) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventCredentialAsserted) MarshalJSON

func (v EventCredentialAsserted) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventCredentialAsserted) UnmarshalEasyJSON

func (v *EventCredentialAsserted) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventCredentialAsserted) UnmarshalJSON

func (v *EventCredentialAsserted) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventCredentialDeleted

type EventCredentialDeleted struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	CredentialID    string          `json:"credentialId"`
}

EventCredentialDeleted triggered when a credential is deleted, e.g. through PublicKeyCredential.signalUnknownCredential().

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#event-credentialDeleted

func (EventCredentialDeleted) MarshalEasyJSON

func (v EventCredentialDeleted) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventCredentialDeleted) MarshalJSON

func (v EventCredentialDeleted) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventCredentialDeleted) UnmarshalEasyJSON

func (v *EventCredentialDeleted) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventCredentialDeleted) UnmarshalJSON

func (v *EventCredentialDeleted) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventCredentialUpdated

type EventCredentialUpdated struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	Credential      *Credential     `json:"credential"`
}

EventCredentialUpdated triggered when a credential is updated, e.g. through PublicKeyCredential.signalCurrentUserDetails().

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#event-credentialUpdated

func (EventCredentialUpdated) MarshalEasyJSON

func (v EventCredentialUpdated) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventCredentialUpdated) MarshalJSON

func (v EventCredentialUpdated) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventCredentialUpdated) UnmarshalEasyJSON

func (v *EventCredentialUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventCredentialUpdated) UnmarshalJSON

func (v *EventCredentialUpdated) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetCredentialParams

type GetCredentialParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	CredentialID    string          `json:"credentialId"`
}

GetCredentialParams returns a single credential stored in the given virtual authenticator that matches the credential ID.

func GetCredential

func GetCredential(authenticatorID AuthenticatorID, credentialID string) *GetCredentialParams

GetCredential returns a single credential stored in the given virtual authenticator that matches the credential ID.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-getCredential

parameters:

authenticatorID
credentialID

func (*GetCredentialParams) Do

func (p *GetCredentialParams) Do(ctx context.Context) (credential *Credential, err error)

Do executes WebAuthn.getCredential against the provided context.

returns:

credential

func (GetCredentialParams) MarshalEasyJSON

func (v GetCredentialParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetCredentialParams) MarshalJSON

func (v GetCredentialParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetCredentialParams) UnmarshalEasyJSON

func (v *GetCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetCredentialParams) UnmarshalJSON

func (v *GetCredentialParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetCredentialReturns

type GetCredentialReturns struct {
	Credential *Credential `json:"credential,omitempty"`
}

GetCredentialReturns return values.

func (GetCredentialReturns) MarshalEasyJSON

func (v GetCredentialReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetCredentialReturns) MarshalJSON

func (v GetCredentialReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetCredentialReturns) UnmarshalEasyJSON

func (v *GetCredentialReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetCredentialReturns) UnmarshalJSON

func (v *GetCredentialReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetCredentialsParams

type GetCredentialsParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
}

GetCredentialsParams returns all the credentials stored in the given virtual authenticator.

func GetCredentials

func GetCredentials(authenticatorID AuthenticatorID) *GetCredentialsParams

GetCredentials returns all the credentials stored in the given virtual authenticator.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-getCredentials

parameters:

authenticatorID

func (*GetCredentialsParams) Do

func (p *GetCredentialsParams) Do(ctx context.Context) (credentials []*Credential, err error)

Do executes WebAuthn.getCredentials against the provided context.

returns:

credentials

func (GetCredentialsParams) MarshalEasyJSON

func (v GetCredentialsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetCredentialsParams) MarshalJSON

func (v GetCredentialsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetCredentialsParams) UnmarshalEasyJSON

func (v *GetCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetCredentialsParams) UnmarshalJSON

func (v *GetCredentialsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetCredentialsReturns

type GetCredentialsReturns struct {
	Credentials []*Credential `json:"credentials,omitempty"`
}

GetCredentialsReturns return values.

func (GetCredentialsReturns) MarshalEasyJSON

func (v GetCredentialsReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetCredentialsReturns) MarshalJSON

func (v GetCredentialsReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetCredentialsReturns) UnmarshalEasyJSON

func (v *GetCredentialsReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetCredentialsReturns) UnmarshalJSON

func (v *GetCredentialsReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RemoveCredentialParams

type RemoveCredentialParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	CredentialID    string          `json:"credentialId"`
}

RemoveCredentialParams removes a credential from the authenticator.

func RemoveCredential

func RemoveCredential(authenticatorID AuthenticatorID, credentialID string) *RemoveCredentialParams

RemoveCredential removes a credential from the authenticator.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-removeCredential

parameters:

authenticatorID
credentialID

func (*RemoveCredentialParams) Do

func (p *RemoveCredentialParams) Do(ctx context.Context) (err error)

Do executes WebAuthn.removeCredential against the provided context.

func (RemoveCredentialParams) MarshalEasyJSON

func (v RemoveCredentialParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RemoveCredentialParams) MarshalJSON

func (v RemoveCredentialParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RemoveCredentialParams) UnmarshalEasyJSON

func (v *RemoveCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RemoveCredentialParams) UnmarshalJSON

func (v *RemoveCredentialParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RemoveVirtualAuthenticatorParams

type RemoveVirtualAuthenticatorParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
}

RemoveVirtualAuthenticatorParams removes the given authenticator.

func RemoveVirtualAuthenticator

func RemoveVirtualAuthenticator(authenticatorID AuthenticatorID) *RemoveVirtualAuthenticatorParams

RemoveVirtualAuthenticator removes the given authenticator.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-removeVirtualAuthenticator

parameters:

authenticatorID

func (*RemoveVirtualAuthenticatorParams) Do

Do executes WebAuthn.removeVirtualAuthenticator against the provided context.

func (RemoveVirtualAuthenticatorParams) MarshalEasyJSON

func (v RemoveVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RemoveVirtualAuthenticatorParams) MarshalJSON

func (v RemoveVirtualAuthenticatorParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RemoveVirtualAuthenticatorParams) UnmarshalEasyJSON

func (v *RemoveVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RemoveVirtualAuthenticatorParams) UnmarshalJSON

func (v *RemoveVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetAutomaticPresenceSimulationParams

type SetAutomaticPresenceSimulationParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	Enabled         bool            `json:"enabled"`
}

SetAutomaticPresenceSimulationParams sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.

func SetAutomaticPresenceSimulation

func SetAutomaticPresenceSimulation(authenticatorID AuthenticatorID, enabled bool) *SetAutomaticPresenceSimulationParams

SetAutomaticPresenceSimulation sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setAutomaticPresenceSimulation

parameters:

authenticatorID
enabled

func (*SetAutomaticPresenceSimulationParams) Do

Do executes WebAuthn.setAutomaticPresenceSimulation against the provided context.

func (SetAutomaticPresenceSimulationParams) MarshalEasyJSON

func (v SetAutomaticPresenceSimulationParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetAutomaticPresenceSimulationParams) MarshalJSON

func (v SetAutomaticPresenceSimulationParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetAutomaticPresenceSimulationParams) UnmarshalEasyJSON

func (v *SetAutomaticPresenceSimulationParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetAutomaticPresenceSimulationParams) UnmarshalJSON

func (v *SetAutomaticPresenceSimulationParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetCredentialPropertiesParams

type SetCredentialPropertiesParams struct {
	AuthenticatorID   AuthenticatorID `json:"authenticatorId"`
	CredentialID      string          `json:"credentialId"`
	BackupEligibility bool            `json:"backupEligibility,omitempty"`
	BackupState       bool            `json:"backupState,omitempty"`
}

SetCredentialPropertiesParams allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties.

func SetCredentialProperties

func SetCredentialProperties(authenticatorID AuthenticatorID, credentialID string) *SetCredentialPropertiesParams

SetCredentialProperties allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setCredentialProperties

parameters:

authenticatorID
credentialID

func (*SetCredentialPropertiesParams) Do

Do executes WebAuthn.setCredentialProperties against the provided context.

func (SetCredentialPropertiesParams) MarshalEasyJSON

func (v SetCredentialPropertiesParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetCredentialPropertiesParams) MarshalJSON

func (v SetCredentialPropertiesParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetCredentialPropertiesParams) UnmarshalEasyJSON

func (v *SetCredentialPropertiesParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetCredentialPropertiesParams) UnmarshalJSON

func (v *SetCredentialPropertiesParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetCredentialPropertiesParams) WithBackupEligibility

func (p SetCredentialPropertiesParams) WithBackupEligibility(backupEligibility bool) *SetCredentialPropertiesParams

WithBackupEligibility [no description].

func (SetCredentialPropertiesParams) WithBackupState

func (p SetCredentialPropertiesParams) WithBackupState(backupState bool) *SetCredentialPropertiesParams

WithBackupState [no description].

type SetResponseOverrideBitsParams

type SetResponseOverrideBitsParams struct {
	AuthenticatorID  AuthenticatorID `json:"authenticatorId"`
	IsBogusSignature bool            `json:"isBogusSignature,omitempty"` // If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false.
	IsBadUV          bool            `json:"isBadUV,omitempty"`          // If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false.
	IsBadUP          bool            `json:"isBadUP,omitempty"`          // If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.
}

SetResponseOverrideBitsParams resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.

func SetResponseOverrideBits

func SetResponseOverrideBits(authenticatorID AuthenticatorID) *SetResponseOverrideBitsParams

SetResponseOverrideBits resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setResponseOverrideBits

parameters:

authenticatorID

func (*SetResponseOverrideBitsParams) Do

Do executes WebAuthn.setResponseOverrideBits against the provided context.

func (SetResponseOverrideBitsParams) MarshalEasyJSON

func (v SetResponseOverrideBitsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetResponseOverrideBitsParams) MarshalJSON

func (v SetResponseOverrideBitsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetResponseOverrideBitsParams) UnmarshalEasyJSON

func (v *SetResponseOverrideBitsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetResponseOverrideBitsParams) UnmarshalJSON

func (v *SetResponseOverrideBitsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetResponseOverrideBitsParams) WithIsBadUP

WithIsBadUP if isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.

func (SetResponseOverrideBitsParams) WithIsBadUV

WithIsBadUV if isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false.

func (SetResponseOverrideBitsParams) WithIsBogusSignature

func (p SetResponseOverrideBitsParams) WithIsBogusSignature(isBogusSignature bool) *SetResponseOverrideBitsParams

WithIsBogusSignature if isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false.

type SetUserVerifiedParams

type SetUserVerifiedParams struct {
	AuthenticatorID AuthenticatorID `json:"authenticatorId"`
	IsUserVerified  bool            `json:"isUserVerified"`
}

SetUserVerifiedParams sets whether User Verification succeeds or fails for an authenticator. The default is true.

func SetUserVerified

func SetUserVerified(authenticatorID AuthenticatorID, isUserVerified bool) *SetUserVerifiedParams

SetUserVerified sets whether User Verification succeeds or fails for an authenticator. The default is true.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setUserVerified

parameters:

authenticatorID
isUserVerified

func (*SetUserVerifiedParams) Do

func (p *SetUserVerifiedParams) Do(ctx context.Context) (err error)

Do executes WebAuthn.setUserVerified against the provided context.

func (SetUserVerifiedParams) MarshalEasyJSON

func (v SetUserVerifiedParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetUserVerifiedParams) MarshalJSON

func (v SetUserVerifiedParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetUserVerifiedParams) UnmarshalEasyJSON

func (v *SetUserVerifiedParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetUserVerifiedParams) UnmarshalJSON

func (v *SetUserVerifiedParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type VirtualAuthenticatorOptions

type VirtualAuthenticatorOptions struct {
	Protocol                    AuthenticatorProtocol  `json:"protocol"`
	Ctap2version                Ctap2version           `json:"ctap2Version,omitempty"` // Defaults to ctap2_0. Ignored if |protocol| == u2f.
	Transport                   AuthenticatorTransport `json:"transport"`
	HasResidentKey              bool                   `json:"hasResidentKey,omitempty"`              // Defaults to false.
	HasUserVerification         bool                   `json:"hasUserVerification,omitempty"`         // Defaults to false.
	HasLargeBlob                bool                   `json:"hasLargeBlob,omitempty"`                // If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.
	HasCredBlob                 bool                   `json:"hasCredBlob,omitempty"`                 // If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.
	HasMinPinLength             bool                   `json:"hasMinPinLength,omitempty"`             // If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.
	HasPrf                      bool                   `json:"hasPrf,omitempty"`                      // If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.
	AutomaticPresenceSimulation bool                   `json:"automaticPresenceSimulation,omitempty"` // If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.
	IsUserVerified              bool                   `json:"isUserVerified,omitempty"`              // Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.
	DefaultBackupEligibility    bool                   `json:"defaultBackupEligibility,omitempty"`    // Credentials created by this authenticator will have the backup eligibility (BE) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup
	DefaultBackupState          bool                   `json:"defaultBackupState,omitempty"`          // Credentials created by this authenticator will have the backup state (BS) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup
}

VirtualAuthenticatorOptions [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-VirtualAuthenticatorOptions

func (VirtualAuthenticatorOptions) MarshalEasyJSON

func (v VirtualAuthenticatorOptions) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (VirtualAuthenticatorOptions) MarshalJSON

func (v VirtualAuthenticatorOptions) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*VirtualAuthenticatorOptions) UnmarshalEasyJSON

func (v *VirtualAuthenticatorOptions) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*VirtualAuthenticatorOptions) UnmarshalJSON

func (v *VirtualAuthenticatorOptions) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL