Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Support Basic Auth #7

Open
alexking opened this issue Apr 20, 2018 · 5 comments · May be fixed by #8
Open

Support Basic Auth #7

alexking opened this issue Apr 20, 2018 · 5 comments · May be fixed by #8

Comments

@alexking
Copy link

The got http library doesn't support authentication in URLs such as user:[email protected], so there's currently no way to use gateways with basic auth in front of them.

Looks like this was raised as an issue on the old repository austinfrey#5 - and PR #6 does add basic auth, but was never merged, and seems to be against an old version.

Would it be better to –

  1. Add a second constructor argument allowing you to add got options so you can call new OpenFaas(gateway, { auth: "user:pass" }) and any requests will then merge that in before sending
  2. Base it on the design in PR Refactor into ES6 class, add more tests and update docs #6 which allowed you to pass either a URL, a URL and options, or just options with a gateway parameter (it's described well here). Could extract that part of the PR into a new one
@developius
Copy link

Thanks for the reminder @alexking!

I think @austinfrey was going to look at PR #6 but didn't get time. I'm happy to bring that PR up-to-date if it's out of sync with master so it can be merged. Glad you think my docs are good 😄

@alexellis
Copy link
Member

@austinfrey is not maintaining the repo anymore.

I'm OK with us switching to the more common requests module and then taking the data in as suggested. @alexking if you want to do this work please put together a PR and send it in.

@developius
Copy link

Switching to request should not be necessary as got supports all the same features (AFAIK) and is also considerably smaller in size - from the got repo:

Created because request is bloated (several megabytes!).

@alexking
Copy link
Author

Ok - yeah I'm happy to work on this but also don't want to reinvent the wheel if @developius is planning to rebase their PR.

@alexellis
Copy link
Member

This whole repo could do with an overhaul since it's no longer maintained by the original author. I'd say go ahead and and see if you can make it useful.

@alexking alexking linked a pull request May 1, 2018 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants