authorizers

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 31 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 {
	ID() string
	Execute(ctx heimdall.Context, sub *subject.Subject) error
	WithConfig(config map[string]any) (Authorizer, error)
	ContinueOnError() bool
}

func CreatePrototype

func CreatePrototype(ctx CreationContext, id string, typ string, config map[string]any) (Authorizer, error)

type CreationContext

type CreationContext interface {
	Watcher() watcher.Watcher
	KeyHolderRegistry() keyholder.Registry
	CertificateObserver() certificate.Observer
}

type Expression

type Expression struct {
	Value   string `mapstructure:"expression" validate:"required"`
	Message string `mapstructure:"message"`
}

type TypeFactory

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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