Commit Graph

15 Commits (3913640f5b12f749011cf06ac7dc2e1d2346a19c)

Author SHA1 Message Date
veypi 4c021e7e93 refactor(auth): Migrate token delivery to HttpOnly Cookie with version-based revocation
- Replace JWT in response body with HttpOnly Cookie (vb_access/vb_refresh) to prevent XSS token theft
    - Add Redis-based token version management with ±1 tolerance for multi-tab concurrent refresh
    - Implement strict refresh token rotation: version must match exactly, increment on each refresh
    - Simplify JWT Claims to only carry UserID + Type + Version, remove user profile fields
    - Remove session-based token tracking and cache blacklist in favor of version increment revocation
    - Remove getAuthHeaders, wrapAxios, wrapFetch, isExpired from frontend VBase client
    - Remove client-side token/localStorage management, frontend now relies on Cookie auto-attach
    - Add CookiePath config option and change default access token expiry from 24h to 15min
    - Update Vigo app initialization to use functional options pattern
    - Add empty-body cookie read fallback in refresh endpoint
3 weeks ago
veypi ec47bcc192 refactor: Migrate auth to Vigo auth interface and simplify initialization
- Replace GetUserID/GetOrgID with VBaseAuth.UserID/OrgID methods across all APIs
- Integrate vigoauth.Auth interface into appAuth for standard auth methods
- Move AuthMiddleware to PermLogin method in auth package
- Add role management methods: GetRole, ListRoles, GrantRoles, RevokeRoles, ListUserRoles
- Update ListUserPermissions and ListResourceUsers to return vigoauth types
- Export Redis client in cfg package
- Simplify app initialization by separating vigo.New in cli/main.go
- Remove deprecated auth/middleware.go file
4 months ago
veypi df0f7f047a refactor: Rename Config to Global and simplify app initialization
- Rename cfg.Config to cfg.Global for consistency
    - Simplify cli/main.go to use vbase.App.Run() pattern
    - Update init.go to create app with vigo.New and Init function
    - Update all references from cfg.Config to cfg.Global across api, libs, models, and tests
    - Fix VBase constructor parameter order in ui/vbase.js
    - Update ui/env.js to use new VBase('vb', '/') initialization
4 months ago
veypi 4a57017067 refactor(cfg): Restructure database configuration and initialization flow
- Replace separate DB/DSN fields with unified config.Database struct
    - Remove cfg/db.go and move DB client to config.Database.Client()
    - Update auth to use event-driven initialization via vb.init.auth event
    - Refactor models initialization to use event system (vb.init.settings/oauth/admin)
    - Update CLI to use event.Start() instead of manual InitDB() call
    - Fix auth_test.go to use new DB config structure
    - Update agents.md documentation with new CLI flags format
4 months ago
veypi 8fa01c4c52 upgrade 4 months ago
veypi 89a2ea17e2 fix upgrade bug 4 months ago
veypi 6d0ec8e6ba rename to vbase 4 months ago
veypi 1880a6ce0f update router params 4 months ago
veypi 67b92662d1 add sms enable option 6 months ago
veypi 95eccc2cde update 10 months ago
veypi 69b4b7c504 change vyes-ai 10 months ago
veypi 959e390126 feat: change to vigo 11 months ago
veypi d472464d8a update 1 year ago
veypi 0e8ef78957 update cli 1 year ago
veypi 5112f1ab7d change to new version 1 year ago