Skip to content

feat(auth): support non-default User account credentials#1747

Merged
harkamaljot merged 12 commits intogoogleapis:mainfrom
harkamaljot:user-cred-builder
Apr 9, 2025
Merged

feat(auth): support non-default User account credentials#1747
harkamaljot merged 12 commits intogoogleapis:mainfrom
harkamaljot:user-cred-builder

Conversation

@harkamaljot
Copy link
Contributor

Implementation Details

  • Introduced a Builder struct within user_account.rs to accept authorized_user json from the user.
  • Allow user to override the optional scopes, token_uri, and quota_project_id parameters.

Refactoring

  • Renamed user.rs to user_account.rs as reading documentation the latter name seemed more coherent and maintain consistency with service_account.rs.

Testing

  • Updated unit tests to verify that:
    • Provided scopes, token_uri, and quota_project_id correctly override any defaults.
    • Credentials function correctly with the overridden values.

@harkamaljot harkamaljot marked this pull request as draft April 8, 2025 19:39
@harkamaljot harkamaljot reopened this Apr 8, 2025
@codecov
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.83%. Comparing base (20eaea6) to head (27e453e).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1747      +/-   ##
==========================================
+ Coverage   95.79%   95.83%   +0.04%     
==========================================
  Files          50       50              
  Lines        1904     1923      +19     
==========================================
+ Hits         1824     1843      +19     
  Misses         80       80              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@harkamaljot harkamaljot marked this pull request as ready for review April 8, 2025 23:48
@harkamaljot harkamaljot closed this Apr 9, 2025
@harkamaljot harkamaljot reopened this Apr 9, 2025
@harkamaljot harkamaljot merged commit 293d4f0 into googleapis:main Apr 9, 2025
38 checks passed
@harkamaljot harkamaljot deleted the user-cred-builder branch April 9, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants