simpleauth

package
v0.1.53 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func SaveToEncoder added in v0.1.46

func SaveToEncoder(enc auth.Encoder, a *Authenticator) (err error)

func SaveToFile added in v0.1.46

func SaveToFile(path string, a *Authenticator) (err error)

func SaveToStream added in v0.1.46

func SaveToStream(w io.Writer, a *Authenticator) (err error)

Types

type Authenticator added in v0.1.46

type Authenticator struct {
	Permissions PermissionTable
}

func LoadFromDecoder added in v0.1.46

func LoadFromDecoder(dec auth.Decoder) (a *Authenticator, err error)

func LoadFromFile added in v0.1.46

func LoadFromFile(path string) (a *Authenticator, err error)

func LoadFromStream added in v0.1.46

func LoadFromStream(r io.Reader) (a *Authenticator, err error)

func New added in v0.1.46

func New(config Config) (a *Authenticator, err error)

func (*Authenticator) AddPermission added in v0.1.46

func (a *Authenticator) AddPermission(cred auth.Credentials, domain string) (err error)

func (*Authenticator) Close added in v0.1.46

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

func (*Authenticator) Load added in v0.1.46

func (a *Authenticator) Load(config Config) (err error)

func (*Authenticator) RemovePermission added in v0.1.46

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

func (*Authenticator) Save added in v0.1.46

func (a *Authenticator) Save() (Config, error)

func (*Authenticator) Shutdown added in v0.1.46

func (a *Authenticator) Shutdown(ctx context.Context) error

func (*Authenticator) VerifyPermissions added in v0.1.46

func (a *Authenticator) VerifyPermissions(cred auth.Credentials, domain string) (err error)

type Config added in v0.0.64

type Config struct {
	Permissions PermissionTable
}

type PermissionTable

type PermissionTable map[string]UserTable

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