fix: portal using new endpoints#671
Merged
alexluong merged 2 commits intorefactor-authfrom Feb 2, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
alexluong
added a commit
that referenced
this pull request
Feb 2, 2026
* fix: return 401 for malformed bearer token + add expired JWT tests
ErrInvalidBearerToken now returns 401 instead of 400 — a malformed
bearer token is an authentication failure, not a bad request.
Add expired JWT tests for Extract, TenantJWTAuthMiddleware, and
APIKeyOrTenantJWTAuthMiddleware.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: introduce AuthMode + TenantScoped, flatten route list
Replace AuthScope/RouteMode with simpler AuthMode enum and TenantScoped
bool. Flatten 5 route slices into 2 (nonTenantRoutes + tenantRoutes)
with portal routes conditionally appended. Auto-apply
RequireTenantMiddleware via TenantScoped instead of manual Middlewares
arrays. Define narrow TenantRetriever interface to decouple middleware
from full TenantStore. Change mustTenantFromContext to panic on missing
tenant (programming bug, not user error).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: update handlers to use mustTenantFromContext
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: remove dead code — ErrTenantIDNotFound, SetTenantIDMiddleware, mustTenantIDFromContext
- Remove 3 dead symbols from auth_middleware.go
- Remove TestSetTenantIDMiddleware from auth_middleware_test.go
- RequireTenantMiddleware reads c.Param("tenantID") instead of c.Get
- Remove SetTenantIDMiddleware() from router global middleware
- Upsert handler uses c.Param("tenantID") directly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: gofmt
* refactor: rename AuthTenant -> AuthAuthenticated
* chore: rename AuthenticatedMiddleware
* refactor: simplify auth context between apikey & jwt
* test: remove old test files
* refactor: simplify router deps
* test: apirouter test setup
* test: tenant handlers
* test: destination handlers
* test: log handlers
* test: resource parent & authz
* fix: validate destination ownership in RetrieveAttempt
* test: comprehensive list & pagination tests
* test: list tenant not supported
* test: publish & retry api tests
* fix: consistent validation handling
* fix: clean up dead code and nil-check inconsistency in apirouter
* test: add missing apirouter test coverage for auth, tokens, portal, and destination types
* refactor: consolidate middleware into unified AuthMiddleware
* chore: rename path names to snake_case
* test: tenant metadata conversion
* test: clean up e2e tests
* test: comprehensive e2e suite
* test: topic matching
* chore: gofmt
* test: move e2e tests into apirouter
* fix: attempt response schema
* chore: upgrade Dockerfiles to Go 1.24
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: openapi.yaml
* fix: portal using new endpoints (#671)
* fix: use new endpoint structure
* fix: destination attempt queries
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.