fido

package module
v0.0.0-...-21ab902 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 5 Imported by: 1 module, 3 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.

README

go-fido

This library implements structure related to FIDO and WebAuthn.

Any contribution is welcome.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformedData = errors.New("data malformed")

Functions

This section is empty.

Types

type AttestedCredentialData

type AttestedCredentialData struct {
	AAGUID              []byte
	CredentialIdLength  uint16
	CredentialId        []byte
	CredentialPublicKey *cose.Key
}

type AuthenticatorData

type AuthenticatorData struct {
	RPIDHash               []byte
	Flags                  AuthenticatorDataFlag
	SignCount              uint32
	AttestedCredentialData *AttestedCredentialData
	Extensions             map[string]any
}

> The authenticator data structure encodes contextual bindings made by the authenticator. https://www.w3.org/TR/webauthn-2/#authenticator-data UnmarshalBinary can be used to parse data

func (*AuthenticatorData) UnmarshalBinary

func (d *AuthenticatorData) UnmarshalBinary(data []byte) error

type AuthenticatorDataFlag

type AuthenticatorDataFlag uint8
const (
	AuthenticatorDataFlagUserPresent                    AuthenticatorDataFlag = 0x01
	AuthenticatorDataFlagUserVerified                   AuthenticatorDataFlag = 0x04
	AuthenticatorDataFlagAttestedCredentialDataIncluded AuthenticatorDataFlag = 0x40
	AuthenticatorDataFlagExtentionDataIncluded          AuthenticatorDataFlag = 0x80
)

type PackedAttestationStatement

type PackedAttestationStatement struct {
	Alg cose.Algorithm `cbor:"alg" json:"alg"`
	Sig []byte         `cbor:"sig" json:"sig"`
	X5c [][]byte       `cbor:"x5c" json:"x5c"`
}

> This is a WebAuthn optimized attestation statement format. https://w3c.github.io/webauthn/#sctn-packed-attestation

type PublicKeyCredentialDescriptor

type PublicKeyCredentialDescriptor struct {
	Type       string   `cbor:"type" json:"type"`
	ID         []byte   `cbor:"id" json:"id"`
	Transports []string `cbor:"transports" json:"transports"`
}

> This dictionary identifies a specific public key credential. https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptor

type PublicKeyCredentialParameters

type PublicKeyCredentialParameters struct {
	Type string         `cbor:"type" json:"type"`
	Alg  cose.Algorithm `cbor:"alg" json:"alg"`
}

This dictionary is used to supply additional parameters when creating a new credential. https://w3c.github.io/webauthn/#dictdef-publickeycredentialparameters

type PublicKeyCredentialRpEntity

type PublicKeyCredentialRpEntity struct {
	Name string `cbor:"name" json:"name"`
	ID   string `cbor:"id" json:"id"`
}

> The PublicKeyCredentialRpEntity dictionary is used to supply additional Relying Party attributes when creating a new credential. https://w3c.github.io/webauthn/#dictdef-publickeycredentialrpentity

type PublicKeyCredentialUserEntity

type PublicKeyCredentialUserEntity struct {
	ID          []byte `cbor:"id" json:"id"`
	DisplayName string `cbor:"displayName" json:"displayName"`
}

> The PublicKeyCredentialUserEntity dictionary is used to supply additional user account attributes when creating a new credential. https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentity

Jump to

Keyboard shortcuts

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