package business

import (
	"github.com/golang-jwt/jwt/v5"
)

var (
	key []byte
	t   *jwt.Token
	s   string
	err error
)

func GenToken() (string, error) {
	key = []byte("jwtsecret")
	t = jwt.New(jwt.SigningMethodHS256)
	s, err = t.SignedString(key)
	if err != nil {
		return "", err
	}
	return s, nil
}
