Documentation
¶
Overview ¶
Package authhttp provides the legacy net/http authorization adapter.
Deprecated: use github.com/faustbrian/go-authorization/v3/adapters/http. This package remains supported for the longer of 180 days after successor public availability and two subsequently published stable root-module minor releases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // WithDeniedHandler preserves the released option function identity; nil keeps default denial handling. WithDeniedHandler = httpauth.WithDeniedHandler // WithErrorHandler preserves the released option function identity; nil keeps default failure handling. WithErrorHandler = httpauth.WithErrorHandler )
Functions ¶
func DecisionFromContext ¶
func DecisionFromContext(ctx context.Context) (authorization.Decision, bool)
DecisionFromContext returns a decision by value with shared diagnostic slices.
func ErrorFromContext ¶
ErrorFromContext returns raw local failure state; callers own redaction before exposure.
func NewHandler ¶
func NewHandler( authorizer Authorizer, mapper RequestMapper, next http.Handler, options ...Option, ) (http.Handler, error)
NewHandler delegates to the released HTTP facade and direct fail-closed adapter.
Types ¶
type Authorizer ¶
type Authorizer = httpauth.Authorizer
Authorizer is the released httpauth.Authorizer alias; identity is preserved.
type RequestMapper ¶
type RequestMapper = httpauth.RequestMapper
RequestMapper maps trusted HTTP identity/scope/facts synchronously; authenticate upstream and do not trust client tenant/ownership claims.