Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1.13 KB

File metadata and controls

30 lines (19 loc) · 1.13 KB

utils


validateCredential

This method can be used to validate calls made from the Datacloud.sh server to the API. To use this, download this package and import validateCredential then use it as a middleware in api.

Installation:

npm install @exponential/developer-utils

Quick Start:

const { validateCredential } = require('@exponential/developer-utils');

app.get("/path-to-be-authenticated-1", validateCredential.bind(null, process.env.API_SECRET), async (req, res) => {

})

app.post("/path-to-be-authenticated-2", validateCredential.bind(null, process.env.API_SECRET), async (req, res) => {

})