basic-authorization-header

RFC2617 basic authorization header from username and password.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
basic-authorization-header
0.2.77 years ago7 years agoMinified + gzip package size for basic-authorization-header in KB

Readme

basic-authorization-header
RFC2617 basic authorization header from username and password.

Build Status Code Climate js-standard-style
npm install basic-authorization-header --save
npm stats
npm NPM downloads Dependency Status

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
.

Licenses

GitHub license()