Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-passport

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-passport - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

17

lib/framework/koa.js

@@ -13,8 +13,2 @@ /**

/**
* Passport's HTTP IncomingMessage extension names
*/
var requestExtensions = ['login', 'logIn', 'logout', 'logOut',
'isAuthenticated', 'isUnauthenticated']
/**
* Passport's initialization middleware for Koa.

@@ -35,5 +29,10 @@ *

var ctx = this
requestExtensions.forEach(function(method) {
ctx[method] = ctx.req[method].bind(ctx.req)
})
ctx.login = ctx.logIn = function(user, options) {
return function(done) {
ctx.req.login(user, options, done)
}
}
ctx.logout = ctx.logOut = ctx.req.logout.bind(ctx.req)
ctx.isAuthenticated = ctx.req.isAuthenticated.bind(ctx.req)
ctx.isUnauthenticated = ctx.req.isUnauthenticated.bind(ctx.req)

@@ -40,0 +39,0 @@ yield middleware.bind(middleware, this.req, this)

@@ -7,3 +7,3 @@ {

},
"version": "0.3.0",
"version": "0.3.1",
"description": "Passport middleware for Koa",

@@ -10,0 +10,0 @@ "keywords": [

# koa-passport
[![NPM](https://badge.fury.io/js/koa-passport.png)](https://npmjs.org/package/koa-passport)
[![Dependency Status](https://david-dm.org/rkusa/koa-passport.png?theme=shields.io)](https://david-dm.org/rkusa/koa-passport)
[![NPM](https://badge.fury.io/js/koa-passport.svg)](https://npmjs.org/package/koa-passport)
[![Dependency Status](https://david-dm.org/rkusa/koa-passport.svg?theme=shields.io)](https://david-dm.org/rkusa/koa-passport)

@@ -5,0 +5,0 @@ [Passport](https://github.com/jaredhanson/passport) middleware for Koa

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc