basic-auth-token
v0.4.2
Published
Token generated by concatenating username and password with `:` character within a base64 encoded string.
Downloads
40,934
Maintainers
Readme
basic-auth-token
Token generated by concatenating username and password with
:
character within a base64 encoded string.
npm install basic-auth-token --save
npm stats
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.