Socket
Socket
Sign inDemoInstall

google-auth-library

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-auth-library - npm Package Compare versions

Comparing version 8.8.0 to 8.9.0

2

build/src/auth/baseexternalclient.d.ts

@@ -37,2 +37,3 @@ import { GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios';

workforce_pool_user_project?: string;
universe_domain?: string;
}

@@ -93,2 +94,3 @@ /**

private readonly workforcePoolUserProject?;
private universeDomain?;
projectId: string | null;

@@ -95,0 +97,0 @@ projectNumber: string | null;

@@ -112,2 +112,3 @@ "use strict";

this.projectNumber = this.getProjectNumber(this.audience);
this.universeDomain = options.universe_domain;
}

@@ -114,0 +115,0 @@ /** The service account email to be impersonated, if available. */

@@ -133,2 +133,5 @@ /// <reference types="node" />

* Determines whether the auth layer is running on Google Compute Engine.
* Checks for GCP Residency, then fallback to checking if metadata server
* is available.
*
* @returns A promise that resolves with the boolean.

@@ -135,0 +138,0 @@ * @api private

@@ -224,2 +224,5 @@ "use strict";

* Determines whether the auth layer is running on Google Compute Engine.
* Checks for GCP Residency, then fallback to checking if metadata server
* is available.
*
* @returns A promise that resolves with the boolean.

@@ -230,3 +233,4 @@ * @api private

if (this.checkIsGCE === undefined) {
this.checkIsGCE = await gcpMetadata.isAvailable();
this.checkIsGCE =
gcpMetadata.getGCPResidency() || (await gcpMetadata.isAvailable());
}

@@ -233,0 +237,0 @@ return this.checkIsGCE;

3

build/src/auth/idtokenclient.js

@@ -34,3 +34,4 @@ "use strict";

if (!this.credentials.id_token ||
(this.credentials.expiry_date || 0) < Date.now()) {
!this.credentials.expiry_date ||
this.isTokenExpiring()) {
const idToken = await this.idTokenProvider.fetchIdToken(this.targetAudience);

@@ -37,0 +38,0 @@ this.credentials = {

@@ -40,10 +40,5 @@ "use strict";

// track google-auth-library-nodejs version:
const authVersion = `auth/${pkg.version}`;
if (opts.headers['x-goog-api-client'] &&
!opts.headers['x-goog-api-client'].includes(authVersion)) {
opts.headers['x-goog-api-client'] = `${opts.headers['x-goog-api-client']} ${authVersion}`;
}
else if (!opts.headers['x-goog-api-client']) {
if (!opts.headers['x-goog-api-client']) {
const nodeVersion = process.version.replace(/^v/, '');
opts.headers['x-goog-api-client'] = `gl-node/${nodeVersion} ${authVersion}`;
opts.headers['x-goog-api-client'] = `gl-node/${nodeVersion}`;
}

@@ -50,0 +45,0 @@ }

{
"name": "google-auth-library",
"version": "8.8.0",
"version": "8.9.0",
"author": "Google Inc.",

@@ -25,3 +25,3 @@ "description": "Google APIs Authentication Client Library for Node.js",

"gaxios": "^5.0.0",
"gcp-metadata": "^5.2.0",
"gcp-metadata": "^5.3.0",
"gtoken": "^6.1.0",

@@ -43,3 +43,3 @@ "jws": "^4.0.0",

"assert-rejects": "^1.0.0",
"c8": "^7.0.0",
"c8": "^8.0.0",
"chai": "^4.2.0",

@@ -64,3 +64,3 @@ "codecov": "^3.0.2",

"null-loader": "^4.0.0",
"puppeteer": "^18.0.0",
"puppeteer": "^20.0.0",
"sinon": "^15.0.0",

@@ -67,0 +67,0 @@ "ts-loader": "^8.0.0",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc