provider

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: Apache-2.0 Imports: 3 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	Login(context context.Context, authData map[string]interface{}) (string, map[string]interface{}, error)
	Logout(context context.Context, authData map[string]interface{}) (map[string]interface{}, error)
	Info(context context.Context, authData map[string]interface{}) (map[string]interface{}, error)
}

AuthProvider is an interface to provide user authentication.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry contains registered providers, which provide additional functionality implemented by plugins.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new Registry.

func (*Registry) GetAuthProvider

func (r *Registry) GetAuthProvider(name string) (AuthProvider, error)

GetAuthProvider gets an AuthProvider from the registry.

func (*Registry) RegisterAuthProvider

func (r *Registry) RegisterAuthProvider(name string, p AuthProvider)

RegisterAuthProvider registers an AuthProvider with the registry.

Jump to

Keyboard shortcuts

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