func (m *Middleware) Handler(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		token, err := m.parseToken(r)
		if err != nil {
			m.options.errorHandler(w, r, err)
			return
		}
		h.ServeHTTP(w, setTokenToContext(r, m.options.userProperty, token))
	})
}
// Handler standard handler to check the incoming jwt token
Handler standard handler to check the incoming jwt token
// Handler standard handler to check the incoming jwt token
func (m *Middleware) Handler(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		token, err := m.parseToken(r)
		if err != nil {
			m.options.errorHandler(w, r, err)
			return
		}
		h.ServeHTTP(w, setTokenToContext(r, m.options.userProperty, token))
	})
}
func ( m * Middleware ) Handler ( h http . Handler ) http . Handler { return http . HandlerFunc ( func ( w http . ResponseWriter , r * http . Request ) { token , err := m . parseToken ( r ) if err != nil { m . options . errorHandler ( w , r , err ) return } h . ServeHTTP ( w , setTokenToContext ( r , m . options . userProperty , token ) ) } ) }
Handler standard handler to check the incoming jwt token
Handler standard handler to check the incoming jwt token