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.
This commit is contained in:
18
CHANGELOG.md
18
CHANGELOG.md
@@ -5,6 +5,24 @@ All notable changes to this module will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.0.0] - 2026-05-08
|
||||
|
||||
### Changed
|
||||
|
||||
- Package renamed from `httpauth` to `httpauthfirebase` — follows ecosystem convention
|
||||
(`repo name = package name`, hyphens removed); import path is unchanged
|
||||
(`code.nochebuena.dev/go/httpauth-firebase`); remove any alias previously used to
|
||||
disambiguate from `code.nochebuena.dev/go/httpauth`
|
||||
- `EnrichmentMiddleware`, `AuthzMiddleware`, `IdentityEnricher`, `PermissionProvider`,
|
||||
`WithTenantHeader`, and `EnrichOpt` removed; they now live in
|
||||
`code.nochebuena.dev/go/httpauth` (provider-agnostic middleware layer)
|
||||
- `AuthMiddleware` updated to call `httpauth.SetTokenData` — fulfills the integration
|
||||
contract between provider-specific auth and generic middleware
|
||||
- Dependency `code.nochebuena.dev/go/httpauth` bumped to v1.0.0
|
||||
- Dependency `code.nochebuena.dev/go/rbac` bumped to v1.0.0 (indirect)
|
||||
|
||||
[1.0.0]: https://code.nochebuena.dev/go/httpauth-firebase/releases/tag/v1.0.0
|
||||
|
||||
## [0.9.0] - 2026-03-18
|
||||
|
||||
### Added
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package httpauth_test
|
||||
package httpauthfirebase_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"firebase.google.com/go/v4/auth"
|
||||
|
||||
httpauth "code.nochebuena.dev/go/httpauth-firebase"
|
||||
httpauthfirebase "code.nochebuena.dev/go/httpauth-firebase"
|
||||
)
|
||||
|
||||
type mockVerifier struct{}
|
||||
@@ -15,4 +15,4 @@ func (m *mockVerifier) VerifyIDTokenAndCheckRevoked(_ context.Context, _ string)
|
||||
}
|
||||
|
||||
// Compile-time interface satisfaction check.
|
||||
var _ httpauth.TokenVerifier = (*mockVerifier)(nil)
|
||||
var _ httpauthfirebase.TokenVerifier = (*mockVerifier)(nil)
|
||||
|
||||
6
doc.go
6
doc.go
@@ -1,4 +1,4 @@
|
||||
// Package httpauth provides Firebase-backed HTTP authentication middleware.
|
||||
// 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).
|
||||
@@ -9,10 +9,10 @@
|
||||
//
|
||||
// import httpauthmw "code.nochebuena.dev/go/httpauth"
|
||||
//
|
||||
// r.Use(httpauth.AuthMiddleware(firebaseClient, publicPaths))
|
||||
// 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 httpauth
|
||||
package httpauthfirebase
|
||||
|
||||
4
go.mod
4
go.mod
@@ -3,14 +3,14 @@ module code.nochebuena.dev/go/httpauth-firebase
|
||||
go 1.25
|
||||
|
||||
require (
|
||||
code.nochebuena.dev/go/httpauth v0.1.0
|
||||
code.nochebuena.dev/go/httpauth v1.0.0
|
||||
firebase.google.com/go/v4 v4.15.0
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute v1.24.0 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
code.nochebuena.dev/go/rbac v0.9.0 // indirect
|
||||
code.nochebuena.dev/go/rbac v1.0.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
|
||||
8
go.sum
8
go.sum
@@ -3,10 +3,10 @@ cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1Yl
|
||||
cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40=
|
||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||
code.nochebuena.dev/go/httpauth v0.1.0 h1:86xldderCDBvBIvOYgbTg54C00nl1A1OaYVrTHL3BTY=
|
||||
code.nochebuena.dev/go/httpauth v0.1.0/go.mod h1:DzvGBZVo9npBa1llB+sWL9lOcqaltRMmvh/eGXm+3jQ=
|
||||
code.nochebuena.dev/go/rbac v0.9.0 h1:2fQngWIOeluIaMmo+H2ajT0NVw8GjNFJVi6pbdB3f/o=
|
||||
code.nochebuena.dev/go/rbac v0.9.0/go.mod h1:LzW8tTJmdbu6HHN26NZZ3HzzdlZAd1sp6aml25Cfz5c=
|
||||
code.nochebuena.dev/go/httpauth v1.0.0 h1:B2ypnlL7yQkePHC3EKo4LPgJbd5lWZ6RuA1o6sx84so=
|
||||
code.nochebuena.dev/go/httpauth v1.0.0/go.mod h1:rGaQDInGkavpk8nbiG7azPqcyYsrwo0+E+ZNocRW2MY=
|
||||
code.nochebuena.dev/go/rbac v1.0.0 h1:FnsU1HU6vvwchKuZNxDa9RPIFeNwJi0vShWvHKABMws=
|
||||
code.nochebuena.dev/go/rbac v1.0.0/go.mod h1:LzW8tTJmdbu6HHN26NZZ3HzzdlZAd1sp6aml25Cfz5c=
|
||||
firebase.google.com/go/v4 v4.15.0 h1:k27M+cHbyN1YpBI2Cf4NSjeHnnYRB9ldXwpqA5KikN0=
|
||||
firebase.google.com/go/v4 v4.15.0/go.mod h1:S/4MJqVZn1robtXkHhpRUbwOC4gdYtgsiMMJQ4x+xmQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package httpauth
|
||||
package httpauthfirebase
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
Reference in New Issue
Block a user