Skip to content

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

License

Notifications You must be signed in to change notification settings

wilmoore/basic-auth-token.js

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published