This package has been deprecated

Author message:

Deprecated

egg-wxtoken

1.0.1 • Public • Published

egg-wxtoken

Extends the ctx object. Used to fetch the wechat access token and js ticket from the wxtoken server.

It will manage cache in local until the token is expired.

egg-jwt is required to pass the authorization of wxtoken server.

Installation

npm link is recommanded.

$ git clone git@github.com:brickyang/egg-wxtoken.git
$ cd path/to/project
$ npm link path/to/egg-wxtoken

Usage

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

Configuration

// {app_root}/config/config.default.js
exports.wxtoken = {
  host: 'http://localhost:8000'
};

exports.jwt = {
  signatures: {
    wxtoken: {
      secret: 'secret of wxtoken server',
      aud: 'wxtoken',
    }
  }
}

Package Sidebar

Install

npm i egg-wxtoken

Weekly Downloads

0

Version

1.0.1

License

none

Last publish

Collaborators

  • npm