From fe352d815ac281fdc0723799ade18ee55dd7167c Mon Sep 17 00:00:00 2001 From: lik Date: Thu, 7 Jan 2021 16:40:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201.3.6,=20ctx=E5=A2=9E=E5=8A=A0authToken?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth/index.js | 2 ++ auth/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/index.js b/auth/index.js index f0264d6..56d7ecc 100644 --- a/auth/index.js +++ b/auth/index.js @@ -122,6 +122,8 @@ AuthToken.prototype.koaRequest = async function (ctx, next) { return; } + ctx.authToken = this; + return next(); }; diff --git a/auth/package.json b/auth/package.json index aedca5c..b04bf30 100644 --- a/auth/package.json +++ b/auth/package.json @@ -1,6 +1,6 @@ { "name": "@ehason/auth", - "version": "1.3.5", + "version": "1.3.6", "description": "User auth lib", "main": "index.js", "scripts": {