static

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStaticBackend

func NewStaticBackend(users []*User, groups []string) (userdb.Backend, error)

Types

type User

type User struct {
	Name              string   `yaml:"name"`
	Email             string   `yaml:"email"`
	EncryptedPassword string   `yaml:"password"`
	TOTPSecret        string   `yaml:"totp_secret"`
	Groups            []string `yaml:"groups"`

	// WebAuthN registrations are encoded as emitted by modern
	// versions of pamu2fcfg: both values are base64-encoded
	// (standard, with padding). The key is actually in COSE format.
	WebAuthnRegistrations []struct {
		KeyHandle string `yaml:"key_handle"`
		PublicKey string `yaml:"public_key"`
		Comment   string `yaml:"comment"`
	} `yaml:"webauthn_registrations"`

	AppSpecificPasswords []struct {
		ID                string `yaml:"id"`
		Service           string `yaml:"service"`
		EncryptedPassword string `yaml:"password"`
		Comment           string `yaml:"comment"`
	} `yaml:"app_specific_passwords"`
}

User type needed to bridge between YAML and the internal User representation.

Jump to

Keyboard shortcuts

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