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

Add example of how to add credentials to request to README #78

Open
2 tasks done
gertminov opened this issue Mar 28, 2022 · 1 comment
Open
2 tasks done

Add example of how to add credentials to request to README #78

gertminov opened this issue Mar 28, 2022 · 1 comment
Labels
good first issue Good for newcomers

Comments

@gertminov
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Add a simple example of how to add credentials to a request, to make it easier for beginners to use the plugin.

It's my first Issue so im sorry if i did something wrong

Motivation

it is unclear, where this plugin gets its the username and password from, if one is not familiar with how authorisation works

Example

How to add Credentials to request

The basic-auth plugin retrieves the credentials from the Authorization header.

        const credentials: string = Buffer.from("username:password").toString('base64')
       request.header("Authorisazion", "Basic " + credentials)
@Eomm
Copy link
Member

Eomm commented Mar 28, 2022

Would you like to send a Pull Request to address this issue? Remember to add unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants