authorization

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONPatternMatching

type JSONPatternMatching struct {
	Conditions []JSONPatternMatchingRule `yaml:"conditions,omitempty"`
	Rules      []JSONPatternMatchingRule `yaml:"rules"`
}

func (*JSONPatternMatching) Call

func (jsonAuth *JSONPatternMatching) Call(pipeline common.AuthPipeline, ctx context.Context) (bool, error)

type JSONPatternMatchingRule

type JSONPatternMatchingRule struct {
	Selector string `yaml:"selector"`
	Operator string `yaml:"operator"`
	Value    string `yaml:"value"`
}

type OPA

type OPA struct {
	Rego string `yaml:"rego"`
	// contains filtered or unexported fields
}

func NewOPAAuthorization

func NewOPAAuthorization(policyName string, rego string, nonce int) *OPA

func (*OPA) Call

func (opa *OPA) Call(pipeline common.AuthPipeline, ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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