Documentation
¶
Index ¶
- type AssertionOptions
- type AttestationOptions
- type Authenticator
- type AuthenticatorOptions
- type Key
- type ModuleInstance
- type PortableCredential
- type RootModule
- type VirtualWebAuthn
- func (v *VirtualWebAuthn) CreateAssertionResponse(rpObj goja.Value, auth Authenticator, credObj goja.Value, ...) string
- func (v *VirtualWebAuthn) CreateAttestationResponse(rpObj goja.Value, auth Authenticator, credObj goja.Value, ...) string
- func (v *VirtualWebAuthn) NewAuthenticator() *Authenticator
- func (v *VirtualWebAuthn) NewAuthenticatorWithOptions(optionsObj goja.Value) *Authenticator
- func (v *VirtualWebAuthn) ParseAssertionOptions(str string) (assertionOptions *AssertionOptions)
- func (v *VirtualWebAuthn) ParseAttestationOptions(str string) (attestationOptions *AttestationOptions)
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 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 (*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)
Click to show internal directories.
Click to hide internal directories.