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: 3 months 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 (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-13T13:55:30.000Z (over 7 years ago)
- Last Synced: 2025-02-26T22:05:43.187Z (3 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
[](https://badge.fury.io/js/we-plugin-passport-jwt) [](https://travis-ci.org/wejs/we-plugin-passport-jwt) [](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:
[](https://nodei.co/npm/we-plugin-passport-jwt/)
## License
Under [the MIT license](https://github.com/wejs/we-core/blob/master/LICENSE.md).