// New instantiates new JWT service
New instantiates new JWT service
// New instantiates new JWT service
func New(key string, duration int, algo string, sess SessionStorer) *JWT {
	signingMethod := jwt.GetSigningMethod(algo)
	if signingMethod == nil {
		panic("invalid signing method")
	}
	return &JWT{
		key:      []byte(key),
		duration: time.Duration(duration) * time.Minute,
		algo:     signingMethod,
		sess:     sess,
	}
}
func New ( key string , duration int , algo string , sess SessionStorer ) * JWT { signingMethod := jwt . GetSigningMethod ( algo ) if signingMethod == nil { panic ( " " ) } return & JWT { key : [ ] byte ( key ) , duration : time . Duration ( duration ) * time . Minute , algo : signingMethod , sess : sess , } }
New instantiates new JWT service
New instantiates new JWT service