mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
Create packages/shared-go/authutil/ with two JWT validator implementations: - JWKSValidator: EdDSA JWKS validation with key caching (extracted from mana-sync) - RemoteValidator: delegates to mana-core-auth /api/v1/auth/validate (from mana-notify/gateway) Plus shared types (Claims, User), middleware factories (JWTMiddleware, ServiceKeyMiddleware), context helpers (GetUser, GetUserID, GetUserRole), and token extraction. Migrated services: - mana-sync: internal/auth/jwt.go now wraps authutil.JWKSValidator - mana-notify: internal/auth/auth.go now wraps authutil.RemoteValidator + ServiceKeyMiddleware - mana-api-gateway: internal/middleware/jwt.go now wraps authutil.RemoteValidator All 3 services compile and pass tests. Service-level packages re-export types for backward compatibility so no consumer code changes are needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
24 lines
755 B
Modula-2
24 lines
755 B
Modula-2
module github.com/manacore/mana-api-gateway
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/jackc/pgx/v5 v5.9.1
|
|
github.com/manacore/shared-go v0.0.0
|
|
github.com/redis/go-redis/v9 v9.18.0
|
|
github.com/rs/cors v1.11.1
|
|
)
|
|
|
|
require (
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
|
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
|
|
github.com/jackc/pgpassfile v1.0.0 // indirect
|
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
|
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
|
go.uber.org/atomic v1.11.0 // indirect
|
|
golang.org/x/sync v0.17.0 // indirect
|
|
golang.org/x/text v0.29.0 // indirect
|
|
)
|
|
|
|
replace github.com/manacore/shared-go => ../../packages/shared-go
|