Documentation
¶
Overview ¶
Package authz provides explicit, allowlist-style authorization decisions.
Policies return a Decision built with Allow or Deny. Handlers enforce a decision with Authorize, which writes the canonical 403 forbidden envelope on deny; services convert one into an error with Decision.Err. Deny reasons are internal: they are logged and wrapped as error causes, but never serialized into HTTP responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decision ¶
type Decision struct {
// Allowed store data used by this type.
Allowed bool
Reason string // internal; logged, never serialized
}
Decision is the outcome of a policy check. The zero value denies, so a forgotten rule fails closed.
Click to show internal directories.
Click to hide internal directories.