feat #43: add cli command to manage backends

This commit is contained in:
Melora Hugues 2023-10-29 13:31:52 +01:00
parent 550622e512
commit 69a07ce076
9 changed files with 288 additions and 5 deletions

View file

@ -66,6 +66,7 @@ const (
defaultStorageSSLCaFile = ""
)
// Deprecated: remove when we finally drop the JSON config
type BackendConfig struct {
Config *oidc.Config `json:"config"`
Name string `json:"name"`
@ -145,6 +146,10 @@ func (ac *AppConfig) getConfFromEnv() {
ac.StorageConfig.Ssl.Mode = getStringFromEnv(varStorageSSLMode, defaultStorageSSLMode)
}
func (ac *AppConfig) RedirectURI() string {
return ac.OpenConnectConfig.Issuer + "/callback"
}
func New(filepath string) (*AppConfig, error) {
var conf AppConfig
conf.StorageConfig = &StorageConfig{}