# keystok

> Keystok Client

Latest version **1.0.2** (published 2014-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install keystok
pnpm add keystok
yarn add keystok
bun add keystok
```

Provides the command `keystok-cli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2014-05-19 |
| First published | 2014-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Kenneth Falck |
| Maintainers | kennu |
| Keywords | keystok, client |

## Links

- npm: https://www.npmjs.com/package/keystok
- Repository: git@bitbucket.org:keystok/keystok-client-node
- npm.io page: https://npm.io/package/keystok

## Dependencies (1)

- [request](https://npm.io/package/request.md) 2.33.x

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2014-05-19
- 1.0.1 — 2014-05-19
- 1.0.0 — 2014-04-14

## README

# Keystok Node.js Client Library

This library is used to access your Keystok keys from your Node.js applications.

## Installation

    npm install keystok

## Retrieving a single key

    var keystok = require('keystok')('accesstoken');
    keystok.get('keyid', function(err, key) {
        console.log('key:', key);
    });

## Retrieving multiple keys

    var keystok = require('keystok')('accesstoken');
    keystok.get(['keyid1', 'keyid2', 'keyid3'], function(err, keys) {
        console.log('keys:', keys);
    });

## Retrieving all keys

    var keystok = require('keystok')('accesstoken');
    keystok.getAll(function(err, keys) {
        console.log('keys:', keys);
    });

## Options

When creating the Keystok client library object, you can specify either
an access token string or an options object. The options object can
specify these options (all except accessToken have default values):

    var keystok = require('keystok')({
        accessToken: 'accesstoken',
        apiHost: 'api.keystok.com',
        timeout: 5000,
        cache: true,
        cacheDir: '/tmp/keystok'
    });

To use the default options, just use this:

    var keystok = require('keystok')('accesstoken');

Note: The cacheDir option actually defaults to os.tmpdir() instead of '/tmp'.

---
_Source: https://npm.io/package/keystok · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
