node package manager

@bibocreation/buildingauth

buildingauth - Authentication Service for building

A module with simple authentication services for devices

API

Add a user

var auth = require('buildingauth');
 
auth.addUser('marco','passwd','marco.brizi@gmail.com', function(err) {
  //do some stuff 
});

Get user info

var auth = require('buildingauth');
 
auth.getUserInfo('marco', function(err,user){
  //the user object like {username:'username',email:'e.mail@mail.com'} 
});

Authenticate

var auth = require('buildingauth');
 
auth.authenticate('marco','passwd',function(err, result){
  //result return true if user is authenticated 
});