Support logging in with Application Default Credentials (#1157)

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Tommaso Sciortino
2025-06-18 09:49:13 -07:00
committed by GitHub
parent 5b2cea8eda
commit 3453b977b8
5 changed files with 50 additions and 42 deletions

View File

@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { OAuth2Client } from 'google-auth-library';
import { AuthClient } from 'google-auth-library';
import {
LoadCodeAssistResponse,
LoadCodeAssistRequest,
@@ -42,7 +42,7 @@ export const CODE_ASSIST_API_VERSION = 'v1internal';
export class CodeAssistServer implements ContentGenerator {
constructor(
readonly auth: OAuth2Client,
readonly auth: AuthClient,
readonly projectId?: string,
readonly httpOptions: HttpOptions = {},
) {}