keyholder
v0.2.4
Published
Simple API key issuing and authentication
Downloads
22
Readme
Keyholder
A Node library to asynchronously test API keys generated by Keyholder. Before using this library, you should create a project.
Installation
$ npm i keyholder
Usage
Create a Keyholder
instance using your project ID and access key, and authenticate API keys using the test
method.
import Keyholder from 'keyholder';
const keyholder = new Keyholder({
projectId: 'YOUR_PROJECT_ID',
projectAccessKey: 'YOUR_PROJECT_ACCESS_KEY'
});
keyholder.test(apiKey).then(isValid => {
// turn away invalid keys
});