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 shortcuts for defining authentication in a recipe #117

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

LucasPickering
Copy link
Owner

For now only Basic and Bearer auth are supported, but more can be added later. Closes #110

For now only Basic and Bearer auth are supported, but more can be added later. Closes #110
@LucasPickering LucasPickering merged commit dfc04c0 into master Mar 17, 2024
10 checks passed
@LucasPickering LucasPickering deleted the auth-shortcut branch March 17, 2024 17:34
@snaggen
Copy link

snaggen commented Mar 18, 2024

I couldn't get this to work
I have

  rest_call:
    method: GET
    ignore_certificate_hosts: ["www.host.com", "1.2.3.4"]
    authorization: !basic
      username: "{{username}}"
      password: "{{password}}"
    url: "{{base_url}}/rest/call/path"

But I still get a 401 back

@snaggen
Copy link

snaggen commented Mar 18, 2024

Looking at tcpdump I cannot see an Authorization header

@LucasPickering
Copy link
Owner Author

@snaggen This feature isn't released yet, just merged to master

@snaggen
Copy link

snaggen commented Mar 18, 2024

Well, I was compiling and testing master

@LucasPickering
Copy link
Owner Author

@snaggen The field is authentication, not authorization

@snaggen
Copy link

snaggen commented Mar 18, 2024

Ahh... I was just taking the snippet from the linked issue....
Now I get the header, but it is wrong:
authorization: YABpdXjiKpsrlcjp2OE4zQnlMhMWno
should be
authorization: Basic YABpdXjiKpsrlcjp2OE4zQnlMhMWno

@LucasPickering
Copy link
Owner Author

Oops! Thank you for testing, I did this in a hurry and got sloppy. I'm in the process of writing tests for this because I forgot to in the original MR, I'll try to get it fixed today.

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

Successfully merging this pull request may close these issues.

Add more convenient way to set authorization
2 participants