request

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AnySubject = "*"

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	// Authorize checks if with the given token the request is allowed.
	// If the access is not allowed, a PermissionDenied Error is returned with a proper error message.
	// req is only fully populated after a interceptor call.
	Authorize(ctx context.Context, token *apiv2.Token, req connect.AnyRequest) error
	// TokenPermissions returns the permissions based on the given token
	TokenPermissions(ctx context.Context, token *apiv2.Token) (tokenPermissions, error)
}

Authorizer provides methods to authorize requests with a given token

func NewAuthorizer

func NewAuthorizer(log *slog.Logger, patg projectsAndTenantsGetter) Authorizer

Jump to

Keyboard shortcuts

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