Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthFailure = errors.New("auth: Authentication failure") ErrAuthProviderNotFound = errors.New("auth: Authentication provider not found") )
Functions ¶
func Register ¶
func Register(name string, provider Authenticator)
func Unregister ¶
func Unregister(name string)
Types ¶
type AuthFunc ¶
type AuthFunc func(token string) (bool, *ClientInfo)
type Authenticator ¶
type Authenticator interface { Authenticate(token, userName string) (bool, *ClientInfo) SetAuthFunc(f AuthFunc) }
type ClientInfo ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Authenticate ¶
func (this *Manager) Authenticate(token, userName string) (bool, *ClientInfo)
func (*Manager) SetAuthFunc ¶
Click to show internal directories.
Click to hide internal directories.