koajs / userauth

koa user auth middleware
MIT License
137 stars 18 forks source link

请添加当前执行环境的this到match函数中 #8

Closed lichenhao closed 9 years ago

lichenhao commented 9 years ago

RT, 因为简单的path判断并不能满足复杂的处理逻辑。需要获取当前执行环境帮助判断。

https://github.com/koajs/userauth/blob/master/index.js#l132

var loginRequired = !!needLogin.call(this,this.path);

dead-horse commented 9 years ago

koa-userauth@1.2.0