# abacus-cfoauth

> Simplify getting OAuth token using client credentials

Latest version **0.0.3** (published 2015-11-07) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install abacus-cfoauth
pnpm add abacus-cfoauth
yarn add abacus-cfoauth
bun add abacus-cfoauth
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-11-07 |
| First published | 2015-08-31 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | jsdelfino |
| Keywords | cf, abacus |

## Links

- npm: https://www.npmjs.com/package/abacus-cfoauth
- Repository: https://github.com/piotrprzybylski/cf-abacus
- Issues: https://github.com/piotrprzybylski/cf-abacus/issues
- npm.io page: https://npm.io/package/abacus-cfoauth

## Dependencies (5)

- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [abacus-debug](https://npm.io/package/abacus-debug.md) ^0.0.3
- [abacus-retry](https://npm.io/package/abacus-retry.md) ^0.0.3
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^5.0.5
- [abacus-request](https://npm.io/package/abacus-request.md) ^0.0.3

## Recent versions

- 0.0.3 (latest) — 2015-11-07
- 0.0.2 — 2015-10-31
- 0.0.2-rc.2 — 2015-10-23
- 0.0.2-rc.1 — 2015-10-17
- 0.0.2-rc.0 — 2015-10-16
- 0.0.1-dev.3 — 2015-08-31

## README

OAuth helper module for abacus
===
A simple wrapper to retrieve CF OAuth token, provides two functions
 
* tokenEndpoint - retrieve token endpoint host from the CF API host
* newToken - retrieve new OAuth token from the token endpoint. The returned token is augmented with 
expiry property storing storing time (milliseconds) when the token will expire

Supports the following environment variables

* API_HOST_NAME - Cloud Foundry api host
* TOKEN_ENDPOINT - URL to get tokens (can be looked up using API_HOST_NAME)
* CLIENT_ID - client credentials
* CLIENT_SECRET - client credentials

Trying the module
---
* cd lib/utils/cfoauth/
* npm install
* npm run babel
* npm test

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