refactor authentication (#1951)
* refactor authentication * refactor authentication
This commit is contained in:
@@ -78,7 +78,7 @@ type Config struct {
|
||||
// Options below are only loaded from configuration file, no command line flags for these options now.
|
||||
KubeSphereOptions *kubesphere.Options `json:"-" yaml:"kubesphere,omitempty" mapstructure:"kubesphere"`
|
||||
|
||||
AuthenticateOptions *iam.AuthenticationOptions `json:"authenticate,omitempty" yaml:"authenticate,omitempty" mapstructure:"authenticate"`
|
||||
AuthenticateOptions *iam.AuthenticationOptions `json:"authentication,omitempty" yaml:"authenticate,omitempty" mapstructure:"authenticate"`
|
||||
|
||||
// Options used for enabling components, not actually used now. Once we switch Alerting/Notification API to kubesphere,
|
||||
// we can add these options to kubesphere command lines
|
||||
@@ -194,7 +194,7 @@ func (conf *Config) stripEmptyOptions() {
|
||||
conf.MySQLOptions = nil
|
||||
}
|
||||
|
||||
if conf.RedisOptions != nil && conf.RedisOptions.RedisURL == "" {
|
||||
if conf.RedisOptions != nil && conf.RedisOptions.Host == "" {
|
||||
conf.RedisOptions = nil
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,10 @@ func newTestConfig() *Config {
|
||||
GroupSearchBase: "ou=Groups,dc=example,dc=org",
|
||||
},
|
||||
RedisOptions: &cache.Options{
|
||||
RedisURL: "redis://:qwerty@localhost:6379/1",
|
||||
Host: "localhost:6379",
|
||||
Port: 6379,
|
||||
Password: "P@88w0rd",
|
||||
DB: 0,
|
||||
},
|
||||
S3Options: &s3.Options{
|
||||
Endpoint: "http://minio.openpitrix-system.svc",
|
||||
|
||||
Reference in New Issue
Block a user