Setup jwt signing key

This commit is contained in:
2024-11-01 17:04:08 +01:00
parent 34868c53eb
commit 46eeb18a31
4 changed files with 108 additions and 16 deletions

View File

@@ -16,6 +16,7 @@ type Config struct {
AdminEmail string
AdminPassword string
EncryptionKey string
JWTSigningKey string
}
func DefaultConfig() *Config {
@@ -69,6 +70,7 @@ func Load() (*Config, error) {
config.AdminEmail = os.Getenv("NOVAMD_ADMIN_EMAIL")
config.AdminPassword = os.Getenv("NOVAMD_ADMIN_PASSWORD")
config.EncryptionKey = os.Getenv("NOVAMD_ENCRYPTION_KEY")
config.JWTSigningKey = os.Getenv("NOVAMD_JWT_SIGNING_KEY")
// Validate all settings
if err := config.Validate(); err != nil {