load reva gateway and token manager from common config

This commit is contained in:
Willy Kloucek
2022-04-27 13:58:59 +02:00
parent 48a6978e24
commit 9095b11d6c
86 changed files with 1209 additions and 250 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ type Config struct {
HTTP HTTP `yaml:"http,omitempty"`
Reva Reva `yaml:"reva,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Spaces Spaces `yaml:"spaces,omitempty"`
@@ -20,7 +20,7 @@ func DefaultConfig() *config.Config {
Service: config.Service{
Name: "graph",
},
Reva: config.Reva{
Reva: &config.Reva{
Address: "127.0.0.1:9142",
},
Spaces: config.Spaces{
@@ -91,7 +91,7 @@ func EnsureDefaults(cfg *config.Config) {
cfg.TokenManager = &config.TokenManager{
JWTSecret: cfg.Commons.TokenManager.JWTSecret,
}
} else {
} else if cfg.TokenManager == nil {
cfg.TokenManager = &config.TokenManager{}
}
}
+1 -1
View File
@@ -59,7 +59,7 @@ func NewService(opts ...Option) Service {
switch options.Config.Identity.Backend {
case "cs3":
backend = &identity.CS3{
Config: &options.Config.Reva,
Config: options.Config.Reva,
Logger: &options.Logger,
}
case "ldap":