passkey

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 14 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 passkey is the fill authenticator. We are not the relying party. go-webauthn is site-side (Kratos). This package mints ES256 credentials and assertions on the keepassxc-browser passkeys-* wire.

Index

Constants

View Source
const (
	ErrNoLogins        = 15
	ErrExcluded        = 21
	ErrCanceled        = 22
	ErrInvalidURL      = 25
	ErrRPIDMismatch    = 28
	ErrNoSupportedAlgs = 29
	ErrUnknown         = 31
)

Keepassxc-browser errorCode values. Inner `response.errorCode`.

Variables

This section is empty.

Functions

func DecodeB64

func DecodeB64(s string) ([]byte, error)

func ErrorResponse

func ErrorResponse(code int) json.RawMessage

func Register

func Register(origin string, publicKey json.RawMessage, existing []Record, verified bool) (Credential, Record, int)

Types

type Credential

type Credential struct {
	AuthenticatorAttachment string             `json:"authenticatorAttachment"`
	ID                      string             `json:"id"`
	RawID                   string             `json:"rawId"`
	Type                    string             `json:"type"`
	Response                CredentialResponse `json:"response"`
}

func Assert

func Assert(origin string, publicKey json.RawMessage, recs []Record, verified bool) (Credential, int)

type CredentialResponse

type CredentialResponse struct {
	AttestationObject      string         `json:"attestationObject,omitempty"`
	AuthenticatorData      string         `json:"authenticatorData"`
	ClientDataJSON         string         `json:"clientDataJSON,omitempty"`
	PublicKey              string         `json:"publicKey,omitempty"`
	PublicKeyAlgorithm     int            `json:"publicKeyAlgorithm,omitempty"`
	Signature              string         `json:"signature,omitempty"`
	UserHandle             string         `json:"userHandle,omitempty"`
	ClientExtensionResults map[string]any `json:"clientExtensionResults,omitempty"`
}

type Record

type Record struct {
	PEM        string
	CredID     string
	RpID       string
	UserHandle string
	UserName   string
}

Record is sealed vault material. Never on protocol.Item or MCP.

Jump to

Keyboard shortcuts

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