JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3474
  • Score
    100M100P100Q166501F
  • License MIT

RFC2617 basic authorization header from username and password.

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.

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