move TokenManager back to extension config
This commit is contained in:
@@ -23,8 +23,8 @@ type Config struct {
|
||||
DataPath string `yaml:"data_path,omitempty" env:"SETTINGS_DATA_PATH"`
|
||||
Metadata Metadata `yaml:"metadata_config,omitempty"`
|
||||
|
||||
Asset Asset `yaml:"asset,omitempty"`
|
||||
TokenManager *shared.TokenManager `yaml:"token_manager,omitempty"`
|
||||
Asset Asset `yaml:"asset,omitempty"`
|
||||
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/owncloud/ocis/extensions/settings/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
)
|
||||
|
||||
func FullDefaultConfig() *config.Config {
|
||||
@@ -87,11 +86,11 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
}
|
||||
|
||||
if cfg.TokenManager == nil && cfg.Commons != nil && cfg.Commons.TokenManager != nil {
|
||||
cfg.TokenManager = &shared.TokenManager{
|
||||
cfg.TokenManager = &config.TokenManager{
|
||||
JWTSecret: cfg.Commons.TokenManager.JWTSecret,
|
||||
}
|
||||
} else {
|
||||
cfg.TokenManager = &shared.TokenManager{}
|
||||
cfg.TokenManager = &config.TokenManager{}
|
||||
}
|
||||
|
||||
if cfg.Metadata.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" {
|
||||
|
||||
Reference in New Issue
Block a user