For LTI 1.0 certification testcases, how do we validate the consumer key in canvas as valid and invalid using node.js
This doesn't directly answer the question, but are you aware that LTI 1.0 has been deprecated and support for it will be removed at some point? What does the recent IMS LTI Deprecation and Security Update mean for Canvas users and integrations?
You may not want to certify anything as LTI 1.0 but work on implementing LTI 1.3 instead.
As far as the question, you would want to use a library that handled this for you. Here's a search of some LTI related modules from the NPM website. I do not have any experience using any of those and cannot give any recommendations.
Retrieving data ...