func New(opts ...MiddlewareOption) *Middleware {
	defaults := &options{
		userProperty:  "user",
		signingMethod: jwt.SigningMethodHS256,
		errorHandler:  onError,
		extractor:     BearerExtractor,
	}
	for _, w := range opts {
		w(defaults)
	}
	return &Middleware{options: defaults}
}
// New creates an instance of the jwt middleware
New creates an instance of the jwt middleware
// New creates an instance of the jwt middleware
func New(opts ...MiddlewareOption) *Middleware {
	defaults := &options{
		userProperty:  "user",
		signingMethod: jwt.SigningMethodHS256,
		errorHandler:  onError,
		extractor:     BearerExtractor,
	}
	for _, w := range opts {
		w(defaults)
	}
	return &Middleware{options: defaults}
}
func New ( opts ... MiddlewareOption ) * Middleware { defaults := & options { userProperty : " " , signingMethod : jwt . SigningMethodHS256 , errorHandler : onError , extractor : BearerExtractor , } for _ , w := range opts { w ( defaults ) } return & Middleware { options : defaults } }
New creates an instance of the jwt middleware
New creates an instance of the jwt middleware