func NewJWT(claims jwt.MapClaims, signingKey string, signingMethod ...jwt.SigningMethod) (string, error) {
	var sm jwt.SigningMethod = jwt.SigningMethodHS256
	if len(signingMethod) > 0 {
		sm = signingMethod[0]
	}
	return jwt.NewWithClaims(sm, claims).SignedString([]byte(signingKey))
}
// NewJWT creates a new JWT token and returns it as a signed string that may be sent to the client side.
// The signingMethod parameter is optional. It defaults to the HS256 algorithm.
NewJWT creates a new JWT token and returns it as a signed string that may be sent to the client side.
The signingMethod parameter is optional. It defaults to the HS256 algorithm.
// NewJWT creates a new JWT token and returns it as a signed string that may be sent to the client side . // The signingMethod parameter is optional . It defaults to the HS256 algorithm .
func NewJWT(claims jwt.MapClaims, signingKey string, signingMethod ...jwt.SigningMethod) (string, error) {
	var sm jwt.SigningMethod = jwt.SigningMethodHS256
	if len(signingMethod) > 0 {
		sm = signingMethod[0]
	}
	return jwt.NewWithClaims(sm, claims).SignedString([]byte(signingKey))
}
func NewJWT ( claims jwt . MapClaims , signingKey string , signingMethod ... jwt . SigningMethod ) ( string , error ) { var sm jwt . SigningMethod = jwt . SigningMethodHS256 if len ( signingMethod ) > 0 { sm = signingMethod [ 0 ] } return jwt . NewWithClaims ( sm , claims ) . SignedString ( [ ] byte ( signingKey ) ) }
NewJWT creates a new JWT token and returns it as a signed string that may be sent to the client side.
NewJWT creates a new JWT token and returns it as a signed string that may be sent to the client side .