Skip to content

Instantly share code, notes, and snippets.

@rschwabco
Created December 16, 2021 21:16
Show Gist options
  • Save rschwabco/80440f116028dd367aacb9f87ed98074 to your computer and use it in GitHub Desktop.
Save rschwabco/80440f116028dd367aacb9f87ed98074 to your computer and use it in GitHub Desktop.
//Protected API endpoint
app.get("/api/protected", checkJwt, checkAuthz, function (req, res) {
//send the response
res.json({ secret: "Very sensitive information presented here" });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment