This article is about how to do authentication with node express.
Add packages to your project
Create Auth module
Create an Auth.js module.
If your service is deployed on cloud with envoy proxy, the DigestStrategy return 400 BadRequest, you have to customize the digest.js of passport-http library.
Put the following code to digest.js url checking part to deal with envoy proxy problem.
Use auth strategy on API
Request API from client side
If client side is node.js, use request library to do api request.
Bad request on digest authentication (User: false)