0.0.2 • Published 4 years ago

@futurspace/apicontrol-js v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

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();