import "github.com/chromedp/cdproto/webauthn"
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.
easyjson.go types.go webauthn.go
const ( CommandEnable = "WebAuthn.enable" CommandDisable = "WebAuthn.disable" CommandAddVirtualAuthenticator = "WebAuthn.addVirtualAuthenticator" CommandRemoveVirtualAuthenticator = "WebAuthn.removeVirtualAuthenticator" CommandAddCredential = "WebAuthn.addCredential" CommandGetCredential = "WebAuthn.getCredential" CommandGetCredentials = "WebAuthn.getCredentials" CommandRemoveCredential = "WebAuthn.removeCredential" CommandClearCredentials = "WebAuthn.clearCredentials" CommandSetUserVerified = "WebAuthn.setUserVerified" CommandSetAutomaticPresenceSimulation = "WebAuthn.setAutomaticPresenceSimulation" )
Command names.
type AddCredentialParams struct { AuthenticatorID AuthenticatorID `json:"authenticatorId"` Credential *Credential `json:"credential"` }
AddCredentialParams adds the credential to the specified authenticator.
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 (p *AddCredentialParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.addCredential against the provided context.
func (v AddCredentialParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v AddCredentialParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *AddCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AddCredentialParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type AddVirtualAuthenticatorParams struct { Options *VirtualAuthenticatorOptions `json:"options"` }
AddVirtualAuthenticatorParams creates and adds a virtual authenticator.
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 (p *AddVirtualAuthenticatorParams) Do(ctx context.Context) (authenticatorID AuthenticatorID, err error)
Do executes WebAuthn.addVirtualAuthenticator against the provided context.
returns:
authenticatorID
func (v AddVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v AddVirtualAuthenticatorParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *AddVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AddVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type AddVirtualAuthenticatorReturns struct { AuthenticatorID AuthenticatorID `json:"authenticatorId,omitempty"` }
AddVirtualAuthenticatorReturns return values.
func (v AddVirtualAuthenticatorReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v AddVirtualAuthenticatorReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *AddVirtualAuthenticatorReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AddVirtualAuthenticatorReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
AuthenticatorID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorId
func (t AuthenticatorID) String() string
String returns the AuthenticatorID as string value.
AuthenticatorProtocol [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorProtocol
const ( AuthenticatorProtocolU2f AuthenticatorProtocol = "u2f" AuthenticatorProtocolCtap2 AuthenticatorProtocol = "ctap2" )
AuthenticatorProtocol values.
func (t AuthenticatorProtocol) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (t AuthenticatorProtocol) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (t AuthenticatorProtocol) String() string
String returns the AuthenticatorProtocol as string value.
func (t *AuthenticatorProtocol) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *AuthenticatorProtocol) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
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 (t AuthenticatorTransport) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (t AuthenticatorTransport) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (t AuthenticatorTransport) String() string
String returns the AuthenticatorTransport as string value.
func (t *AuthenticatorTransport) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *AuthenticatorTransport) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type ClearCredentialsParams struct { AuthenticatorID AuthenticatorID `json:"authenticatorId"` }
ClearCredentialsParams clears all the credentials from the specified device.
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 (p *ClearCredentialsParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.clearCredentials against the provided context.
func (v ClearCredentialsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ClearCredentialsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ClearCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ClearCredentialsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 }
Credential [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-Credential
func (v Credential) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v Credential) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *Credential) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Credential) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 (t Ctap2version) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (t Ctap2version) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (t Ctap2version) String() string
String returns the Ctap2version as string value.
func (t *Ctap2version) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *Ctap2version) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type DisableParams struct{}
DisableParams disable the WebAuthn domain.
func Disable() *DisableParams
Disable disable the WebAuthn domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-disable
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.disable against the provided context.
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams struct{}
EnableParams enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.
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
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.enable against the provided context.
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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(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 (p *GetCredentialParams) Do(ctx context.Context) (credential *Credential, err error)
Do executes WebAuthn.getCredential against the provided context.
returns:
credential
func (v GetCredentialParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCredentialParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCredentialParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetCredentialReturns struct { Credential *Credential `json:"credential,omitempty"` }
GetCredentialReturns return values.
func (v GetCredentialReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCredentialReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetCredentialReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCredentialReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetCredentialsParams struct { AuthenticatorID AuthenticatorID `json:"authenticatorId"` }
GetCredentialsParams returns all the credentials stored in the given virtual authenticator.
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 (p *GetCredentialsParams) Do(ctx context.Context) (credentials []*Credential, err error)
Do executes WebAuthn.getCredentials against the provided context.
returns:
credentials
func (v GetCredentialsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCredentialsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCredentialsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetCredentialsReturns struct { Credentials []*Credential `json:"credentials,omitempty"` }
GetCredentialsReturns return values.
func (v GetCredentialsReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCredentialsReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetCredentialsReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCredentialsReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RemoveCredentialParams struct { AuthenticatorID AuthenticatorID `json:"authenticatorId"` CredentialID string `json:"credentialId"` }
RemoveCredentialParams removes a credential from the authenticator.
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 (p *RemoveCredentialParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.removeCredential against the provided context.
func (v RemoveCredentialParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RemoveCredentialParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RemoveCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RemoveCredentialParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RemoveVirtualAuthenticatorParams struct { AuthenticatorID AuthenticatorID `json:"authenticatorId"` }
RemoveVirtualAuthenticatorParams removes the given authenticator.
func RemoveVirtualAuthenticator(authenticatorID AuthenticatorID) *RemoveVirtualAuthenticatorParams
RemoveVirtualAuthenticator removes the given authenticator.
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-removeVirtualAuthenticator
parameters:
authenticatorID
func (p *RemoveVirtualAuthenticatorParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.removeVirtualAuthenticator against the provided context.
func (v RemoveVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RemoveVirtualAuthenticatorParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RemoveVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RemoveVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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(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.
parameters:
authenticatorID enabled
func (p *SetAutomaticPresenceSimulationParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.setAutomaticPresenceSimulation against the provided context.
func (v SetAutomaticPresenceSimulationParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SetAutomaticPresenceSimulationParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SetAutomaticPresenceSimulationParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SetAutomaticPresenceSimulationParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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(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 (p *SetUserVerifiedParams) Do(ctx context.Context) (err error)
Do executes WebAuthn.setUserVerified against the provided context.
func (v SetUserVerifiedParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SetUserVerifiedParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SetUserVerifiedParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SetUserVerifiedParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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. 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. }
VirtualAuthenticatorOptions [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-VirtualAuthenticatorOptions
func (v VirtualAuthenticatorOptions) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v VirtualAuthenticatorOptions) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *VirtualAuthenticatorOptions) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *VirtualAuthenticatorOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Package webauthn imports 7 packages (graph) and is imported by 2 packages. Updated 2021-01-07. Refresh now. Tools for package owners.