MCPcopy Create free account
hub / github.com/opencloud-eu/opencloud / Validate

Function Validate

services/auth-basic/pkg/config/parser/parse.go:36–46  ·  view source on GitHub ↗
(cfg *config.Config)

Source from the content-addressed store, hash-verified

34}
35
36func Validate(cfg *config.Config) error {
37 if cfg.TokenManager.JWTSecret == "" {
38 return shared.MissingJWTTokenError(cfg.Service.Name)
39 }
40
41 if cfg.AuthProviders.LDAP.BindPassword == "" && cfg.AuthProvider == "ldap" {
42 return shared.MissingLDAPBindPassword(cfg.Service.Name)
43 }
44
45 return nil
46}

Callers 1

ParseConfigFunction · 0.70

Calls 2

MissingJWTTokenErrorFunction · 0.92
MissingLDAPBindPasswordFunction · 0.92

Tested by

no test coverage detected