3 Commits (71f00ffdfd4921cc84c65bca6c27cc3cf1324d02)

Author SHA1 Message Date
veypi 3ea5499532 refactor(auth): Migrate to new vigo auth.Auth and Provider pattern
- Rename appAuth to vbaseProvider implementing auth.Provider interface
    - Replace auth.VBaseAuth with cfg.Auth (auth.Auth struct) for middleware
    - Add global cfg.Auth instance with SetProvider injection in init.go
    - Update all API handlers to use cfg.Auth.RequireXxx instead of PermXxx
    - Update tests to use cfg.Auth for permission checks
    - Remove Login/Perm methods from Provider (now in auth.Auth struct)
2 months ago
veypi 12c55a2997 refactor(api): Update permission codes and remove org-related code
- Update API endpoints to use scoped permission codes (e.g., role:*)
    - Fix role list scope parameter to use pointer type
    - Add Options type alias in init.go for external use
    - Remove org-related cache functions from libs/cache
2 months ago
veypi 23c7f6cb7a refactor(auth): 重构认证系统,支持多种验证方式和 OAuth 提供商管理
- 新增验证模块(api/verification),统一处理短信和邮件验证码发送
    - 新增邮件发送功能(libs/email),支持 SMTP 协议
    - 重构短信模块(libs/sms),简化阿里云和腾讯云短信接口
    - 新增 OAuth 提供商管理 API(api/oauth/providers),支持 CRUD 操作
    - 新增系统设置管理 API(api/settings),支持动态配置更新
    - 重构认证方式管理(api/auth/methods),支持启用/禁用多种登录方式
    - 删除旧的 sms_providers 和 sms API 模块,迁移至新验证体系
    - 新增数据库模型:verification、email、oauth_provider、oauth_templates、setting
    - 更新配置文档,增加新功能的使用说明
2 months ago