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(SQLAdminFetcher): Support base AuthClient for auth and loginAuth #238

Merged

Conversation

danielbankhead
Copy link
Contributor

@danielbankhead danielbankhead commented Oct 23, 2023

Change Description

Adds custom auth support for auth and loginAuth.

Checklist

  • 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
  • Appropriate documentation is updated (if necessary)

Relevant issues:

@danielbankhead danielbankhead requested a review from a team as a code owner October 23, 2023 19:37
this.client = new Sqladmin({
rootUrl: sqlAdminAPIEndpoint,
auth,
auth: auth as GoogleAuth,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Requires the following to be resolved in order to remove the casting:

@@ -71,6 +71,28 @@ const mockRequest = (
});
};

t.test('constructor', async t => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These tests aren't really 'tested' as this suite may be refactored shortly; they only exist for coverage purposes.

src/sqladmin-fetcher.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

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

We'll need to expose a public API (similar to 7b6f6c1) along with README docs on how to use it in order to really fix #200

@ruyadorno ruyadorno force-pushed the support-base-auth-client branch from 30d140e to 4ee3557 Compare November 13, 2023 18:03
@ruyadorno ruyadorno merged commit e1a50a5 into GoogleCloudPlatform:main Nov 13, 2023
28 checks passed
@enocom enocom mentioned this pull request Mar 8, 2024
@danielbankhead danielbankhead deleted the support-base-auth-client branch July 7, 2024 20:58
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.

Add support for specifying custom credentials
4 participants