authenticators

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthenticator

func RegisterAuthenticator(name string, initializerFunc InitializerFunc)

RegisterAuthenticator add a authenticator to the registry

Types

type Authenticator

type Authenticator interface {
	// Authenticate checks given credentials
	Authenticate(username, password string) bool
	// GetTenantID returns the ID for the X-Scope-OrgID
	GetTenantID(username string) string
}

Authenticator performs authentication

func GetAuthenticator

func GetAuthenticator(name string, config map[string]string) (Authenticator, error)

GetAuthenticator returns a authenticator by name

type InitializerFunc

type InitializerFunc func(map[string]string) (Authenticator, error)

InitializerFunc is a function to create a new authenticator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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