googleapis / google-auth-library-nodejs

🔑 Google Auth Library for Node.js
Apache License 2.0
1.71k stars 374 forks source link

feat: refactor AWS and identity pool clients to use suppliers #1776

Closed aeitzman closed 6 months ago

aeitzman commented 6 months ago

Refactors AWS and identity pool client types to use suppliers to get subject tokens and AWS security credentials. Moved internal implementations out of the client classes into stand alone supplier classes. Follow up PR will add support for custom suppliers in the client constructors.

aeitzman commented 6 months ago

Looks good so far; a few things + tests would wrap things up

What tests are you looking for? Since the new files are the same logic as the existing AWS/Identity pool clients, they already have coverage from the existing tests.

danielbankhead commented 6 months ago

Looks good so far; a few things + tests would wrap things up

What tests are you looking for? Since the new files are the same logic as the existing AWS/Identity pool clients, they already have coverage from the existing tests.

Fair point; from a coverage standpoint this should all be the same. Tests would be useful for the follow-up PR.

aeitzman commented 6 months ago

Looks good so far; a few things + tests would wrap things up

What tests are you looking for? Since the new files are the same logic as the existing AWS/Identity pool clients, they already have coverage from the existing tests.

Fair point; from a coverage standpoint this should all be the same. Tests would be useful for the follow-up PR.

Yep, the next PR will include unit tests around suppliers used to instantiate the clients