feat: openid login

This commit is contained in:
zzw
2026-09-02 17:37:12 +08:00
parent 540f74f9b7
commit bb14f9e324
38 changed files with 1627 additions and 1091 deletions
+16 -7
View File
@@ -4,19 +4,28 @@ import (
"lone-services/pkg/utils"
"lone-services/services/user/internal/config"
"github.com/zeromicro/go-zero/core/logx"
"gorm.io/gorm"
)
type ServiceContext struct {
Config config.Config
DB *gorm.DB
Prefix string
Config config.Config
DB *gorm.DB
Prefix string
JWT *config.JWTAuth
SaleSvcName string
}
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
func NewServiceContext(c config.Config, db *gorm.DB, jwtAuth *config.JWTAuth) *ServiceContext {
saleSvc := utils.GetConfigString("services.sale")
if saleSvc == utils.StringEmpty {
logx.Error("config services.sale empty")
}
return &ServiceContext{
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
JWT: jwtAuth,
SaleSvcName: saleSvc,
}
}