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
Click to show internal directories.
Click to hide internal directories.