package authorizer

import "github.com/open-policy-agent/opa/server/authorizer"

Package authorizer provides authorization handlers to the server.

Index

Functions

func Decision

func Decision(ref func() ast.Ref) func(*Basic)

Decision returns an argument that sets the path of the authorization decision to query.

func NewBasic

func NewBasic(inner http.Handler, compiler func() *ast.Compiler, store storage.Store, opts ...func(*Basic)) http.Handler

NewBasic returns a new Basic object.

func Runtime

func Runtime(term *ast.Term) func(*Basic)

Runtime returns an argument that sets the runtime on the authorizer.

Types

type Basic

type Basic struct {
	// contains filtered or unexported fields
}

Basic provides policy-based authorization over incoming requests.

func (*Basic) ServeHTTP

func (h *Basic) ServeHTTP(w http.ResponseWriter, r *http.Request)

Source Files

authorizer.go

Version
v0.10.2
Published
Dec 10, 2018
Platform
js/wasm
Imports
9 packages
Last checked
2 minutes ago

Tools for package owners.