3.4 KiB
3.4 KiB
Changelog
6.0.0
Potentially breaking change:
- change
logoutsignature from(options, callback) => voidto(options) => Promise<void>#188
5.0.0
- upgrade
passportto 0.6
4.1.4
- add
ipto the Koactxdelegates #157
4.1.3
- add
settoreqto imporve compatibility with more passport strategies #128
4.1.1
- add
protocolto the Koactxdelegates #121
4.1.0
- add
restoreq#114 - add
send()method toreq#114
4.0.1
- add
paramstoreq#110
4.0.0
- upgrade
passportto 0.4 - add
ctxgetter toreq#89
3.0.0
- remove
ctx.passportand save state variables (like_passportanduser) inctx.stateinstead - prevent
passportfrom monkey patchinghttp.IncomingMessage - change arguments from custom authentication callbacks from
user, info, statustoerr, user, info, status(erradded) to be consistent with passport - add support for
assignPropertyoption (#86)
2.2.2
- remove
ctx.req.userdeprecation warning for now #66
2.2.1
- fix middleware to properly catch promise errors #63
2.2.0
- move
userintoctx.state - user in
ctx.req.useris deprecated and will removed eventually
2.1.0
- export KoaPassport as an alternative to the by default exported singleton
2.0.1
- use strict
2.0.0
- use promises rather than generators for
koa@2.xcompatibility - use some es6 features
1.3.0
- export KoaPassport as an alternative to the by default exported singleton
1.2.0
- upgrade
passportto^0.3.0
1.1.5
- fix to not throw if
req.useris already defined - upgrade dependencies
1.1.4
- add
statusargument to authentication callback
1.1.3
- make internal
reqmock less error-prone
1.1.2
- redirect
req.app.get('trust proxy')to Koa'sapp.proxy(#22)
1.1.1
- add
authInfoto request mock
1.1.0
Make the req mock to inherit from Koa's request object before adding delegates for Node's request and Koa's context to it. This makes custom properties/methods added to Koa's request available to passport and its authentication strategies.
1.0.1
- add
flashto thereqmock
1.0.0
Using ES6 Proxy currently breaks debugging (see #17). Until this is fixed, the Proxy approach got replace by delegating a whitelist of possible used properties/methods to either Node's request, Koa's context or Koa's request.
Note: There is nothing special about this being 1.0.0. The major version bump is just because the update could possible break something.
0.5.1
- re-add authenticated user to
req.user
0.5.0
- internal improvements (neither modify Node's request nor Koa's request object by mocking the
reqobject with a proxy that forwards reads to either Node's request object, Koa's request object or Koa's context) --harmony-proxieshas to enabled now
0.4.0
- Add support for custom authentication methods, e.g.:
public.post('/login', function*(next) {
var ctx = this
yield* passport.authenticate('local', function*(err, user, info) {
if (err) throw err
if (user === false) {
ctx.status = 401
ctx.body = { success: false }
} else {
yield ctx.login(user)
ctx.body = { success: true }
}
}).call(this, next)
})
0.3.2
- add generator function names for Koa debugging purposes
0.3.1
- make ctx.login() yieldable
0.3.0
- adapt recent Koa API changes
0.2.0
- `passport 0.2.x compatibility