databricks-sdk-go icon indicating copy to clipboard operation
databricks-sdk-go copied to clipboard

Create a method to generate OAuth tokens

Open hectorcast-db opened this issue 1 year ago • 1 comments

Changes

Create a method to generate OAuth tokens. This is required to later generate tokens to use in the DataPlane APIs. This PR introduces a breaking change by renaming CredentialsProvider -> CredentialsStrategy and changing the signature of the Configure method for such interface.

Tests

  • [X] Manual test. No API returns the authorization_details for an object.
  • [X] make test passing
  • [X] make fmt applied
  • [ ] relevant integration tests applied

hectorcast-db avatar Apr 09 '24 11:04 hectorcast-db

Codecov Report

Attention: Patch coverage is 49.10714% with 57 lines in your changes are missing coverage. Please review.

Project coverage is 7.12%. Comparing base (27d08a6) to head (4214f2f). Report is 2 commits behind head on main.

Files Patch % Lines
config/config.go 17.64% 11 Missing and 3 partials :warning:
httpclient/oauth_token.go 0.00% 14 Missing :warning:
httpclient/request.go 46.66% 7 Missing and 1 partial :warning:
workspace_client.go 0.00% 5 Missing :warning:
config/auth_gcp_google_id.go 20.00% 4 Missing :warning:
config/api_client.go 0.00% 3 Missing :warning:
examples/custom-auth/main.go 0.00% 3 Missing :warning:
config/auth_azure_client_secret.go 33.33% 2 Missing :warning:
config/auth_gcp_google_credentials.go 33.33% 2 Missing :warning:
credentials/oauth_credentials_provider.go 75.00% 2 Missing :warning:
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #886      +/-   ##
========================================
+ Coverage   7.08%   7.12%   +0.03%     
========================================
  Files        276     279       +3     
  Lines      64376   64446      +70     
========================================
+ Hits        4563    4590      +27     
- Misses     59502   59546      +44     
+ Partials     311     310       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 09 '24 11:04 codecov-commenter