provider

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	Login(authData map[string]interface{}) (string, map[string]interface{}, error)
	Logout(authData map[string]interface{}) (map[string]interface{}, error)
	Info(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