Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

username/password not supported #6

Closed
srl295 opened this issue Apr 13, 2018 · 2 comments
Closed

username/password not supported #6

srl295 opened this issue Apr 13, 2018 · 2 comments

Comments

@srl295
Copy link
Contributor

srl295 commented Apr 13, 2018

looks like Basic auth could be supported with a dependency on https://www.npmjs.com/package/basic-authorization-header

@dwrss
Copy link

dwrss commented Apr 5, 2019

Why would you pull a dependency?

You'd just need to do something approximately like this:

const buildAuthHeader = (name, pass) => {
    const authString = `${name}:${pass}`
    return `Basic ${Buffer.from(authString).toString('base64')}`
}

Also, I presume you meant to refer to this? If so, that module is old enough that it triggers deprecation warnings on current versions of node due to the use of new Buffer().

@srl295
Copy link
Contributor Author

srl295 commented Apr 5, 2019

@dwrss true. no dep needed.

@srl295 srl295 closed this as completed Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants