virtualwebauthn

package module
v0.0.0-...-8826efe Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 3 Imported by: 0

README

xk6-virtualwebauthn

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssertionOptions

type AssertionOptions struct {
	Challenge        goja.ArrayBuffer `json:"challenge,omitempty"`
	AllowCredentials []string         `json:"allowCredentials,omitempty"`
	RelyingPartyID   string           `json:"rpId,omitempty"`
}

type AttestationOptions

type AttestationOptions struct {
	Challenge          goja.ArrayBuffer `json:"challenge,omitempty"`
	ExcludeCredentials []string         `json:"excludeCredentials,omitempty"`
	RelyingPartyID     string           `json:"rpId,omitempty"`
	RelyingPartyName   string           `json:"rpName,omitempty"`
	UserID             string           `json:"user,omitempty"`
	UserName           string           `json:"userName,omitempty"`
	UserDisplayName    string           `json:"userDisplayName,omitempty"`
}

type Authenticator

type Authenticator struct {
	Options     AuthenticatorOptions `json:"options"`
	Aaguid      goja.ArrayBuffer     `json:"aaguid"`
	Credentials []PortableCredential `json:"credentials,omitempty"`
	// contains filtered or unexported fields
}

func (*Authenticator) AddCredential

func (a *Authenticator) AddCredential(credObj goja.Value)

func (*Authenticator) FindAllowedCredential

func (a *Authenticator) FindAllowedCredential(options AssertionOptions) *PortableCredential

type AuthenticatorOptions

type AuthenticatorOptions struct {
	UserHandle      goja.ArrayBuffer
	UserNotPresent  bool
	UserNotVerified bool
	Runtime         *goja.Runtime
}

type Key

type Key struct {
	Type            virtualwebauthnx.KeyType `json:"type"`
	Pkcs8SigningKey goja.ArrayBuffer         `json:"signingKey"`
}

type ModuleInstance

type ModuleInstance struct {
	// contains filtered or unexported fields
}

func (*ModuleInstance) Exports

func (mi *ModuleInstance) Exports() modules.Exports

Exports implements the modules.Instance interface and returns the exports of the JS module.

type PortableCredential

type PortableCredential struct {
	ID       goja.ArrayBuffer         `json:"id"`
	PKCS8Key goja.ArrayBuffer         `json:"key"`
	KeyType  virtualwebauthnx.KeyType `json:"keyType,omitempty"`
	Counter  uint32                   `json:"counter,omitempty"`
}

func (*PortableCredential) IsAllowedForAssertion

func (c *PortableCredential) IsAllowedForAssertion(options AssertionOptions) bool

func (*PortableCredential) IsExcludedForAttestation

func (c *PortableCredential) IsExcludedForAttestation(options AttestationOptions) bool

type RootModule

type RootModule struct{}

func New

func New() *RootModule

New returns a pointer to a new RootModule instance.

func (*RootModule) NewModuleInstance

func (*RootModule) NewModuleInstance(vu modules.VU) modules.Instance

NewModuleInstance implements the modules.Module interface and returns a new instance for each VU.

type VirtualWebAuthn

type VirtualWebAuthn struct {
	// contains filtered or unexported fields
}

func (*VirtualWebAuthn) CreateAssertionResponse

func (v *VirtualWebAuthn) CreateAssertionResponse(rpObj goja.Value, auth Authenticator, credObj goja.Value, options AssertionOptions) string

func (*VirtualWebAuthn) CreateAttestationResponse

func (v *VirtualWebAuthn) CreateAttestationResponse(rpObj goja.Value, auth Authenticator, credObj goja.Value, options AttestationOptions) string

func (*VirtualWebAuthn) NewAuthenticator

func (v *VirtualWebAuthn) NewAuthenticator() *Authenticator

func (*VirtualWebAuthn) NewAuthenticatorWithOptions

func (v *VirtualWebAuthn) NewAuthenticatorWithOptions(optionsObj goja.Value) *Authenticator

func (*VirtualWebAuthn) ParseAssertionOptions

func (v *VirtualWebAuthn) ParseAssertionOptions(str string) (assertionOptions *AssertionOptions)

func (*VirtualWebAuthn) ParseAttestationOptions

func (v *VirtualWebAuthn) ParseAttestationOptions(str string) (attestationOptions *AttestationOptions)

Jump to

Keyboard shortcuts

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