config

package
v0.0.0-...-147f0cf Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	// PasswordFile with the file based password store.
	// Use a relative path for using the default $HOME/stores/authn location
	// Use "" for default defined in 'authnstore.DefaultPasswordFile'
	PasswordFile string `yaml:"passwordFile,omitempty"`
	// Encryption of passwords: "argon2id" (default) or "bcrypt"
	Encryption string `yaml:"encryption,omitempty"`

	// Auth token validity for devices in days
	DeviceTokenValidityDays int `yaml:"deviceTokenValidityDays,omitempty"`
	// Auth token validity for services in days
	ServiceTokenValidityDays int `yaml:"serviceTokenValidityDays,omitempty"`
	// Auth token validity for users in days
	UserTokenValidityDays int `yaml:"userTokenValidityDays,omitempty"`

	// NoAutoStart prevents the auth service for auto starting. Intended for testing or custom implementation.
	NoAutoStart bool `yaml:"noAutoStart,omitempty"`

	// predefined accounts
	// Location of client keys and tokens
	KeysDir           string `yaml:"certsDir,omitempty"`
	AdminAccountID    string `yaml:"adminAccountID,omitempty"`
	LauncherAccountID string `yaml:"launcherAccountID,omitempty"`
}

AuthConfig contains the auth service configuration

func (*AuthConfig) Setup

func (cfg *AuthConfig) Setup(keysDir, storesDir string) error

Setup ensures config is valid

storesDir is the default storage root directory ($HOME/stores)

Jump to

Keyboard shortcuts

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