-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: Support optional headers for OAuth request #1815
feat: Support optional headers for OAuth request #1815
Conversation
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.
Thanks @s7clarke10! A few suggestions to simplify things a bit, let me know what you think :)
Codecov Report
@@ Coverage Diff @@
## main #1815 +/- ##
=======================================
Coverage 86.46% 86.47%
=======================================
Files 59 59
Lines 4996 4998 +2
Branches 816 816
=======================================
+ Hits 4320 4322 +2
Misses 479 479
Partials 197 197
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This PR has been tested on my enhancements to tap-rest-api-msdk. This is the branch that I have used for my testing https://github.com/s7clarke10/tap-rest-api-msdk/commits/feature/sdk_supported_oauth_headers . Thanks for your support for this change and great suggestions to resolve the failed tests. I believe all the comments can be resolved now. |
fix: #1822 |
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.
Thanks @s7clarke10!
Adding support for adding a header to an OAuth request for tokens. In a few instances an API has a requirement to have headers added to the request for an OAuth Token. An example of the type of header is a subscription key.
This extends the current OAuth Authenticator to accept a new optional parameter
oauth_headers
.The PR also explicitly converts the returned
expires_in
value to int rather than assuming it is an integer. I had an example where it was returned as an string from this API.📚 Documentation preview 📚: https://meltano-sdk--1815.org.readthedocs.build/en/1815/