authorizers

package
v0.6.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizerAllow  = "allow"
	AuthorizerDeny   = "deny"
	AuthorizerLocal  = "local"
	AuthorizerCEL    = "cel"
	AuthorizerRemote = "remote"
)

Variables

View Source
var (
	ErrUnsupportedAuthorizerType = errors.New("authorizer type unsupported")
)

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	Execute(heimdall.Context, *subject.Subject) error
	WithConfig(config map[string]any) (Authorizer, error)
}

func CreateAuthorizerPrototype

func CreateAuthorizerPrototype(id string, typ string, config map[string]any) (Authorizer, error)

type AuthorizerTypeFactory

type AuthorizerTypeFactory func(id string, typ string, config map[string]any) (bool, Authorizer, error)

type Expression

type Expression struct {
	Value   string `mapstructure:"expression"`
	Message string `mapstructure:"message"`
	// contains filtered or unexported fields
}

func (*Expression) Compile

func (e *Expression) Compile(env *cel.Env) error

func (*Expression) Eval

func (e *Expression) Eval(obj any) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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