Versions in this module Expand all Collapse all v1 v1.5.6 Oct 17, 2025 Changes in this version + var ErrActionTimeout = errors.New("action timed out") + var ErrInternal = errors.New("internal error") + var ErrInvalidArgument = errors.New("invalid argument") + var ErrInvalidCommand = errors.New("invalid command") + var ErrInvalidCredential = errors.New("invalid credential") + var ErrInvalidLength = errors.New("invalid length") + var ErrInvalidOption = errors.Errorf("invalid option") + var ErrKeepaliveCancel = errors.Errorf("keep alive cancel") + var ErrMissingParameter = errors.New("missing parameter") + var ErrNoCredentials = errors.New("no credentials") + var ErrNotAllowed = errors.New("not allowed") + var ErrNotFIDO2 = errors.Errorf("not a FIDO2 device") + var ErrOperationDenied = errors.New("operation denied") + var ErrOther = errors.Errorf("other error") + var ErrPinAuthBlocked = errors.New("pin auth blocked") + var ErrPinInvalid = errors.New("pin invalid") + var ErrPinNotSet = errors.New("pin not set") + var ErrPinPolicyViolation = errors.New("pin policy violation") + var ErrPinRequired = errors.New("pin required") + var ErrRX = errors.New("rx error") + var ErrRXInvalidCBOR = errors.New("rx invalid cbor") + var ErrRXNotCBOR = errors.New("rx not CBOR") + var ErrTX = errors.New("tx error") + var ErrUPRequired = errors.New("up required") + var ErrUnsupportedOption = errors.New("unsupported option") + var ErrUserPresenceRequired = errors.New("user presence required") + func RandBytes(length int) []byte + func SetLogger(l Logger) + type Assertion struct + AuthDataCBOR []byte + CredentialID []byte + HMACSecret []byte + Sig []byte + User User + type AssertionOpts struct + Extensions []Extension + HMACSalt []byte + UP OptionValue + UV OptionValue + type Attestation struct + AuthData []byte + Cert []byte + ClientDataHash []byte + CredentialID []byte + CredentialType CredentialType + Format string + PubKey []byte + Sig []byte + type BioTemplate struct + ID string + Name string + type CredProtect string + const CredProtectNone + const CredProtectUVOptional + const CredProtectUVOptionalWithID + const CredProtectUVRequired + type Credential struct + ID []byte + Type CredentialType + User User + type CredentialType int + const EDDSA + const ES256 + const RS256 + func (c CredentialType) String() string + type CredentialsInfo struct + RKExisting int64 + RKRemaining int64 + type Device struct + func NewDevice(path string) (*Device, error) + func SelectDevice(devs []*Device, timeout time.Duration) (*Device, error) + func (d *Device) Assertion(rpID string, clientDataHash []byte, credentialIDs [][]byte, pin string, ...) (*Assertion, error) + func (d *Device) BioDelete(pin, templateId string) error + func (d *Device) BioEnroll(pin string) error + func (d *Device) BioList(pin string) ([]BioTemplate, error) + func (d *Device) BioSetTemplateName(pin, templateId, name string) error + func (d *Device) CTAPHIDInfo() (*HIDInfo, error) + func (d *Device) Cancel() error + func (d *Device) Credentials(rpID string, pin string) ([]*Credential, error) + func (d *Device) CredentialsInfo(pin string) (*CredentialsInfo, error) + func (d *Device) DeleteCredential(credID []byte, pin string) error + func (d *Device) Info() (*DeviceInfo, error) + func (d *Device) IsFIDO2() (bool, error) + func (d *Device) MakeCredential(clientDataHash []byte, rp RelyingParty, user User, typ CredentialType, ...) (*Attestation, error) + func (d *Device) PublicKey(rp *RelyingParty, credential []byte, pin string) ([]byte, error) + func (d *Device) RelyingParties(pin string) ([]*RelyingParty, error) + func (d *Device) Reset() error + func (d *Device) RetryCount() (int, error) + func (d *Device) SetPIN(pin string, old string) error + func (d *Device) Type() (DeviceType, error) + type DeviceInfo struct + AAGUID []byte + Extensions []string + Options []Option + Protocols []byte + Versions []string + type DeviceLocation struct + Manufacturer string + Path string + Product string + ProductID int16 + VendorID int16 + func DeviceLocations() ([]*DeviceLocation, error) + type DeviceType string + const FIDO2 + const U2F + const UnknownDevice + type Error struct + Code int + func (e Error) Error() string + type Extension string + const CredProtectExtension + const HMACSecretExtension + type HIDInfo struct + Build uint8 + Flags uint8 + Major uint8 + Minor uint8 + Protocol uint8 + type LogLevel int + const DebugLevel + const ErrLevel + const InfoLevel + const WarnLevel + func (l LogLevel) String() string + type Logger interface + Debugf func(format string, args ...interface{}) + Errorf func(format string, args ...interface{}) + Fatalf func(format string, args ...interface{}) + Infof func(format string, args ...interface{}) + Warningf func(format string, args ...interface{}) + func NewLogger(lev LogLevel) Logger + type MakeCredentialOpts struct + CredProtect CredProtect + Extensions []Extension + RK OptionValue + UV OptionValue + type Option struct + Name string + Value OptionValue + type OptionValue string + const Default + const False + const True + type RelyingParty struct + ID string + Name string + type User struct + DisplayName string + ID []byte + Icon string + Name string