合并
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"fusenapi/fsm"
|
||||
"fusenapi/server/auth/internal/config"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/autoconfig"
|
||||
"net/http"
|
||||
|
||||
@@ -21,6 +22,8 @@ type ServiceContext struct {
|
||||
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
|
||||
TokenManger *auth.ConfirmationLink[auth.RegisterToken]
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
@@ -32,6 +35,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
MysqlConn: conn,
|
||||
SharedState: StateServer,
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
TokenManger: auth.NewConfirmationLink[auth.RegisterToken]([]byte(c.Auth.AccessSecret), "http://localhost:9900/api/auth/oauth2/register"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user