testauth

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MPL-2.0 Imports: 8 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
	Data      map[string]string `json:",omitempty"` // random data for testing
	// contains filtered or unexported fields
}

type Validator

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

func (*Validator) Name

func (v *Validator) Name() string

func (*Validator) NewIdentity

func (v *Validator) NewIdentity() *authmethod.Identity

func (*Validator) Stop

func (v *Validator) Stop()

func (*Validator) ValidateLogin

func (v *Validator) ValidateLogin(ctx context.Context, loginToken string) (*authmethod.Identity, error)

ValidateLogin takes raw user-provided auth method metadata and ensures it is reasonable, 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