Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make full implementation on DownscopedClient. #1232

Merged
merged 5 commits into from Sep 2, 2021

Conversation

xil222
Copy link
Contributor

@xil222 xil222 commented Aug 12, 2021

This full implementation for downscoped client is just to satisfy requirement of the abstract class AuthClient, this is neither urgent and nor a blocker in terms of functionality since they're not expected to be used by token brokers.

Three components are added:

  1. Add quota_project_id as an optional parameter in constructor.
  2. Implement and test getRequestHeaders() API.
  3. Implement and test request() API.
    These implementations are mostly copied from BaseExternalClient.

@xil222 xil222 requested review from a team as code owners August 12, 2021 00:49
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 12, 2021
@lsirac
Copy link
Contributor

lsirac commented Aug 25, 2021

Seems like this code was copied from other classes. I remember a thread in the cab doc that mentioned a refactor. Did that change?

@xil222
Copy link
Contributor Author

xil222 commented Aug 25, 2021

Seems like this code was copied from other classes. I remember a thread in the cab doc that mentioned a refactor. Did that change?

There're 2 approaches copy vs refactor. In short term, it is easier to just copy from baseExternalClient.

Copy link
Contributor

@bojeil-google bojeil-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one test missing.

src/index.ts Show resolved Hide resolved
@xil222 xil222 removed the request for review from lsirac August 31, 2021 04:32
Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we figure out a way to make base external client and downscoped client share logic?

test/test.downscopedclient.ts Show resolved Hide resolved
src/auth/downscopedclient.ts Show resolved Hide resolved
@bcoe bcoe added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 2, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 2, 2021
@bcoe bcoe merged commit baa1318 into googleapis:master Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants