auth

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthFailure = errors.New("auth: Authentication failure")
)

Auth errors

Functions

func Register

func Register(name string, provider Provider) error

Register auth provider

func UnRegister

func UnRegister(name string)

UnRegister authenticator

Types

type Manager

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

Manager auth

func NewManager

func NewManager(p string) (*Manager, error)

NewManager new auth manager

func (*Manager) AclCheck

func (m *Manager) AclCheck(clientID, user, topic string, access authTypes.AccessType) error

AclCheck check permissions nolint: golint

func (*Manager) Password

func (m *Manager) Password(user, password string) error

Password authentication

func (*Manager) PskKey

func (m *Manager) PskKey(hint, identity string, key []byte, maxKeyLen int) error

PskKey authenticate using psk nolint: golint

type Provider

type Provider interface {
	Password(user, password string) error
	AclCheck(clientID, user, topic string, access authTypes.AccessType) error
	PskKey(hint, identity string, key []byte, maxKeyLen int) error
}

Provider interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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