webauthn

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the WebAuthn domain with the connection set to conn.

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 AuthenticatorID

type AuthenticatorID string

AuthenticatorID

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 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           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            int     `json:"signCount"`            // Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter
}

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 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.
	Transport                   AuthenticatorTransport `json:"transport"`                             // No description.
	HasResidentKey              *bool                  `json:"hasResidentKey,omitempty"`              // Defaults to false.
	HasUserVerification         *bool                  `json:"hasUserVerification,omitempty"`         // 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

Jump to

Keyboard shortcuts

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