estuary-cdk: make _with_token a public API#3722
Merged
Conversation
The `_with_token` parameter is used to control whether or not to include a token from the `TokenSource` in HTTP requests made through an `HTTPSession`. For most requests, we do want to include the token in an Authorization header. However, there are legitimate situations where we don't want to include that token, like during OAuth token exchange or when using a pre-signed URL. During the original development of the CDK, `_with_token` was marked as an unstable internal API. However, the CDK has developed since then; we've added many of the features mentioned in Johnny's original TODO about why this was an unstable API. While there's still other improvements we want to make to the CDK, I think `HTTPSession` is mature enough to consider `with_token` a part of the public API.
…lines` All public `HTTPSession` methods already support the `_with_lines` parameter, so `request_lines` should too for congruency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
The
_with_tokenparameter is used to control whether or not to include a token from theTokenSourcein HTTP requests made through anHTTPSession. For most requests, we do want to include the token in an Authorization header. However, there are legitimate situations where we don't want to include that token, like during OAuth token exchange or when using a pre-signed URL.During the original development of the CDK,
_with_tokenwas marked as an unstable internal API. However, the CDK has developed since then; we've added many of the features mentioned in Johnny's original TODO about why this was an unstable API. While there are still other improvements we want to make to the CDK, I thinkHTTPSessionis mature enough to considerwith_tokena part of the public API.Workflow steps:
(How does one use this feature, and how has it changed)
Documentation links affected:
(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)
Notes for reviewers:
(anything that might help someone review this PR)