egg-oauth-jwt
v1.7.7
Published
oauth-jwt
Downloads
18
Readme
egg-oauth-jwt
Install
$ npm i egg-oauth-jwt --save
Usage
// {app_root}/config/plugin.js
exports.oauthjwt = {
enable: true,
package: 'egg-oauth-jwt',
};
Configuration
// {app_root}/config/config.default.js
exports.oauthjwt = {
extend: 'oauth',
algorithm: 'RS256',
primaryKey: path.join(__dirname, "private.pem"),
publicKey: path.join(__dirname, 'public.pem'),
clientSide: false,
accessTokenLifeTime: 7200,
refreshTokenLifeTime: 864000,
authorizationCodeLifeTime: 120,
tokenType: 'Bearer'
};
see config/config.default.js for more detail.
Example
Questions & Suggestions
Please open an issue here.