Commit be53f6ca by geekaddiction

updated readme

parent cec297ce
Showing with 41 additions and 3 deletions
passport-imap
=============
# Passport-Imap
IMAP Authentication Strategy for Passport.js
[Passport](http://passportjs.org/) strategy for authenticating with imap
This module serves the purpose of authenticating a user using email login credentials in Node.js/Sails.js application.
This can be unobtrusively integrated with any Node.js application using passport for authentication
## Install
$ npm install passport-imap
## Usage
#### Configure Strategy
The imap authentication strategy authenticates users using imap login information. The strategy requires some options like imap host name, port and tls
passport.use(new ImapStrategy({host: 'imap.gmail.com', port : 993, tls : true}));
#### Authenticate Requests
Use `passport.authenticate()`, specifying the `'imap'` strategy, to
authenticate requests.
For example, as route middleware in an [Express](http://expressjs.com/)
application:
app.post('/login',
passport.authenticate('imap', { failureRedirect: '/login' }),
function(req, res) {
res.redirect('/');
});
## Credits
- [GeekTantra](http://github.com/geektantra)
## License
Copyright (c) [NetTantra Technologies](http://nettantra.com/)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment