users

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Load

func Load(path string) (*Store, error)

func (*Store) Get

func (s *Store) Get(username string) (User, bool)

func (*Store) Verify

func (s *Store) Verify(username, password string) (User, error)

type User

type User struct {
	Username  string   `json:"username"`
	Salt      string   `json:"salt"`
	Password  string   `json:"password"` // sha256(salt+password) hex
	Roles     []string `json:"roles"`
	Perms     []string `json:"perms,omitempty"`
	OTPSecret string   `json:"otp_secret,omitempty"`
}

Jump to

Keyboard shortcuts

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