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 ¶
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 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"`
}