authzmiddleware

package
v0.0.0-...-fba144e Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSkippedSubjects

func WithSkippedSubjects(subjects ...string) skippedSubjects

Types

type AuthZMiddlewareOptioner

type AuthZMiddlewareOptioner interface {
	// contains filtered or unexported methods
}

func WithSkippedAuthZPaths

func WithSkippedAuthZPaths(paths []HttpPath, caseSensitive bool) AuthZMiddlewareOptioner

type AuthZMiddlewareOptions

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

type AuthzMiddleware

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

func NewAuthZMiddleware

func NewAuthZMiddleware(log logger.Logger, enforcer Enforcer, optioners ...AuthZMiddlewareOptioner) *AuthzMiddleware

func (*AuthzMiddleware) AuthFunc

func (a *AuthzMiddleware) AuthFunc(ctx context.Context) (context.Context, error)

type Enforcer

type Enforcer interface {
	// Enforce returns true if the $subject can perform $action on the $object
	Enforce(ctx context.Context, subject, object, action string) (bool, error)
}

type HttpPath

type HttpPath struct {
	RawPath   string
	RawMethod string
}

Jump to

Keyboard shortcuts

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