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
Click to show internal directories.
Click to hide internal directories.