feat(csharp/src/Drivers/Apache/Spark): Add OAuth access token auth type to Csharp Spark Driver#2579
Merged
CurtHagenlocher merged 2 commits intoMar 12, 2025
Conversation
…access_token_passthrough_auth
| } | ||
| else if (!string.IsNullOrEmpty(access_token) && authType == SparkAuthType.OAuth) | ||
| { | ||
| return new AuthenticationHeaderValue(BearerAuthenticationScheme, access_token); |
Contributor
There was a problem hiding this comment.
It seems like mechanically, the only difference between token and oauth are the names and values of the connection parameters; an adbc.spark.auth_type of token with an adbc.spark.token property produces an identical outcome as an 'adbc.spark.auth_typeofoauthwith anadbc.spark.access_token` property. Is this expected?
Contributor
Author
There was a problem hiding this comment.
Yes, they should all put the token at the Bearer header.
The reason I add another auth_type and another access_token is to differentiate from existing token mode, and we will need to support other OAuth features like service principal in the future, which will follow the oauth pattern.
CurtHagenlocher
approved these changes
Mar 12, 2025
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.
Introduce a new OAuth type for adbc.spark.auth_type as oauth.
Introduce a new parameter adbc.spark.access_token which accept the pass through OAuth access token.
Closes #2578