0.0.2 • Published 9 years ago

wx-auth v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

wx_auth

NPM Version NPM Downloads

A simple middleware used to auth weixin for connect or express. Optionally you need pass a token string to wxAuth().

Installation

$ npm install wx-auth

API

var connect = require("connect");
var wxAuth = require("wx-auth");
var app = connect();
var TOKEN = "af5a20925f71c2c1d5c3b25cf9d676e468336fbc";
app.use(wxAuth(TOKEN));

wxAuth(token)

  • token The token string you set in your weixin platform manage center.

Example

var express = require("express");
var wxAuth = require("wx-auth");
var app = express();
var TOKEN = "af5a20925f71c2c1d5c3b25cf9d676e468336fbc";
app.use(wxAuth(TOKEN));
app.get("/", function(req, res){
	res.end(req.query.echostr);
});

MIT Licensed

0.0.2

9 years ago

0.0.1

9 years ago