egg-aix-authorization

1.2.1 • Public • Published

egg-aix-authorization

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-aix-authorization --save

Usage

// {app_root}/config/plugin.js
exports.authorization = {
  enable: true,
  package: 'egg-aix-authorization',
};

Configuration

// {app_root}/config/config.default.js
exports.authorization = {
  gatewayCompatible: true, // 兼容玉符网关
  smartProxyCompatible: true, // 兼容SmartProxy
  jwtCookieName: 'aix-jwt-sso', // jwt cookie name
  clientSecret: 'xxx',
  errorCode: 30000,
  errorMessage: 'user not login',
  ignorePaths: [ '/api/auth/login', '/api/auth/login-callback', '/api/auth/logout' ], // 不校验登录态的路径
};

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT

Package Sidebar

Install

npm i egg-aix-authorization

Weekly Downloads

12

Version

1.2.1

License

MIT

Unpacked Size

10.6 kB

Total Files

7

Last publish

Collaborators

  • g_gadmin