loginrule

package
v1.3.3-0...-f31c912 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvaluationInput

type EvaluationInput struct {
	// Traits should be set to the external IDP-provided traits (for SSO users)
	// or the internal static traits (for local users) which will be input to
	// the login rule evaluation.
	Traits map[string][]string
}

EvaluationInput holds the inputs to a login rule evaluation.

type EvaluationOutput

type EvaluationOutput struct {
	// Traits holds the final output traits.
	Traits map[string][]string
	// AppliedRules holds a list of names of rules that were applied.
	AppliedRules []string
}

EvaluationOutput holds the output of a login rule evaluation.

type Evaluator

type Evaluator interface {
	Evaluate(context.Context, *EvaluationInput) (*EvaluationOutput, error)
}

Evaluator can be used to evaluate login rules currently present in the backend with given inputs.

type NullEvaluator

type NullEvaluator struct{}

NullEvaluator is an Evaluator implementation which makes no changes to the input and is meant to be used when login rules are not enabled in the cluster.

func (NullEvaluator) Evaluate

Evaluate returns the input traits unmodified.

Jump to

Keyboard shortcuts

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