diff pkg/config/config.go @ 5610:a826d84485c8 erdms2

Use token server to fetch token for ERDMS requests.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 31 Oct 2022 19:05:28 +0100
parents 1222b777f51f
children 2dd155cc95ec
line wrap: on
line diff
--- a/pkg/config/config.go	Mon Oct 31 17:51:54 2022 +0100
+++ b/pkg/config/config.go	Mon Oct 31 19:05:28 2022 +0100
@@ -132,6 +132,9 @@
 // LogLevel is the log level of the application.
 func LogLevel() log.Level { return log.ParseLogLevel(viper.GetString("log-level")) }
 
+// TokenURL is the ERDMS token service URL.
+func TokenURL() string { return viper.GetString("token-url") }
+
 var (
 	proxyKeyOnce       sync.Once
 	proxyKey           []byte
@@ -307,6 +310,7 @@
 	str("log-file", "", "path to a file to log to.")
 	str("log-level", log.InfoLogLevel.String(), "path to a file to log to.")
 
+	str("token-url", "", "URL to the ERDMS token server.")
 }
 
 var (