auth

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoSuchBackend is to be returned when a backend is
	// requested that does not exist.
	ErrNoSuchBackend = errors.New("no backend with that name exists")

	// ErrUnauthenticated is returned when a user cannot be
	// positively authenticated by any backend.
	ErrUnauthenticated = errors.New("the specified user could not authenticate")
)

Functions

func DoCallbacks

func DoCallbacks()

DoCallbacks is used to invoke all callbacks and perform phase one setup which will register the handlers to the map of factories.

func Initialize

func Initialize(s string) (web.Auth, error)

Initialize attempts to initialize the given store and returns either a ready to use store or an error.

func RegisterCallback

func RegisterCallback(f func())

RegisterCallback provides a mechanism for early registration of a function to be called during initialization. This allows the actual factories to be registered later once config parsing has happened, logging is configured, and other early-init tasks are complete.

func RegisterFactory

func RegisterFactory(s string, f Factory)

RegisterFactory registers a factory to the list of available state stores that can be used.

func SetLogger

func SetLogger(l hclog.Logger)

SetLogger injects a logger into this package to allow setting up a logger tree.

Types

type Factory

type Factory func(hclog.Logger) (web.Auth, error)

A Factory creates a auth instance that can be served by the web package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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