Documentation
¶
Overview ¶
Package webauthn implements the WebAuthn domain. This domain allows configuring virtual authenticators to test the WebAuthn API.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type AddCredentialArgs
- type AddVirtualAuthenticatorArgs
- type AddVirtualAuthenticatorReply
- type AuthenticatorID
- type AuthenticatorProtocol
- type AuthenticatorTransport
- type CTAP2Version
- type ClearCredentialsArgs
- type Credential
- type GetCredentialArgs
- type GetCredentialReply
- type GetCredentialsArgs
- type GetCredentialsReply
- type RemoveCredentialArgs
- type RemoveVirtualAuthenticatorArgs
- type SetAutomaticPresenceSimulationArgs
- type SetUserVerifiedArgs
- type VirtualAuthenticatorOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddCredentialArgs ¶ added in v0.23.4
type AddCredentialArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
Credential Credential `json:"credential"` // No description.
}
AddCredentialArgs represents the arguments for AddCredential in the WebAuthn domain.
func NewAddCredentialArgs ¶ added in v0.23.4
func NewAddCredentialArgs(authenticatorID AuthenticatorID, credential Credential) *AddCredentialArgs
NewAddCredentialArgs initializes AddCredentialArgs with the required arguments.
type AddVirtualAuthenticatorArgs ¶
type AddVirtualAuthenticatorArgs struct {
Options VirtualAuthenticatorOptions `json:"options"` // No description.
}
AddVirtualAuthenticatorArgs represents the arguments for AddVirtualAuthenticator in the WebAuthn domain.
func NewAddVirtualAuthenticatorArgs ¶
func NewAddVirtualAuthenticatorArgs(options VirtualAuthenticatorOptions) *AddVirtualAuthenticatorArgs
NewAddVirtualAuthenticatorArgs initializes AddVirtualAuthenticatorArgs with the required arguments.
type AddVirtualAuthenticatorReply ¶
type AddVirtualAuthenticatorReply struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
}
AddVirtualAuthenticatorReply represents the return values for AddVirtualAuthenticator in the WebAuthn domain.
type AuthenticatorProtocol ¶
type AuthenticatorProtocol string
AuthenticatorProtocol
const ( AuthenticatorProtocolNotSet AuthenticatorProtocol = "" AuthenticatorProtocolU2F AuthenticatorProtocol = "u2f" AuthenticatorProtocolCTAP2 AuthenticatorProtocol = "ctap2" )
AuthenticatorProtocol as enums.
func (AuthenticatorProtocol) String ¶
func (e AuthenticatorProtocol) String() string
func (AuthenticatorProtocol) Valid ¶
func (e AuthenticatorProtocol) Valid() bool
type AuthenticatorTransport ¶
type AuthenticatorTransport string
AuthenticatorTransport
const ( AuthenticatorTransportNotSet AuthenticatorTransport = "" AuthenticatorTransportUSB AuthenticatorTransport = "usb" AuthenticatorTransportNFC AuthenticatorTransport = "nfc" AuthenticatorTransportBLE AuthenticatorTransport = "ble" AuthenticatorTransportCable AuthenticatorTransport = "cable" AuthenticatorTransportInternal AuthenticatorTransport = "internal" )
AuthenticatorTransport as enums.
func (AuthenticatorTransport) String ¶
func (e AuthenticatorTransport) String() string
func (AuthenticatorTransport) Valid ¶
func (e AuthenticatorTransport) Valid() bool
type CTAP2Version ¶ added in v0.31.0
type CTAP2Version string
CTAP2Version
const ( CTAP2VersionNotSet CTAP2Version = "" CTAP2VersionCTAP2_0 CTAP2Version = "ctap2_0" CTAP2VersionCTAP2_1 CTAP2Version = "ctap2_1" )
CTAP2Version as enums.
func (CTAP2Version) String ¶ added in v0.31.0
func (e CTAP2Version) String() string
func (CTAP2Version) Valid ¶ added in v0.31.0
func (e CTAP2Version) Valid() bool
type ClearCredentialsArgs ¶ added in v0.23.4
type ClearCredentialsArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
}
ClearCredentialsArgs represents the arguments for ClearCredentials in the WebAuthn domain.
func NewClearCredentialsArgs ¶ added in v0.23.4
func NewClearCredentialsArgs(authenticatorID AuthenticatorID) *ClearCredentialsArgs
NewClearCredentialsArgs initializes ClearCredentialsArgs with the required arguments.
type Credential ¶ added in v0.23.4
type Credential struct {
CredentialID string `json:"credentialId"` // No description.
IsResidentCredential bool `json:"isResidentCredential"` // No description.
RPID *string `json:"rpId,omitempty"` // Relying Party ID the credential is scoped to. Must be set when adding a credential.
PrivateKey []byte `json:"privateKey"` // The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON)
UserHandle []byte `json:"userHandle,omitempty"` // An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user. (Encoded as a base64 string when passed over JSON)
SignCount int `json:"signCount"` // Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter
LargeBlob []byte `json:"largeBlob,omitempty"` // The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON)
}
Credential
type GetCredentialArgs ¶ added in v0.25.0
type GetCredentialArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
CredentialID string `json:"credentialId"` // No description.
}
GetCredentialArgs represents the arguments for GetCredential in the WebAuthn domain.
func NewGetCredentialArgs ¶ added in v0.25.0
func NewGetCredentialArgs(authenticatorID AuthenticatorID, credentialID string) *GetCredentialArgs
NewGetCredentialArgs initializes GetCredentialArgs with the required arguments.
type GetCredentialReply ¶ added in v0.25.0
type GetCredentialReply struct {
Credential Credential `json:"credential"` // No description.
}
GetCredentialReply represents the return values for GetCredential in the WebAuthn domain.
type GetCredentialsArgs ¶ added in v0.23.4
type GetCredentialsArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
}
GetCredentialsArgs represents the arguments for GetCredentials in the WebAuthn domain.
func NewGetCredentialsArgs ¶ added in v0.23.4
func NewGetCredentialsArgs(authenticatorID AuthenticatorID) *GetCredentialsArgs
NewGetCredentialsArgs initializes GetCredentialsArgs with the required arguments.
type GetCredentialsReply ¶ added in v0.23.4
type GetCredentialsReply struct {
Credentials []Credential `json:"credentials"` // No description.
}
GetCredentialsReply represents the return values for GetCredentials in the WebAuthn domain.
type RemoveCredentialArgs ¶ added in v0.25.0
type RemoveCredentialArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
CredentialID string `json:"credentialId"` // No description.
}
RemoveCredentialArgs represents the arguments for RemoveCredential in the WebAuthn domain.
func NewRemoveCredentialArgs ¶ added in v0.25.0
func NewRemoveCredentialArgs(authenticatorID AuthenticatorID, credentialID string) *RemoveCredentialArgs
NewRemoveCredentialArgs initializes RemoveCredentialArgs with the required arguments.
type RemoveVirtualAuthenticatorArgs ¶
type RemoveVirtualAuthenticatorArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
}
RemoveVirtualAuthenticatorArgs represents the arguments for RemoveVirtualAuthenticator in the WebAuthn domain.
func NewRemoveVirtualAuthenticatorArgs ¶
func NewRemoveVirtualAuthenticatorArgs(authenticatorID AuthenticatorID) *RemoveVirtualAuthenticatorArgs
NewRemoveVirtualAuthenticatorArgs initializes RemoveVirtualAuthenticatorArgs with the required arguments.
type SetAutomaticPresenceSimulationArgs ¶ added in v0.31.0
type SetAutomaticPresenceSimulationArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
Enabled bool `json:"enabled"` // No description.
}
SetAutomaticPresenceSimulationArgs represents the arguments for SetAutomaticPresenceSimulation in the WebAuthn domain.
func NewSetAutomaticPresenceSimulationArgs ¶ added in v0.31.0
func NewSetAutomaticPresenceSimulationArgs(authenticatorID AuthenticatorID, enabled bool) *SetAutomaticPresenceSimulationArgs
NewSetAutomaticPresenceSimulationArgs initializes SetAutomaticPresenceSimulationArgs with the required arguments.
type SetUserVerifiedArgs ¶ added in v0.24.1
type SetUserVerifiedArgs struct {
AuthenticatorID AuthenticatorID `json:"authenticatorId"` // No description.
IsUserVerified bool `json:"isUserVerified"` // No description.
}
SetUserVerifiedArgs represents the arguments for SetUserVerified in the WebAuthn domain.
func NewSetUserVerifiedArgs ¶ added in v0.24.1
func NewSetUserVerifiedArgs(authenticatorID AuthenticatorID, isUserVerified bool) *SetUserVerifiedArgs
NewSetUserVerifiedArgs initializes SetUserVerifiedArgs with the required arguments.
type VirtualAuthenticatorOptions ¶
type VirtualAuthenticatorOptions struct {
Protocol AuthenticatorProtocol `json:"protocol"` // No description.
CTAP2Version CTAP2Version `json:"ctap2Version,omitempty"` // Defaults to ctap2_0. Ignored if |protocol| == u2f.
Transport AuthenticatorTransport `json:"transport"` // No description.
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