Documentation
¶
Index ¶
Constants ¶
This section is empty.
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
// TokenMethods returns a slice of allowed methods based on the given token
TokenMethods(ctx context.Context, token *apiv2.Token) ([]string, error)
}
Authorizer provides methods to authorize requests with a given token
func NewAuthorizer ¶
func NewAuthorizer(log *slog.Logger, patg projectsAndTenantsGetter) Authorizer
Click to show internal directories.
Click to hide internal directories.