Skip to content

Commit b8ca587

Browse files
authored
Merge branch 'main' into remove-options.ts
2 parents 7cdfc26 + 2ef88c3 commit b8ca587

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+200
-88
lines changed

.github/.OwlBot.lock.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
16-
digest: sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429
17-
# created: 2024-10-01T19:34:30.797530443Z
16+
digest: sha256:0d39e59663287ae929c1d4ccf8ebf7cef9946826c9b86eda7e85d8d752dbb584
17+
# created: 2024-11-21T22:39:44.342569463Z

.github/release-trigger.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
enabled: true
2+
multiScmName: google-auth-library-nodejs

.kokoro/common.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/continuous/node18/common.cfg

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/continuous/node18/lint.cfg

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/continuous/node18/samples-test.cfg

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/continuous/node18/system-test.cfg

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/continuous/node18/test.cfg

Whitespace-only changes.

.kokoro/presubmit/node18/common.cfg

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/presubmit/node18/samples-test.cfg

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/presubmit/node18/system-test.cfg

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/presubmit/node18/test.cfg

Whitespace-only changes.

.kokoro/release/docs-devsite.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/release/docs.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/release/docs.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/release/publish.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/samples-test.sh

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/system-test.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/test.bat

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/test.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/trampoline_v2.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.readme-partials.yaml

