@exponential/developer-utils
v1.1.4
Published
This package contains some utility functions for use by API developers of app.datacloud.sh
Downloads
18
Readme
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) => {
})