Passport strategy for authenticating with custom logic.
This module lets you authenticate using custom logic in your Node.js applications. It is based on passport-local module by Jared Hanson. By plugging into Passport, custom authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.
$ npm install passport-custom
The custom authentication strategy authenticates users by custom logic of your choosing.
The strategy requires a
verify callback, which is where the custom logic goes and calls
done providing a user. Note that, req is always passed as the first parameter to the
Here is the pseudo code:
;const CustomStrategy = passportCustomStrategy;passport;
And a basic example:
passport.authenticate(), specifying the
'custom' strategy (or whatever you named the strategy upon registration), to
For example, as route middleware in an Express application:
$ npm install $ npm test
Copyright (c) 2014-2015 Mike Bell