# mares-jwt

> express.js 미들웨어를 이용하여 jwt 암호화, 복호화를 해주는 모듈입니다.

Latest version **1.0.10** (published 2019-05-13) · ISC license · 0 weekly downloads

## Install

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

## 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.10 |
| Published | 2019-05-13 |
| First published | 2019-03-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | slogup |
| Maintainers | berlizz, hwaranglee, jessehj, piorio0919, sngsng, tifkshtmxm |
| Keywords | 슬로그업, slogup, jwt, mares |

## Links

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

## Dependencies (1)

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

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.0.10 (latest) — 2019-05-13
- 1.0.9 — 2019-03-19
- 1.0.8 — 2019-03-06
- 1.0.7 — 2019-03-05
- 1.0.6 — 2019-03-04
- 1.0.5 — 2019-03-04
- 1.0.4 — 2019-03-04
- 1.0.3 — 2019-03-04
- 1.0.2 — 2019-03-04
- 1.0.1 — 2019-03-04
- 1.0.0 — 2019-03-04

## README

# mares-jwt
슬로그업 ddd에서 presentaion layer 에서 jwt token 을 암호화,복호화 하는 모듈입니다.

## Installation
`npm install --save mares-jwt`

## Example
```javascript
//register middleware
const app = require('express')
const maresJwt = require('mares-jwt')

//토큰의 위치, 토큰 이름, 만료시간, 시크릿값
app.use(maresJwt.binder(location, 'tokenName', 'expiresIn', 'secret'))

const middle = (req, res , next) => {
	// 암호화
	const payload = {
		_id: 1
	}
	const token = req.sign(payload)
	
	// 복호화
	const decodeJwt = req.verify()
	next()
}
```

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