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

fix: allow authentication with custom endpoint #698

Merged

Conversation

ddelgrosso1
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

This is the first step in addressing this issue.

@ddelgrosso1 ddelgrosso1 requested a review from a team as a code owner October 6, 2021 20:32
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 6, 2021
@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 6, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 6, 2021
describe('customEndpoint (authentication attempted)', () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let makeAuthenticatedRequest: any;
const config = {customEndpoint: true, useAuthWithCustomEndpoint: true};
Copy link
Contributor

Choose a reason for hiding this comment

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

is the case where reqConfig.useAuthWithCustomEndpoint === undefined implicitly covered in existing tests? (guessing it is, but just want to double check). recommend adding an assert somewhere or a note verifying that auth is bypassed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there are existing tests that implicitly pass undefined and test. that auth is bypassed (

it('should not authenticate requests with a custom API', done => {
)

Copy link
Contributor

Choose a reason for hiding this comment

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

amazing

@shaffeeullah shaffeeullah self-requested a review October 6, 2021 20:51
@ddelgrosso1 ddelgrosso1 merged commit 4c0f7ec into googleapis:main Oct 6, 2021
@ddelgrosso1 ddelgrosso1 deleted the ddelgrosso/custom-endpoint-auth branch October 6, 2021 21:33
gcf-merge-on-green bot pushed a commit that referenced this pull request Oct 6, 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.

3 participants