Socket
Socket
Sign inDemoInstall

egg-wxtoken

Package Overview
Dependencies
22
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    egg-wxtoken

Fetch wechat access token & js tikect from central server.


Version published
Maintainers
1
Created

Readme

Source

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',
    }
  }
}

Keywords

FAQs

Last updated on 05 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc