# player-sdk-secure

> VCPayer secure sdk for nodejs

Latest version **1.0.9** (published 2018-01-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install player-sdk-secure
pnpm add player-sdk-secure
yarn add player-sdk-secure
bun add player-sdk-secure
```

## 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.9 |
| Published | 2018-01-26 |
| First published | 2017-11-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | loipv792@gmail.com |
| Maintainers | loipv92 |
| Keywords | player, secure |

## Links

- npm: https://www.npmjs.com/package/player-sdk-secure
- npm.io page: https://npm.io/package/player-sdk-secure

## Dependencies (2)

- [base-64](https://npm.io/package/base-64.md) ^0.1.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.1.0

## Recent versions

- 1.0.9 (latest) — 2018-01-26
- 1.0.8 — 2018-01-10
- 1.0.7 — 2017-12-05
- 1.0.6 — 2017-11-14
- 1.0.5 — 2017-11-14
- 1.0.4 — 2017-11-14
- 1.0.3 — 2017-11-13
- 1.0.2 — 2017-11-11

## README

# Player sdk secure

## Install sdk

> npm install player-sdk-secure

## Use sdk

```javascript
const SecureSDK = require('player-sdk-secure');

// Init sdk
const appkey = 'appkey'; // Provided by SohaTV
const secretkey = 'secretkey'; // Provided by SohaTV
const playerId = 'pid'; // Provided by SohaTV
const secure = new SecureSDK(appkey, secretkey, playerId);

// If you validate request headers
let reqHeaders = {}; // is request headers to your backend
secure.setHeaders(reqHeaders);

// Default token expired in 120s, if you want change token lifetime
secure.setExpiresIn(7*24*3600); // 7 days

// Or generate token no expired
secure.setIgnoreExpiration(true);

// Get secure token
const sToken = secure.getSecureToken();
```

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