// Package httpauth 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(httpauth.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 httpauth