securitykey

package
v1.261125.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package securitykey obtains assertions from attached hardware authenticators.

Index

Constants

View Source
const AssertionTimeout = time.Minute

AssertionTimeout bounds a hardware assertion independently of HTTP requests.

Variables

View Source
var ErrUnavailable = errors.New("security-key support requires a macOS build with CGO_ENABLED=1 and -tags fido2 (use a bundled release, or install libfido2 1.14 or newer and pkg-config for a source build)")

ErrUnavailable identifies a build without the optional native backend.

Functions

func Available

func Available() bool

Available reports whether this build includes the native signer.

func Check

func Check(context.Context) error

Check verifies native readiness when the backend is compiled in.

Types

type Assertion

type Assertion struct {
	CredentialID      []byte
	AuthenticatorData []byte
	Signature         []byte
	UserID            []byte
}

Assertion contains raw WebAuthn bytes, without CBOR or base64 wrapping.

func Sign

Sign obtains an assertion when the native backend is compiled in.

type Request

type Request struct {
	RelyingParty   string
	ClientDataHash [32]byte
	CredentialIDs  [][]byte
}

Request contains the relying party, hash of the exact client-data JSON, and server-provided credential allow-list. It never creates credentials.

Jump to

Keyboard shortcuts

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