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

Support Basic Auth #7

@alexking

Description

@alexking

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions