Package Exports
- basic-authorization-header
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (basic-authorization-header) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
basic-authorization-header
RFC2617 basic authorization header from username and password.
npm install basic-authorization-header --savenpm 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.