mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-23 20:49:13 -05:00
move TokenManager back to extension config
This commit is contained in:
@@ -18,8 +18,8 @@ type Config struct {
|
||||
|
||||
HTTP HTTP `yaml:"http,omitempty"`
|
||||
|
||||
Reva Reva `yaml:"reva,omitempty"`
|
||||
TokenManager *shared.TokenManager `yaml:"token_manager,omitempty"`
|
||||
Reva Reva `yaml:"reva,omitempty"`
|
||||
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
|
||||
|
||||
Spaces Spaces `yaml:"spaces,omitempty"`
|
||||
Identity Identity `yaml:"identity,omitempty"`
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
)
|
||||
|
||||
func DefaultConfig() *config.Config {
|
||||
@@ -89,11 +88,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{}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,3 +4,8 @@ package config
|
||||
type Reva struct {
|
||||
Address string `yaml:"address" env:"REVA_GATEWAY"`
|
||||
}
|
||||
|
||||
// TokenManager is the config for using the reva token manager
|
||||
type TokenManager struct {
|
||||
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;GRAPH_JWT_SECRET"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user