simpleauth

package
v0.1.40 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const SimpleAuth = auth.Type("simpleauth")

Variables

This section is empty.

Functions

func Loader added in v0.0.64

func Loader(unmarshal auth.YAMLUnmarshaler, config_dir string) (auth.Authenticator, error)

func ToFile added in v0.0.64

func ToFile(a *SimpleUserAuthenticator, path string) (err error)

Types

type Config added in v0.0.64

type Config struct {
	Path string
}

type PermissionTable

type PermissionTable map[string]UserTable

type SimpleUserAuthenticator

type SimpleUserAuthenticator struct {
	Permissions PermissionTable
}

func FromConfig added in v0.0.64

func FromConfig(config Config) (*SimpleUserAuthenticator, error)

func FromFile added in v0.0.64

func FromFile(path string) (*SimpleUserAuthenticator, error)

func (*SimpleUserAuthenticator) AddPermission

func (a *SimpleUserAuthenticator) AddPermission(user string, password string, domain string) (err error)

func (*SimpleUserAuthenticator) Close added in v0.0.64

func (a *SimpleUserAuthenticator) Close() (err error)

func (*SimpleUserAuthenticator) Load

func (a *SimpleUserAuthenticator) Load(f io.Reader) (err error)

func (*SimpleUserAuthenticator) RemovePermission

func (a *SimpleUserAuthenticator) RemovePermission(user string, domain string) (err error)

func (*SimpleUserAuthenticator) Save

func (a *SimpleUserAuthenticator) Save(w io.Writer) (err error)

func (*SimpleUserAuthenticator) VerifyPermissions

func (a *SimpleUserAuthenticator) VerifyPermissions(user string, password string, domain string) (err error)

type UserTable

type UserTable map[string]string

Jump to

Keyboard shortcuts

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