+3-11
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,12 @@ body: |-
1313
- [Downscoped Client](#downscoped-client) - Use Downscoped Client with Credential Access Boundary to generate a short-lived credential with downscoped, restricted IAM permissions that can use for Cloud Storage.
1414
1515
## Application Default Credentials
16-
This library provides an implementation of [Application Default Credentials](https://cloud.google.com/docs/authentication/getting-started) for Node.js. The [Application Default Credentials](https://cloud.google.com/docs/authentication/getting-started) provide a simple way to get authorization credentials for use in calling Google APIs.
1716
18-
They are best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Cloud Platform.
17+
This library provides an implementation of [Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials) for Node.js. ADC provides a simple way to get credentials for use in calling Google APIs. How you [set up ADC](https://cloud.google.com/docs/authentication/provide-credentials-adc) depends on the environment where your code is running.
1918
20-
Application Default Credentials also support workload identity federation to access Google Cloud resources from non-Google Cloud platforms including Amazon Web Services (AWS), Microsoft Azure or any identity provider that supports OpenID Connect (OIDC). Workload identity federation is recommended for non-Google Cloud environments as it avoids the need to download, manage and store service account private keys locally, see: [Workload Identity Federation](#workload-identity-federation).
19+
ADC is best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Cloud Platform.
2120
22-
#### Download your Service Account Credentials JSON file
23-
24-
To use Application Default Credentials, You first need to download a set of JSON credentials for your project. Go to **APIs & Auth** > **Credentials** in the [Google Developers Console](https://console.cloud.google.com/) and select **Service account** from the **Add credentials** dropdown.
25-
26-
> This file is your *only copy* of these credentials. It should never be
27-
> committed with your source code, and should be stored securely.
28-
29-
Once downloaded, store the path to this file in the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
21+
Application Default Credentials also supports Workload Identity Federation to access Google Cloud resources from non-Google Cloud platforms including Amazon Web Services (AWS), Microsoft Azure or any identity provider that supports OpenID Connect (OIDC). Workload Identity Federation is recommended for non-Google Cloud environments as it avoids the need to download, manage and store service account private keys locally, see: [Workload Identity Federation](#workload-identity-federation).
3022
3123
#### Enable the API you want to use
3224

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
[1]: https://www.npmjs.com/package/google-auth-library?activeTab=versions
66

7+
## [9.15.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.15.0...v9.15.1) (2025-01-24)
8+
9+
10+
### Bug Fixes
11+
12+
* Resolve typo in document ([#1901](https://github.com/googleapis/google-auth-library-nodejs/issues/1901)) ([12f2c87](https://github.com/googleapis/google-auth-library-nodejs/commit/12f2c87266de0a3ccd33e6b4993cab3537f9a242))
13+
714
## [9.15.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.14.2...v9.15.0) (2024-11-01)
815

916

README.md

+3-11
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,12 @@ This library provides a variety of ways to authenticate to your Google services.
5757
- [Downscoped Client](#downscoped-client) - Use Downscoped Client with Credential Access Boundary to generate a short-lived credential with downscoped, restricted IAM permissions that can use for Cloud Storage.
5858

5959
## Application Default Credentials
60-
This library provides an implementation of [Application Default Credentials](https://cloud.google.com/docs/authentication/getting-started) for Node.js. The [Application Default Credentials](https://cloud.google.com/docs/authentication/getting-started) provide a simple way to get authorization credentials for use in calling Google APIs.
6160

62-
They are best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Cloud Platform.
61+
This library provides an implementation of [Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials) for Node.js. ADC provides a simple way to get credentials for use in calling Google APIs. How you [set up ADC](https://cloud.google.com/docs/authentication/provide-credentials-adc) depends on the environment where your code is running.
6362

64-
Application Default Credentials also support workload identity federation to access Google Cloud resources from non-Google Cloud platforms including Amazon Web Services (AWS), Microsoft Azure or any identity provider that supports OpenID Connect (OIDC). Workload identity federation is recommended for non-Google Cloud environments as it avoids the need to download, manage and store service account private keys locally, see: [Workload Identity Federation](#workload-identity-federation).
63+
ADC is best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Cloud Platform.
6564

66-
#### Download your Service Account Credentials JSON file
67-
68-
To use Application Default Credentials, You first need to download a set of JSON credentials for your project. Go to **APIs & Auth** > **Credentials** in the [Google Developers Console](https://console.cloud.google.com/) and select **Service account** from the **Add credentials** dropdown.
69-
70-
> This file is your *only copy* of these credentials. It should never be
71-
> committed with your source code, and should be stored securely.
72-
73-
Once downloaded, store the path to this file in the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
65+
Application Default Credentials also supports Workload Identity Federation to access Google Cloud resources from non-Google Cloud platforms including Amazon Web Services (AWS), Microsoft Azure or any identity provider that supports OpenID Connect (OIDC). Workload Identity Federation is recommended for non-Google Cloud environments as it avoids the need to download, manage and store service account private keys locally, see: [Workload Identity Federation](#workload-identity-federation).
7466

7567
#### Enable the API you want to use
7668

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "google-auth-library",
3-
"version": "9.15.0",
3+
"version": "9.15.1",
44
"author": "Google Inc.",
55
"description": "Google APIs Authentication Client Library for Node.js",
66
"engines": {

samples/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@google-cloud/language": "^6.5.0",
1717
"@google-cloud/storage": "^7.0.0",
1818
"@googleapis/iam": "^21.0.0",
19-
"google-auth-library": "^9.15.0",
19+
"google-auth-library": "^9.15.1",
2020
"node-fetch": "^2.3.0",
2121
"open": "^9.0.0",
2222
"server-destroy": "^1.0.1"

src/auth/authclient.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {Gaxios, GaxiosOptions, GaxiosPromise, GaxiosResponse} from 'gaxios';
1717

1818
import {DefaultTransporter, Transporter} from '../transporters';
1919
import {Credentials} from './credentials';
20-
import {GetAccessTokenResponse, Headers} from './oauth2client';
2120
import {OriginalAndCamel, originalOrCamelOptions} from '../util';
2221

2322
/**
@@ -307,3 +306,12 @@ export abstract class AuthClient
307306
};
308307
}
309308
}
309+
310+
export interface Headers {
311+
[index: string]: string;
312+
}
313+
314+
export interface GetAccessTokenResponse {
315+
token?: string | null;
316+
res?: GaxiosResponse | null;
317+
}

src/auth/awsclient.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
BaseExternalAccountClientOptions,
1919
ExternalAccountSupplierContext,
2020
} from './baseexternalclient';
21+
2122
import {AuthClientOptions} from './authclient';
2223
import {DefaultAwsSecurityCredentialsSupplier} from './defaultawssecuritycredentialssupplier';
2324
import {originalOrCamelOptions, SnakeToCamelObject} from '../util';

src/auth/awsrequestsigner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import {GaxiosOptions} from 'gaxios';
1616

17-
import {Headers} from './oauth2client';
17+
import {Headers} from './authclient';
1818
import {Crypto, createCrypto, fromArrayBufferToHex} from '../crypto/crypto';
1919

2020
type HttpMethod =

src/auth/baseexternalclient.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ import {
2222
import * as stream from 'stream';
2323

2424
import {Credentials} from './credentials';
25-
import {AuthClient, AuthClientOptions} from './authclient';
25+
import {
26+
AuthClient,
27+
AuthClientOptions,
28+
GetAccessTokenResponse,
29+
Headers,
30+
} from './authclient';
2631
import {BodyResponseCallback, Transporter} from '../transporters';
27-
import {GetAccessTokenResponse, Headers} from './oauth2client';
2832
import * as sts from './stscredentials';
2933
import {ClientAuthentication} from './oauth2common';
3034
import {SnakeToCamelObject, originalOrCamelOptions} from '../util';
@@ -69,11 +73,6 @@ const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/token';
6973
// eslint-disable-next-line @typescript-eslint/no-var-requires
7074
const pkg = require('../../../package.json');
7175

72-
/**
73-
* For backwards compatibility.
74-
*/
75-
export {DEFAULT_UNIVERSE} from './authclient';
76-
7776
/**
7877
* Shared options used to build {@link ExternalAccountClient} and
7978
* {@link ExternalAccountAuthorizedUserClient}.

src/auth/defaultawssecuritycredentialssupplier.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {Gaxios, GaxiosOptions} from 'gaxios';
1717
import {Transporter} from '../transporters';
1818
import {AwsSecurityCredentialsSupplier} from './awsclient';
1919
import {AwsSecurityCredentials} from './awsrequestsigner';
20-
import {Headers} from './oauth2client';
20+
import {Headers} from './authclient';
2121

2222
/**
2323
* Interface defining the AWS security-credentials endpoint response.

src/auth/downscopedclient.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ import * as stream from 'stream';
2222

2323
import {BodyResponseCallback} from '../transporters';
2424
import {Credentials} from './credentials';
25-
import {AuthClient, AuthClientOptions} from './authclient';
25+
import {
26+
AuthClient,
27+
AuthClientOptions,
28+
GetAccessTokenResponse,
29+
Headers,
30+
} from './authclient';
2631

27-
import {GetAccessTokenResponse, Headers} from './oauth2client';
2832
import * as sts from './stscredentials';
2933

3034
/**

0 commit comments

Comments
 (0)