# litespeed-jwt

> A fast and easy JWT authentication and creation plugin for Litespeed

Latest version **0.1.2** (published 2016-07-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install litespeed-jwt
pnpm add litespeed-jwt
yarn add litespeed-jwt
bun add litespeed-jwt
```

## 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.1.2 |
| Published | 2016-07-12 |
| First published | 2016-07-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Tanner Linsley |
| Maintainers | jsonmaur, tannerlinsley |

## Links

- npm: https://www.npmjs.com/package/litespeed-jwt
- npm.io page: https://npm.io/package/litespeed-jwt

## Dependencies (1)

- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^7.0.1

## Recent versions

- 0.1.2 (latest) — 2016-07-12
- 0.1.1 — 2016-07-12
- 0.1.0 — 2016-07-11

## README

# litespeed-jwt

A fast and easy JWT authentication and creation plugin for Litespeed

## Installation

```
$ npm install litespeed-jwt
```

## Usage

```javascript
import jwt from 'litespeed-jwt'

// Initiate a new jwt instance with a config
const auth = jwt({
  secret: 'mysecretkey' // Required! Never share or commit your secret key to source control!
  // see other options at https://github.com/auth0/node-jsonwebtoken#jwtsignpayload-secretorprivatekey-options-callback
})

// To authenticate a route:
const myRoute = {
  method: 'GET',
  url: '/endpoint',
  preHandlers: [auth.check]
  handler: (req) => {
    ...
  }
})

// To create a new jwt:
const newJWT = auth.sign(payload)

```

## Contribution

All PR's and contributions are welcome!

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