Implement email/password auth with JWT sessions and API key auth for sandbox lifecycle. Users get a default team on signup; sandboxes, snapshots, and API keys are scoped to teams. - Add user, team, users_teams, and team_api_keys tables (goose migrations) - Add JWT middleware (Bearer token) for user management endpoints - Add API key middleware (X-API-Key header, SHA-256 hashed) for sandbox ops - Add signup/login handlers with transactional user+team creation - Add API key CRUD endpoints (create/list/delete) - Replace owner_id with team_id on sandboxes and templates - Update all handlers to use team-scoped queries - Add godotenv for .env file loading - Update OpenAPI spec and test UI with auth flows
27 lines
797 B
Modula-2
27 lines
797 B
Modula-2
module git.omukk.dev/wrenn/sandbox
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
connectrpc.com/connect v1.19.1
|
|
github.com/go-chi/chi/v5 v5.2.5
|
|
github.com/golang-jwt/jwt/v5 v5.3.1
|
|
github.com/google/uuid v1.6.0
|
|
github.com/gorilla/websocket v1.5.3
|
|
github.com/jackc/pgx/v5 v5.8.0
|
|
github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5
|
|
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f
|
|
golang.org/x/crypto v0.49.0
|
|
golang.org/x/sys v0.42.0
|
|
google.golang.org/protobuf v1.36.11
|
|
)
|
|
|
|
require (
|
|
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
|
|
github.com/joho/godotenv v1.5.1 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/text v0.35.0 // indirect
|
|
)
|