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 ¶
func (NullEvaluator) Evaluate(ctx context.Context, input *EvaluationInput) (*EvaluationOutput, error)
Evaluate returns the input traits unmodified.
Click to show internal directories.
Click to hide internal directories.