v0.3.0-rc1 Latest Latest

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

Go to latest
Published: May 27, 2015 License: Apache-2.0 Imports: 5 Imported by: 0




This section is empty.


View Source
var (
	IllegalStateErr = errors.New("illegal mechanism state")


func ListSupported

func ListSupported() (list []string)

func Register

func Register(name string, f Factory) error


type Factory

type Factory func(h callback.Handler) (Interface, StepFunc, error)

return a mechanism and it's initialization step (may be a noop that returns a nil data blob and handle to the first "real" challenge step).

func SelectSupported

func SelectSupported(mechanisms []string) (selectedMech string, factory Factory)

type Interface

type Interface interface {
	Handler() callback.Handler
	Discard() // clean up resources or sensitive information; idempotent

type StepFunc

type StepFunc func(m Interface, data []byte) (StepFunc, []byte, error)

StepFunc implementations should never return a nil StepFunc result. This helps keep the logic in the SASL authticatee simpler: step functions are never nil. Mechanisms that end up an error state (for example, some decoding logic fails...) should return a StepFunc that represents an error state. Some mechanisms may be able to recover from such.

func IllegalState

func IllegalState(m Interface, data []byte) (StepFunc, []byte, error)

reflects an unrecoverable, illegal mechanism state; always returns IllegalState as the next step along with an IllegalStateErr


Path Synopsis

Jump to

Keyboard shortcuts

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