webauthn

package
v0.0.0-...-82cc56b Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AShirtWebauthnCredential

type AShirtWebauthnCredential struct {
	auth.Credential
	AShirtWebauthnExtension
}

type AShirtWebauthnExtension

type AShirtWebauthnExtension struct {
	CredentialName        string    `json:"credentialName"`
	CredentialCreatedDate time.Time `json:"credentialCreatedDate"`
}

type CredentialEntry

type CredentialEntry struct {
	CredentialName string    `json:"credentialName"`
	DateCreated    time.Time `json:"dateCreated"`
	CredentialID   string    `json:"credentialId"`
}

type ListCredentialsOutput

type ListCredentialsOutput struct {
	Credentials []CredentialEntry `json:"credentials"`
}

type RegistrationType

type RegistrationType int
const (
	// CreateOrLinkCredential reflects the usecase where
	CreateCredential RegistrationType = iota
	LinkCredential
	AddCredential
)

type WebAuthn

type WebAuthn struct {
	RegistrationEnabled bool
	Web                 *auth.WebAuthn
}

func New

func New(cfg config.AuthInstanceConfig, webConfig *config.WebConfig) (WebAuthn, error)

func (WebAuthn) BindRoutes

func (a WebAuthn) BindRoutes(r chi.Router, bridge authschemes.AShirtAuthBridge)

func (WebAuthn) Flags

func (a WebAuthn) Flags() []string

func (WebAuthn) FriendlyName

func (a WebAuthn) FriendlyName() string

func (WebAuthn) Name

func (a WebAuthn) Name() string

func (WebAuthn) Type

func (a WebAuthn) Type() string

type WebAuthnRegistrationInfo

type WebAuthnRegistrationInfo struct {
	Email                 string
	Username              string
	FirstName             string
	LastName              string
	CredentialName        string
	UserID                int64
	RegistrationType      RegistrationType
	ExistingCredentials   []AShirtWebauthnCredential
	CredentialCreatedDate time.Time
}

type WebAuthnUpdateCredentialInfo

type WebAuthnUpdateCredentialInfo struct {
	UserID            int64
	CredentialName    string
	NewCredentialName string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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