resolver

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package resolver correlates one FIDO attachment with Token2's auxiliary interfaces and returns transport-neutral device information.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotApplicable reports that the exact smart-card target is not a
	// Token2 device.
	ErrNotApplicable = errors.New("token2 resolver: target is not Token2")
	// ErrIdentityUnavailable reports that Token2 was expected, but no
	// auxiliary interface could be correlated with the target.
	ErrIdentityUnavailable = errors.New("token2 resolver: identity unavailable")
	// ErrAmbiguous reports conflicting, independently correlated identities.
	ErrAmbiguous = errors.New("token2 resolver: ambiguous identity")
)

Functions

This section is empty.

Types

type HIDTarget

type HIDTarget struct {
	ReportedSerial string
	ProductID      uint16
	InstanceID     string
	ParentDeviceID string
	ATR            *token2.ATR
}

HIDTarget describes one FIDO HID attachment and the evidence that may correlate it with Token2 auxiliary interfaces.

type Resolver

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

Resolver resolves targets against local PC/SC and HID topology.

func NewLocal

func NewLocal() *Resolver

NewLocal creates a resolver backed by the host HID and PC/SC services.

func (*Resolver) ResolveHID

func (r *Resolver) ResolveHID(
	ctx context.Context,
	target HIDTarget,
) (token2.DeviceInfo, error)

ResolveHID correlates a FIDO HID attachment with Token2's PC/SC and feature HID interfaces.

func (*Resolver) ResolveSmartCard

func (r *Resolver) ResolveSmartCard(
	ctx context.Context,
	reader string,
) (token2.DeviceInfo, error)

ResolveSmartCard reads device information from the exact PC/SC reader.

Jump to

Keyboard shortcuts

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