api

package
v0.0.0-...-48b6be6 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientData

func CreateClientData(action, origin, challenge, HashAlgID string) (*share.RawCollectedClientData, error)

CreateClientData ...

func NewGetAssertionOptions

func NewGetAssertionOptions() *share.RawAuthenticatorGetAssertionOptions

NewGetAssertionOptions returns an AuthenticatorGetAssertionOptions struct pointer whih default value.

func NewMakeCredOpts

NewMakeCredOpts returns an AuthenticatorMakeCredentialOptions struct pointer whih default value.

Types

type User

type User interface {
	GetID() []byte
	GetName() string
	GetDisplayName() string
	GetIcon() string
}

type WebAuthNClient

type WebAuthNClient struct {
	RPInfo                   share.RawRPInfo
	COSECredentialParameters []*share.RawCOSECredentialParameter

	Timeout uint32
	// contains filtered or unexported fields
}

WebAuthNClient ...

func NewClient

func NewClient(rpID, rpName, rpIcon string) *WebAuthNClient

NewClient inits a WebAuthN client with the basic information.

An rpID MUST be a valid domain string. See https://w3c.github.io/webauthn/#rp-id

func (*WebAuthNClient) DeletePlatformCred

func (c *WebAuthNClient) DeletePlatformCred(cbCred uint32, pbCred *byte) error

DeletePlatformCred removes a Public Key Credential Source stored on a Virtual Authenticator.

func (*WebAuthNClient) GetAssertion

func (*WebAuthNClient) GetPlatformCredentialList

func (c *WebAuthNClient) GetPlatformCredentialList(rpid string) ([]*share.CredentialDetails, error)

GetPlatformCredentialList gets the list of WebAuthN/FIDO2 credentials currently stored for the user.

If rpid is not given, will use client rpid.

If rpid is "-", will let this argurement empty when calling win32 api.

func (*WebAuthNClient) MakeCredential

func (*WebAuthNClient) SetDefaultCOSE

func (c *WebAuthNClient) SetDefaultCOSE()

SetDefaultCOSE sets COSECredentialParameters to ES256 and RS256.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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