auth against a db
JavaScript
Switch branches/tags
Clone or download
Pull request Compare This branch is 4 commits ahead of travis4all:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
README.md
autheremin.js
package.json

README.md

autheremin

Sets up user authentication in a database in a pretty safe way. Now with bcrypt!

Usage

I'm thinking usage along these lines:

// db must provide get, set, and del methods
var db = require('./db')
var autheremin = require('autheremin')(db)

var username = 'antigone'
var password = '7xqJ3b8n'

autheremin.create(username, password, function(err) {
  if (err) throw err
  // username/password combination was created successfully
})

autheremin.verify(username, password, function(err) {
  if (err) throw err
  // username/password combination was verified against the database
})

autheremin.delete(username, function(err) {
  if(err) throw err
  // record with that username deleted from the database
})