update library

This commit is contained in:
2025-05-15 14:33:40 +02:00
parent 2aa592252c
commit 155e7a4116
13 changed files with 218 additions and 260 deletions
+3 -3
View File
@@ -87,7 +87,7 @@ type Paseto struct {
Duration time.Duration
}
func New(config ...Config) *App {
func NewApp(config ...Config) *App {
cfg := Config{
Name: "",
Version: "",
@@ -157,7 +157,7 @@ func New(config ...Config) *App {
var err error
if os.Getenv("PASETO_ASYMMETRIC_KEY") != "" {
slog.Info("using paseto asymmetric key from env")
slog.Debug("using paseto asymmetric key from env")
ak, err = paseto.NewV4AsymmetricSecretKeyFromHex(os.Getenv("PASETO_ASYMMETRIC_KEY"))
if err != nil {
slog.Error("error creating asymmetric key", "error", err)
@@ -207,7 +207,7 @@ func New(config ...Config) *App {
)
if cfg.EnvMode != EnvironmentProduction {
slog.Info("paseto_assymetric_key", "key", cfg.Paseto.AsymmetricKey.ExportHex())
slog.Debug("paseto_assymetric_key", "key", cfg.Paseto.AsymmetricKey.ExportHex())
}
if cfg.CreateTemplates {