noop

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package noop provides a no-op Authorizer that always permits all requests. Useful for testing or services that do not require authorization enforcement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() authz.Authorizer

New returns a NoopAuthorizer that always permits requests.

Types

type Authorizer

type Authorizer struct{}

Authorizer is a no-op implementation that always returns allowed=true.

func (*Authorizer) BatchCheck added in v0.4.0

func (a *Authorizer) BatchCheck(_ context.Context, reqs []authz.CheckRequest) ([]authz.CheckResult, error)

BatchCheck returns all-allowed results matching the input length. Empty input returns (nil, nil), consistent with infra/openfga.Client.BatchCheck.

func (*Authorizer) Check added in v0.4.0

func (a *Authorizer) Check(_ context.Context, _, _, _, _ string) (bool, error)

Check always returns (true, nil).

func (*Authorizer) ListAllowed added in v0.4.0

func (a *Authorizer) ListAllowed(_ context.Context, _, _, _ string) ([]string, error)

ListAllowed returns nil — the noop authorizer has no resource model. Callers needing real listing must use a real backend.

Jump to

Keyboard shortcuts

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