JSPM

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

Token generated by concatenating username and password with `:` character within a base64 encoded string.

Package Exports

  • basic-auth-token

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-auth-token) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

basic-auth-token

Token generated by concatenating username and password with : character within a base64 encoded string.

Build Status Code Climate js-standard-style

npm install basic-auth-token --save
npm stats

npm NPM downloads Dependency Status

Example

var token = require('basic-auth-token');
token("Aladdin", "open sesame")
//=> QWxhZGRpbjpvcGVuIHNlc2FtZQ==

API

token(user, pass)

arguments
  • user: (String) username.
  • pass: (String) password.
returns
  • (String) token.

Reference

Notes

If you want the full RFC2617 authorization header value, check out basic-authorization-header.

Licenses

GitHub license