auth

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnauthorized  = errorString("unauthorized")
	ErrUnknownDomain = errorString("unknown domain")
	ErrUnknownUser   = errorString("unknown user")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator added in v0.0.38

type Authenticator interface {
	io.Closer
	Shutdown(ctx context.Context) error
	VerifyPermissions(cred Credentials, domain string) (err error)
}

func LoadFromDecoder added in v0.1.46

func LoadFromDecoder(dec Decoder) (a Authenticator, err error)

func LoadFromFile added in v0.1.46

func LoadFromFile(path string) (c Authenticator, err error)

func LoadFromStream added in v0.1.46

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

type Credentials added in v0.1.46

type Credentials struct {
	Username string
	Password string
}

type Decoder added in v0.1.46

type Decoder interface {
	Decode(v interface{}) error
}

type Encoder added in v0.1.46

type Encoder interface {
	Encode(v interface{}) error
}

type Loader added in v0.1.46

type Loader func(dec Decoder) (Authenticator, error)

type Type added in v0.0.64

type Type string

func (Type) LoadFromDecoder added in v0.1.46

func (u Type) LoadFromDecoder(dec Decoder) (a Authenticator, err error)

func (Type) LoadFromFile added in v0.1.46

func (u Type) LoadFromFile(path string) (c Authenticator, err error)

func (Type) LoadFromStream added in v0.1.46

func (u Type) LoadFromStream(r io.Reader) (c Authenticator, err error)

func (Type) Register added in v0.0.64

func (t Type) Register(loader Loader)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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