@@ -68,6 +68,7 @@ func (c AuthConfig) GetPepperBytes() ([]byte, error) {
|
||||
if len(decoded) < 32 {
|
||||
return nil, fmt.Errorf("decoded pepper must be at least 32 bytes long")
|
||||
}
|
||||
|
||||
return decoded, nil
|
||||
}
|
||||
|
||||
@@ -87,6 +88,7 @@ func (c AuthConfig) GetCookieSecretBytes() ([]byte, error) {
|
||||
if len(decoded) < 32 {
|
||||
return nil, fmt.Errorf("decoded cookie secret must be at least 32 bytes long")
|
||||
}
|
||||
|
||||
return decoded, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ func (c *Config) GetSlackSigningSecret() string {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -80,6 +81,7 @@ func (c *ConnectorConfig) UnmarshalJSON(data []byte) error {
|
||||
if err := json.NewDecoder(bytes.NewReader(tmp.Settings)).Decode(&settings); err != nil {
|
||||
return fmt.Errorf("cannot unmarshal settings: %w", err)
|
||||
}
|
||||
|
||||
c.Settings = settings
|
||||
}
|
||||
|
||||
|
||||
@@ -66,14 +66,18 @@ func (c *AgentsConfig) ResolveAgent(agent LLMAgentConfig) LLMAgentConfig {
|
||||
if agent.Provider == "" {
|
||||
agent.Provider = c.Default.Provider
|
||||
}
|
||||
|
||||
if agent.ModelName == "" {
|
||||
agent.ModelName = c.Default.ModelName
|
||||
}
|
||||
|
||||
if agent.Temperature == nil {
|
||||
agent.Temperature = c.Default.Temperature
|
||||
}
|
||||
|
||||
if agent.MaxTokens == nil {
|
||||
agent.MaxTokens = c.Default.MaxTokens
|
||||
}
|
||||
|
||||
return agent
|
||||
}
|
||||
|
||||
@@ -92,14 +92,17 @@ func (cfg PgConfig) Options(options ...pg.Option) []pg.Option {
|
||||
|
||||
if cfg.CACertBundle != "" {
|
||||
var certs []*x509.Certificate
|
||||
|
||||
pemData := []byte(cfg.CACertBundle)
|
||||
|
||||
for len(pemData) > 0 {
|
||||
var block *pem.Block
|
||||
|
||||
block, pemData = pem.Decode(pemData)
|
||||
if block == nil {
|
||||
break
|
||||
}
|
||||
|
||||
if block.Type != "CERTIFICATE" {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ func (c SAMLConfig) SessionDurationTime() time.Duration {
|
||||
if c.SessionDuration == 0 {
|
||||
return 7 * 24 * time.Hour
|
||||
}
|
||||
|
||||
return time.Duration(c.SessionDuration) * time.Second
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user