fix
This commit is contained in:
parent
368ce4a604
commit
59161ddab5
|
@ -29,14 +29,14 @@ type ServiceContext struct {
|
|||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
conn := initalize.InitMysql(c.SourceMysql)
|
||||
// StateServer := shared.StartNode(c.ReplicaId, autoconfig.AutoGetAllServerConfig(), conn)
|
||||
|
||||
registerAddress := fmt.Sprintf("http://%s/api/auth/oauth2/register", c.MainAddress)
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: conn,
|
||||
SharedState: nil,
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
RegisterTokenManger: auth.NewConfirmationLink[auth.RegisterToken](c.Auth.AccessSecret, "http://localhost:9900/api/auth/oauth2/register"),
|
||||
ResetTokenManger: auth.NewConfirmationLink[auth.ResetToken](c.Auth.AccessSecret, "http://localhost:9900/api/auth/oauth2/register"),
|
||||
RegisterTokenManger: auth.NewConfirmationLink[auth.RegisterToken](c.Auth.AccessSecret, registerAddress),
|
||||
ResetTokenManger: auth.NewConfirmationLink[auth.ResetToken](c.Auth.AccessSecret, registerAddress),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user