Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-cloud-sdk/connectivity

Package Overview
Dependencies
Maintainers
5
Versions
1169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-cloud-sdk/connectivity - npm Package Compare versions

Comparing version 3.18.1-20240816013940.0 to 3.18.1

6

dist/scp-cf/destination/destination-from-registration.js

@@ -16,6 +16,2 @@ "use strict";

/**
* @internal
*/
const defaultTenantId = 'provider-tenant';
/**
* Registers a destination in a cache for later usage.

@@ -49,3 +45,3 @@ *

}
return { zid: defaultTenantId };
return { zid: jwt_1.defaultTenantId };
}

@@ -52,0 +48,0 @@ return jwt;

10

dist/scp-cf/jwt.d.ts

@@ -8,2 +8,6 @@ /// <reference types="node" />

* @internal
*/
export declare const defaultTenantId = "provider-tenant";
/**
* @internal
* Get the user ID from the JWT payload.

@@ -15,2 +19,8 @@ * @param jwtPayload - Token payload to read the user ID from.

/**
* @internal
* Get the default tenant ID.
* @returns The default tenant ID.
*/
export declare function getDefaultTenantId(): string;
/**
* Get the tenant ID of a decoded JWT, based on its `zid` or if not available `app_tid` property.

@@ -17,0 +27,0 @@ * @param jwt - Token to read the tenant ID from.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTenantIdFromBinding = exports.decodeOrMakeJwt = exports.isUserToken = exports.getJwtPair = exports.isXsuaaToken = exports.wrapJwtInHeader = exports.verificationKeyCache = exports.verifyJwt = exports.retrieveJwt = exports.decodeJwtComplete = exports.decodeJwt = exports.audiences = exports.getSubdomain = exports.getTenantId = exports.userId = void 0;
exports.getTenantIdFromBinding = exports.decodeOrMakeJwt = exports.isUserToken = exports.getJwtPair = exports.isXsuaaToken = exports.wrapJwtInHeader = exports.verificationKeyCache = exports.verifyJwt = exports.retrieveJwt = exports.decodeJwtComplete = exports.decodeJwt = exports.audiences = exports.getSubdomain = exports.getTenantId = exports.getDefaultTenantId = exports.userId = exports.defaultTenantId = void 0;
const util_1 = require("@sap-cloud-sdk/util");

@@ -14,2 +14,6 @@ const xssec_1 = require("@sap/xssec");

});
/**
* @internal
*/
exports.defaultTenantId = 'provider-tenant';
function makeArray(val) {

@@ -30,2 +34,12 @@ return val ? (Array.isArray(val) ? val : [val]) : [];

/**
* @internal
* Get the default tenant ID.
* @returns The default tenant ID.
*/
function getDefaultTenantId() {
logger.debug('Could not determine tenant from JWT nor XSUAA, identity or destination service binding. Client Credentials token is cached without tenant information.');
return exports.defaultTenantId;
}
exports.getDefaultTenantId = getDefaultTenantId;
/**
* Get the tenant ID of a decoded JWT, based on its `zid` or if not available `app_tid` property.

@@ -32,0 +46,0 @@ * @param jwt - Token to read the tenant ID from.

@@ -30,3 +30,3 @@ "use strict";

? (0, jwt_1.getTenantId)(options.jwt) || (0, jwt_1.getSubdomain)(options.jwt)
: (0, jwt_1.getTenantIdFromBinding)();
: (0, jwt_1.getTenantIdFromBinding)() || (0, jwt_1.getDefaultTenantId)();
if (opts.useCache) {

@@ -33,0 +33,0 @@ const cachedToken = client_credentials_token_cache_1.clientCredentialsTokenCache.getToken(tenantForCaching, serviceCredentials.clientid);

{
"name": "@sap-cloud-sdk/connectivity",
"version": "3.18.1-20240816013940.0",
"version": "3.18.1",
"description": "SAP Cloud SDK for JavaScript connectivity",

@@ -40,4 +40,4 @@ "homepage": "https://sap.github.io/cloud-sdk/docs/js/overview",

"dependencies": {
"@sap-cloud-sdk/resilience": "^3.18.1-20240816013940.0",
"@sap-cloud-sdk/util": "^3.18.1-20240816013940.0",
"@sap-cloud-sdk/resilience": "^3.18.1",
"@sap-cloud-sdk/util": "^3.18.1",
"@sap/xsenv": "^5.2.0",

@@ -44,0 +44,0 @@ "@sap/xssec": "^4.2.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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