Files
httpauth-firebase/doc.go
Rene Nochebuena 34c5fa7ded fix(httpauth-firebase)!: rename package httpauthfirebase, bump httpauth and rbac to v1.0.0
Rename package from httpauth to httpauthfirebase to follow ecosystem convention
(repo name = package name, hyphens removed). Bump httpauth dependency from
v0.1.0 to v1.0.0 and rbac indirect dependency from v0.9.0 to v1.0.0.

BREAKING CHANGE: import path unchanged (code.nochebuena.dev/go/httpauth-firebase)
but package identifier changes from httpauth to httpauthfirebase — remove any
import alias previously used to disambiguate from code.nochebuena.dev/go/httpauth.
2026-05-07 23:46:59 -06:00

19 lines
872 B
Go

// Package httpauthfirebase provides Firebase-backed HTTP authentication middleware.
//
// AuthMiddleware verifies Firebase Bearer tokens and injects uid + claims into
// the request context via httpauth.SetTokenData (code.nochebuena.dev/go/httpauth).
// Downstream middleware (EnrichmentMiddleware, AuthzMiddleware) comes from that
// package and is provider-agnostic.
//
// Typical middleware chain:
//
// import httpauthmw "code.nochebuena.dev/go/httpauth"
//
// r.Use(httpauthfirebase.AuthMiddleware(firebaseClient, publicPaths))
// r.Use(httpauthmw.EnrichmentMiddleware(userEnricher, httpauthmw.WithTenantHeader("X-Tenant-ID")))
// r.With(httpauthmw.AuthzMiddleware(permProvider, "orders", rbac.Read)).Post("/orders", handler)
//
// AuthMiddleware accepts a TokenVerifier interface, so it can be tested without
// a live Firebase connection.
package httpauthfirebase