0.0.3 • Published 8 years ago

@bibocreation/buildingauth v0.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

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
});