testauth

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSessionToken

func GetSessionToken(sessionID string, token string) (map[string]string, bool)

func InstallSessionToken

func InstallSessionToken(sessionID string, token string, namespace, name, uid string)

func ResetSession

func ResetSession(sessionID string)

func StartSession

func StartSession() string

Types

type Config

type Config struct {
	SessionID string // unique identifier for this set of tokens in the database
	// contains filtered or unexported fields
}

type Validator

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

func (*Validator) AvailableFields

func (v *Validator) AvailableFields() []string

func (*Validator) MakeFieldMapSelectable

func (v *Validator) MakeFieldMapSelectable(fieldMap map[string]string) interface{}

MakeFieldMapSelectable converts a field map as returned by ValidateLogin into a structure suitable for selection with a binding rule.

func (*Validator) Name

func (v *Validator) Name() string

func (*Validator) ValidateLogin

func (v *Validator) ValidateLogin(loginToken string) (map[string]string, *structs.EnterpriseMeta, error)

ValidateLogin takes raw user-provided auth method metadata and ensures it is sane, provably correct, and currently valid. Relevant identifying data is extracted and returned for immediate use by the role binding process.

Depending upon the method, it may make sense to use these calls to continue to extend the life of the underlying token.

Returns auth method specific metadata suitable for the Role Binding process.

Jump to

Keyboard shortcuts

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