fidohid

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthEvent

type AuthEvent struct {
	Req     *fidoauth.AuthenticatorRequest
	RawCbor []byte // non-nil iff this is a CTAP2 (CmdCbor) event
	Error   error
	// contains filtered or unexported fields
}

type CmdType

type CmdType uint8
const (
	CmdPing  CmdType = 0x01 // Echo data through local processor only
	CmdMsg   CmdType = 0x03 // Send U2F message frame
	CmdLock  CmdType = 0x04 // Send lock channel command
	CmdInit  CmdType = 0x06 // Channel initialization
	CmdWink  CmdType = 0x08 // Send device identification wink
	CmdCbor  CmdType = 0x10 // Send encapsulated CTAP CBOR
	CmdSync  CmdType = 0x3c // Protocol resync command
	CmdError CmdType = 0x3f // Error response

)

func (CmdType) IsVendorSpecific

func (c CmdType) IsVendorSpecific() bool

func (CmdType) String

func (c CmdType) String() string

type Packet

type Packet struct {
	ChannelID uint32
	IsInitial bool
	Command   CmdType
	SeqNo     byte
	TotalSize uint16
	Data      []byte
}

type SoftToken

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

func New

func New(ctx context.Context, name string) (*SoftToken, error)

func (*SoftToken) Events

func (t *SoftToken) Events() chan AuthEvent

func (*SoftToken) Run

func (t *SoftToken) Run(ctx context.Context)

func (*SoftToken) WriteCtap2Response added in v0.2.0

func (t *SoftToken) WriteCtap2Response(ctx context.Context, evt AuthEvent, status byte, data []byte) error

WriteCtap2Response sends a CTAP2 response: [1-byte status] + [CBOR payload]. No trailing U2F status word is appended.

func (*SoftToken) WriteResponse

func (t *SoftToken) WriteResponse(ctx context.Context, evt AuthEvent, data []byte, status uint16) error

Jump to

Keyboard shortcuts

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