webauthn

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 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.
	RPIDHash     string `json:"rpIdHash"`     // SHA-256 hash of the Relying Party ID the credential is scoped to. Must be 32 bytes long. See https://w3c.github.io/webauthn/#rpidhash
	PrivateKey   string `json:"privateKey"`   // The private key in PKCS#8 format.
	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 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 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"`                        // No description.
	HasUserVerification         bool                   `json:"hasUserVerification"`                   // No description.
	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.
}

VirtualAuthenticatorOptions

Jump to

Keyboard shortcuts

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