replace static secrets with enviroment variables

This commit is contained in:
Adrian Zürcher
2025-11-12 11:05:04 +01:00
parent f8e7b01a28
commit 14968bfd4c
3 changed files with 15 additions and 3 deletions

View File

@@ -1,10 +1,15 @@
package AccessHandler
import (
"os"
"gitea.tecamino.com/paadi/access-handler/handlers"
"gitea.tecamino.com/paadi/tecamino-logger/logging"
)
func NewAccessHandler(path string, logger *logging.Logger) (aH *handlers.AccessHandler, err error) {
logger.Debug("NewAccessHandler", "get enviroment variables")
handlers.ACCESS_SECRET = []byte(os.Getenv("ACCESS_SECRET"))
handlers.REFRESH_SECRET = []byte(os.Getenv("REFRESH_SECRET"))
return handlers.NewAccessHandler(path, logger)
}