BasicCredentials
v0.0.15
Published
Get user credentials from Basic Authentication method.
Downloads
4
Maintainers
Readme
#BasicCredentials
Get user credentials from Basic Authentication method.
##Installation
$ npm install BasicCredentials
##Usage
There are some examples.
######Get User :
var BasicCredentials = require('BasicCredentials');
var basic = new BasicCredentials(req);
basic.getUser(function(user){
console.log(user);
});
######Get Password:
var BasicCredentials = require('BasicCredentials');
var basic = new BasicCredentials(req);
basic.getPassword(function(password){
console.log(password);
});
######Get Basic Token:
var BasicCredentials = require('BasicCredentials');
var basic = new BasicCredentials(req);
basic.getToken(function(token){
console.log(token);
});