@futurspace/apicontrol-js
v0.0.2
Published
This library provides a JS integration to Compend APIControl, which provides API key management. This is intended to be run on a node server that needs to talk to another node service with authentication.
Downloads
1
Readme
Compend APIControl
This library provides a JS integration to Compend APIControl, which provides API key management. This is intended to be run on a node server that needs to talk to another node service with authentication.
Example
// Create the client; this only has to be done once
const client = new ApiControlClient({
id: "ba929f30-c825-4b59-bd20-e9926825ee3a",
secret: "dff67697-2bf4-455b-bd03-387fcef50877"
}, true);
// ...
// Get the token, which can be added to an HTTP request header
const token = await client.getToken();