basic-authorization-header
v0.2.7
Published
RFC2617 basic authorization header from username and password.
Downloads
28,959
Maintainers
Readme
basic-authorization-header
RFC2617 basic authorization header from username and password.
npm install basic-authorization-header --save
npm stats
Example
var basic = require('basic-authorization-header');
var headers = {
'Authorization': basic("Aladdin", "open sesame"),
};
//=> { Authorization: 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' }
API
basic(user, pass)
arguments
user: (String)
username.pass: (String)
password.
returns
(String)
basic authorization header value.
Reference
Notes
If you just want the token, check out basic-auth-token.