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
[Go] Allow to use custom middleware #7403
Conversation
Which cloud provider is that? There's an option to generate AWS v4 signature: |
Tests for this PR are currently pass. What can we do to move forward this PR? |
@kuskoman could you squash it? it will simplify the review process :) |
Prepare custom auth function template to be optional one Rename auth function to middleware Move middleware execution below operations with context Generate samples for go Modify new line characters in template not to affect default one Generate samples with modified template
@houqp I have notice that your recently changed files affted by this PR. Could you provide any comments and review for that PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems OK to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion it's ok.
Thanks for all the review. The PR has been merged. |
This is a PR in response to my issue #7390. I need a way to create a custom authentication method (which is specific to a single cloud provider), however current code seems to make modifications to auth methods pretty hard (at least I did not find a way to provide custom header with dynamic value).
In this PR I allowed to do pretty much everything with http request, since I considered it an easy way to provide as many integrations as possible.
Since I am not sure if it's the expected way to fix these issues and I ran into some problems compiling this library I did not run all required scripts, but I am willing to once somebody approves the direction of proposed changes.
PR checklist
./bin/generate-samples.sh
to update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH.master
@antihax @grokify @kemokemo @bkabrda