Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wejs/we-plugin-passport-jwt
JWT authentication strategy plugin for We.js
https://github.com/wejs/we-plugin-passport-jwt
passport-jwt wejs
Last synced: about 1 month ago
JSON representation
JWT authentication strategy plugin for We.js
- Host: GitHub
- URL: https://github.com/wejs/we-plugin-passport-jwt
- Owner: wejs
- Created: 2016-06-03T19:45:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-13T13:55:30.000Z (about 7 years ago)
- Last Synced: 2024-11-08T11:56:03.563Z (about 2 months ago)
- Topics: passport-jwt, wejs
- Language: JavaScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# we-plugin-passport-jwt
[![npm version](https://badge.fury.io/js/we-plugin-passport-jwt.svg)](https://badge.fury.io/js/we-plugin-passport-jwt) [![Build Status](https://travis-ci.org/wejs/we-plugin-passport-jwt.svg?branch=master)](https://travis-ci.org/wejs/we-plugin-passport-jwt) [![Coverage Status](https://coveralls.io/repos/github/wejs/we-plugin-passport-jwt/badge.svg?branch=master)](https://coveralls.io/github/wejs/we-plugin-passport-jwt?branch=master)
JWT authentication strategy plugin for We.js build with jsonwebtoken and passport-jwt
## Installation
```sh
we i we-plugin-passport-jwt
```## Configuration
Documentation about configuration:
See:
- https://www.npmjs.com/package/passport-jwt
- https://www.npmjs.com/package/jsonwebtoken```js
// ---
passport: {
strategies: {
// session
jwt: {
secretOrKey: null, // REQUIRED!
// optional configs:
algorithm: 'HS256',
audience: null, // will be set after load all plugins
issuer: 'wejs.org',
//jwtid: undefined,
//subject: undefined,
//noTimestamp: undefined,
//header: undefined,
expiresIn: 10080, // in secondssession: false,
}
}
},
// ---```
## routes:
### Authenticate and get token:
**post /auth/jwt/authenticate**
Post **email** and **password** to /auth/jwt/authenticate.
## Links
- We.js site: http://wejs.org
## NPM Info:
[![NPM](https://nodei.co/npm/we-plugin-passport-jwt.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/we-plugin-passport-jwt/)
## License
Under [the MIT license](https://github.com/wejs/we-core/blob/master/LICENSE.md).