From 058a5035e3e4df35663c6b3adef2dda617271849 Mon Sep 17 00:00:00 2001 From: Alejandro Marco <78371908+amalej@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:32:50 +0800 Subject: [PATCH] fix: typos in samples (#1728) * fix: typos in samples * chore: Fix copyright * chore: Fix copyright --------- Co-authored-by: Daniel Bankhead Co-authored-by: Daniel Bankhead --- samples/jwt.js | 7 ++++--- samples/keyfile.js | 7 ++++--- samples/scripts/externalclient-setup.js | 2 +- samples/test/externalclient.test.js | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/samples/jwt.js b/samples/jwt.js index 3110c8f9..62b9cccd 100644 --- a/samples/jwt.js +++ b/samples/jwt.js @@ -1,9 +1,10 @@ -// Copyright 2017, Google, Inc. +// Copyright 2017 Google LLC +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -27,7 +28,7 @@ const {JWT} = require('google-auth-library'); const fs = require('fs'); async function main( - // Full path to the sevice account credential + // Full path to the service account credential keyFile = process.env.GOOGLE_APPLICATION_CREDENTIALS ) { const keys = JSON.parse(fs.readFileSync(keyFile, 'utf8')); diff --git a/samples/keyfile.js b/samples/keyfile.js index 5915f518..3018d843 100644 --- a/samples/keyfile.js +++ b/samples/keyfile.js @@ -1,9 +1,10 @@ -// Copyright 2018, Google, LLC. +// Copyright 2018 Google LLC +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -22,7 +23,7 @@ const {GoogleAuth} = require('google-auth-library'); * Acquire a client, and make a request to an API that's enabled by default. */ async function main( - // Full path to the sevice account credential + // Full path to the service account credential keyFile = process.env.GOOGLE_APPLICATION_CREDENTIALS ) { const auth = new GoogleAuth({ diff --git a/samples/scripts/externalclient-setup.js b/samples/scripts/externalclient-setup.js index 21e75954..caf24bd7 100755 --- a/samples/scripts/externalclient-setup.js +++ b/samples/scripts/externalclient-setup.js @@ -165,7 +165,7 @@ async function main(config) { const awsAudience = `//iam.googleapis.com/${poolResourcePath}/providers/${awsProviderId}`; // Allow service account impersonation. - // Get the existing IAM policity bindings on the current service account. + // Get the existing IAM policy bindings on the current service account. response = await iam.projects.serviceAccounts.getIamPolicy({ resource: `projects/${projectId}/serviceAccounts/${clientEmail}`, }); diff --git a/samples/test/externalclient.test.js b/samples/test/externalclient.test.js index 6efdc3f3..b3e231c3 100644 --- a/samples/test/externalclient.test.js +++ b/samples/test/externalclient.test.js @@ -50,7 +50,7 @@ // AWS provider tests for AWS credentials // ------------------------------------- // The test suite will also run tests for AWS credentials. This works as -// follows. (Note prequisite setup is needed. This is documented in +// follows. (Note prerequisite setup is needed. This is documented in // externalclient-setup.js). // - iamcredentials:generateIdToken is used to generate a Google ID token using // the service account access token. The service account client_id is used as