Socket
Socket
Sign inDemoInstall

ibm-cloud-sdk-core

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ibm-cloud-sdk-core - npm Package Compare versions

Comparing version 0.2.8 to 0.3.0

auth/iam-token-manager-v1.d.ts

10

CHANGELOG.md

@@ -0,1 +1,11 @@

# [0.3.0](https://github.com/IBM/node-sdk-core/compare/v0.2.8...v0.3.0) (2019-06-05)
### Features
* add `IcpTokenManagerV1` as a top-level export of the package ([cfa3e1b](https://github.com/IBM/node-sdk-core/commit/cfa3e1b))
* add new token manager for ICP4D ([ee1ddad](https://github.com/IBM/node-sdk-core/commit/ee1ddad))
* add new token manager for ICP4D ([#26](https://github.com/IBM/node-sdk-core/issues/26)) ([2097a64](https://github.com/IBM/node-sdk-core/commit/2097a64))
* carry `disable_ssl_verification` through to token managers ([4f2f789](https://github.com/IBM/node-sdk-core/commit/4f2f789))
## [0.2.8](https://github.com/IBM/node-sdk-core/compare/v0.2.7...v0.2.8) (2019-05-30)

@@ -2,0 +12,0 @@

127

iam-token-manager/v1.d.ts

@@ -16,123 +16,6 @@ /**

*/
export declare type Options = {
iamApikey?: string;
iamAccessToken?: string;
iamUrl?: string;
iamClientId?: string;
iamClientSecret?: string;
};
export interface IamTokenData {
access_token: string;
refresh_token: string;
token_type: string;
expires_in: number;
expiration: number;
}
export declare class IamTokenManagerV1 {
name: string;
serviceVersion: string;
protected iamUrl: string;
protected tokenInfo: IamTokenData;
private iamApikey;
private userAccessToken;
private iamClientId;
private iamClientSecret;
private requestWrapperInstance;
/**
* IAM Token Manager Service
*
* Retreives, stores, and refreshes IAM tokens.
*
* @param {Object} options
* @param {String} options.iamApikey
* @param {String} options.iamAccessToken
* @param {String} options.iamUrl - url of the iam api to retrieve tokens from
* @constructor
*/
constructor(options: Options);
/**
* This function sends an access token back through a callback. The source of the token
* is determined by the following logic:
* 1. If user provides their own managed access token, assume it is valid and send it
* 2. If this class is managing tokens and does not yet have one, make a request for one
* 3. If this class is managing tokens and the token has expired, refresh it
* 4. If this class is managing tokens and has a valid token stored, send it
*
* @param {Function} cb - callback function that the token will be passed to
*/
getToken(cb: Function): any;
/**
* Set the IAM 'client_id' and 'client_secret' values.
* These values are used to compute the Authorization header used
* when retrieving or refreshing the IAM access token.
* If these values are not set, then a default Authorization header
* will be used when interacting with the IAM token server.
*
* @param {string} iamClientId - The client id
* @param {string} iamClientSecret - The client secret
* @returns {void}
*/
setIamAuthorizationInfo(iamClientId: string, iamClientSecret: string): void;
/**
* Set a self-managed IAM access token.
* The access token should be valid and not yet expired.
*
* By using this method, you accept responsibility for managing the
* access token yourself. You must set a new access token before this
* one expires. Failing to do so will result in authentication errors
* after this token expires.
*
* @param {string} iamAccessToken - A valid, non-expired IAM access token
* @returns {void}
*/
setAccessToken(iamAccessToken: string): void;
/**
* Request an IAM token using an API key.
*
* @param {Function} cb - The callback that handles the response.
* @returns {void}
*/
private requestToken;
/**
* Refresh an IAM token using a refresh token.
*
* @param {Function} cb - The callback that handles the response.
* @returns {void}
*/
private refreshToken;
/**
* Check if currently stored token is expired.
*
* Using a buffer to prevent the edge case of the
* token expiring before the request could be made.
*
* The buffer will be a fraction of the total TTL. Using 80%.
*
* @private
* @returns {boolean}
*/
private isTokenExpired;
/**
* Used as a fail-safe to prevent the condition of a refresh token expiring,
* which could happen after around 30 days. This function will return true
* if it has been at least 7 days and 1 hour since the last token was
* retrieved.
*
* @private
* @returns {boolean}
*/
private isRefreshTokenExpired;
/**
* Save the response from the IAM service request to the object's state.
*
* @param {IamTokenData} tokenResponse - Response object from IAM service request
* @private
* @returns {void}
*/
private saveTokenInfo;
/**
* Compute and return the Authorization header to be used with the
* IAM token server interactions (retrieve and refresh access token).
*/
private computeIamAuthHeader;
}
/**
* @module iam-token-manager-v1
*/
import { IamTokenManagerV1 } from '../auth/iam-token-manager-v1';
export { IamTokenManagerV1 };

@@ -18,238 +18,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var extend = require("extend");
var requestwrapper_1 = require("../lib/requestwrapper");
/**
* Check for only one of two elements being defined.
* Returns true if a is defined and b is undefined,
* or vice versa. Returns false if both are defined
* or both are undefined.
*
* @param {any} a - The first object
* @param {any} b - The second object
* @returns {boolean}
* @module iam-token-manager-v1
*/
function onlyOne(a, b) {
return Boolean((a && !b) || (b && !a));
}
var CLIENT_ID_SECRET_WARNING = 'Warning: Client ID and Secret must BOTH be given, or the defaults will be used.';
var IamTokenManagerV1 = /** @class */ (function () {
/**
* IAM Token Manager Service
*
* Retreives, stores, and refreshes IAM tokens.
*
* @param {Object} options
* @param {String} options.iamApikey
* @param {String} options.iamAccessToken
* @param {String} options.iamUrl - url of the iam api to retrieve tokens from
* @constructor
*/
function IamTokenManagerV1(options) {
this.iamUrl = options.iamUrl || 'https://iam.cloud.ibm.com/identity/token';
this.tokenInfo = {};
if (options.iamApikey) {
this.iamApikey = options.iamApikey;
}
if (options.iamAccessToken) {
this.userAccessToken = options.iamAccessToken;
}
if (options.iamClientId) {
this.iamClientId = options.iamClientId;
}
if (options.iamClientSecret) {
this.iamClientSecret = options.iamClientSecret;
}
if (onlyOne(options.iamClientId, options.iamClientSecret)) {
// tslint:disable-next-line
console.log(CLIENT_ID_SECRET_WARNING);
}
this.requestWrapperInstance = new requestwrapper_1.RequestWrapper();
}
/**
* This function sends an access token back through a callback. The source of the token
* is determined by the following logic:
* 1. If user provides their own managed access token, assume it is valid and send it
* 2. If this class is managing tokens and does not yet have one, make a request for one
* 3. If this class is managing tokens and the token has expired, refresh it
* 4. If this class is managing tokens and has a valid token stored, send it
*
* @param {Function} cb - callback function that the token will be passed to
*/
IamTokenManagerV1.prototype.getToken = function (cb) {
var _this = this;
if (this.userAccessToken) {
// 1. use user-managed token
return cb(null, this.userAccessToken);
}
else if (!this.tokenInfo.access_token || this.isRefreshTokenExpired()) {
// 2. request an initial token
this.requestToken(function (err, tokenResponse) {
_this.saveTokenInfo(tokenResponse);
return cb(err, _this.tokenInfo.access_token);
});
}
else if (this.isTokenExpired()) {
// 3. refresh a token
this.refreshToken(function (err, tokenResponse) {
_this.saveTokenInfo(tokenResponse);
return cb(err, _this.tokenInfo.access_token);
});
}
else {
// 4. use valid managed token
return cb(null, this.tokenInfo.access_token);
}
};
/**
* Set the IAM 'client_id' and 'client_secret' values.
* These values are used to compute the Authorization header used
* when retrieving or refreshing the IAM access token.
* If these values are not set, then a default Authorization header
* will be used when interacting with the IAM token server.
*
* @param {string} iamClientId - The client id
* @param {string} iamClientSecret - The client secret
* @returns {void}
*/
IamTokenManagerV1.prototype.setIamAuthorizationInfo = function (iamClientId, iamClientSecret) {
this.iamClientId = iamClientId;
this.iamClientSecret = iamClientSecret;
if (onlyOne(iamClientId, iamClientSecret)) {
// tslint:disable-next-line
console.log(CLIENT_ID_SECRET_WARNING);
}
};
/**
* Set a self-managed IAM access token.
* The access token should be valid and not yet expired.
*
* By using this method, you accept responsibility for managing the
* access token yourself. You must set a new access token before this
* one expires. Failing to do so will result in authentication errors
* after this token expires.
*
* @param {string} iamAccessToken - A valid, non-expired IAM access token
* @returns {void}
*/
IamTokenManagerV1.prototype.setAccessToken = function (iamAccessToken) {
this.userAccessToken = iamAccessToken;
};
/**
* Request an IAM token using an API key.
*
* @param {Function} cb - The callback that handles the response.
* @returns {void}
*/
IamTokenManagerV1.prototype.requestToken = function (cb) {
var parameters = {
options: {
url: this.iamUrl,
method: 'POST',
headers: {
'Content-type': 'application/x-www-form-urlencoded',
Authorization: this.computeIamAuthHeader()
},
form: {
grant_type: 'urn:ibm:params:oauth:grant-type:apikey',
apikey: this.iamApikey,
response_type: 'cloud_iam'
}
}
};
this.requestWrapperInstance.sendRequest(parameters, cb);
};
/**
* Refresh an IAM token using a refresh token.
*
* @param {Function} cb - The callback that handles the response.
* @returns {void}
*/
IamTokenManagerV1.prototype.refreshToken = function (cb) {
var parameters = {
options: {
url: this.iamUrl,
method: 'POST',
headers: {
'Content-type': 'application/x-www-form-urlencoded',
Authorization: this.computeIamAuthHeader()
},
form: {
grant_type: 'refresh_token',
refresh_token: this.tokenInfo.refresh_token
}
}
};
this.requestWrapperInstance.sendRequest(parameters, cb);
};
/**
* Check if currently stored token is expired.
*
* Using a buffer to prevent the edge case of the
* token expiring before the request could be made.
*
* The buffer will be a fraction of the total TTL. Using 80%.
*
* @private
* @returns {boolean}
*/
IamTokenManagerV1.prototype.isTokenExpired = function () {
if (!this.tokenInfo.expires_in || !this.tokenInfo.expiration) {
return true;
}
;
var fractionOfTtl = 0.8;
var timeToLive = this.tokenInfo.expires_in;
var expireTime = this.tokenInfo.expiration;
var currentTime = Math.floor(Date.now() / 1000);
var refreshTime = expireTime - (timeToLive * (1.0 - fractionOfTtl));
return refreshTime < currentTime;
};
/**
* Used as a fail-safe to prevent the condition of a refresh token expiring,
* which could happen after around 30 days. This function will return true
* if it has been at least 7 days and 1 hour since the last token was
* retrieved.
*
* @private
* @returns {boolean}
*/
IamTokenManagerV1.prototype.isRefreshTokenExpired = function () {
if (!this.tokenInfo.expiration) {
return true;
}
;
var sevenDays = 7 * 24 * 3600;
var currentTime = Math.floor(Date.now() / 1000);
var newTokenTime = this.tokenInfo.expiration + sevenDays;
return newTokenTime < currentTime;
};
/**
* Save the response from the IAM service request to the object's state.
*
* @param {IamTokenData} tokenResponse - Response object from IAM service request
* @private
* @returns {void}
*/
IamTokenManagerV1.prototype.saveTokenInfo = function (tokenResponse) {
this.tokenInfo = extend({}, tokenResponse);
};
/**
* Compute and return the Authorization header to be used with the
* IAM token server interactions (retrieve and refresh access token).
*/
IamTokenManagerV1.prototype.computeIamAuthHeader = function () {
// Use bx:bx as default auth header creds.
var clientId = 'bx';
var clientSecret = 'bx';
// If both the clientId and secret were specified by the user, then use them.
if (this.iamClientId && this.iamClientSecret) {
clientId = this.iamClientId;
clientSecret = this.iamClientSecret;
}
var encodedCreds = Buffer.from(clientId + ":" + clientSecret).toString('base64');
return "Basic " + encodedCreds;
};
return IamTokenManagerV1;
}());
exports.IamTokenManagerV1 = IamTokenManagerV1;
// Exporting the module here for compatibility. To be removed in major release.
var iam_token_manager_v1_1 = require("../auth/iam-token-manager-v1");
exports.IamTokenManagerV1 = iam_token_manager_v1_1.IamTokenManagerV1;
//# sourceMappingURL=v1.js.map

@@ -20,3 +20,4 @@ /**

export { BaseService } from './lib/base_service';
export { IamTokenManagerV1 } from './iam-token-manager/v1';
export { IamTokenManagerV1 } from './auth/iam-token-manager-v1';
export { Icp4dTokenManagerV1 } from './auth/icp4d-token-manager-v1';
export * from './lib/helper';

@@ -23,0 +24,0 @@ export { default as qs } from './lib/querystring';

@@ -26,4 +26,6 @@ "use strict";

exports.BaseService = base_service_1.BaseService;
var v1_1 = require("./iam-token-manager/v1");
exports.IamTokenManagerV1 = v1_1.IamTokenManagerV1;
var iam_token_manager_v1_1 = require("./auth/iam-token-manager-v1");
exports.IamTokenManagerV1 = iam_token_manager_v1_1.IamTokenManagerV1;
var icp4d_token_manager_v1_1 = require("./auth/icp4d-token-manager-v1");
exports.Icp4dTokenManagerV1 = icp4d_token_manager_v1_1.Icp4dTokenManagerV1;
__export(require("./lib/helper"));

@@ -30,0 +32,0 @@ var querystring_1 = require("./lib/querystring");

@@ -29,2 +29,4 @@ /**

token?: string;
icp4d_access_token?: string;
icp4d_url?: string;
iam_access_token?: string;

@@ -35,2 +37,3 @@ iam_apikey?: string;

iam_client_secret?: string;
authentication_type?: string;
disable_ssl_verification?: boolean;

@@ -48,5 +51,8 @@ }

url?: string;
icp4d_access_token?: string;
icp4d_url?: string;
iam_access_token?: string;
iam_apikey?: string;
iam_url?: string;
authentication_type?: string;
}

@@ -69,2 +75,5 @@ export declare class BaseService {

* @param {string} [options.iam_client_secret] - secret (password) for request to iam service
* @param {string} [options.icp4d_access_token] - icp for data access token provided and managed by user
* @param {string} [options.icp4d_url] - icp for data base url - used for authentication
* @param {string} [options.authentication_type] - authentication pattern to be used. can be iam, basic, or icp4d
* @param {string} [options.username] - required unless use_unauthenticated is set

@@ -100,6 +109,6 @@ * @param {string} [options.password] - required unless use_unauthenticated is set

*
* @param {string} iam_access_token - A valid, non-expired IAM access token
* @param {string} access_token - A valid, non-expired IAM access token
* @returns {void}
*/
setAccessToken(iam_access_token: string): void;
setAccessToken(access_token: string): void;
/**

@@ -106,0 +115,0 @@ * Guarantee that the next request you make will be IAM authenticated. This

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

var vcapServices = require("vcap_services");
var v1_1 = require("../iam-token-manager/v1");
var auth_1 = require("../auth");
var helper_1 = require("./helper");

@@ -29,3 +29,4 @@ var read_credentials_file_1 = require("./read-credentials-file");

obj.iam_access_token ||
obj.iam_apikey));
obj.iam_apikey ||
obj.icp4d_access_token));
}

@@ -35,2 +36,5 @@ function isForICP(cred) {

}
function isForICP4D(obj) {
return obj && (obj.authentication_type === 'icp4d' || obj.icp4d_access_token);
}
function hasBasicCredentials(obj) {

@@ -78,2 +82,5 @@ return obj && obj.username && obj.password && !usesBasicForIam(obj);

* @param {string} [options.iam_client_secret] - secret (password) for request to iam service
* @param {string} [options.icp4d_access_token] - icp for data access token provided and managed by user
* @param {string} [options.icp4d_url] - icp for data base url - used for authentication
* @param {string} [options.authentication_type] - authentication pattern to be used. can be iam, basic, or icp4d
* @param {string} [options.username] - required unless use_unauthenticated is set

@@ -105,25 +112,37 @@ * @param {string} [options.password] - required unless use_unauthenticated is set

this._options = extend({ qs: {}, url: serviceClass.URL }, this.serviceDefaults, options, _options);
if (hasIamCredentials(_options)) {
this.tokenManager = new v1_1.IamTokenManagerV1({
// rejectUnauthorized should only be false if disable_ssl_verification is true
// used to disable ssl checking for icp
this._options.rejectUnauthorized = !options.disable_ssl_verification;
if (_options.authentication_type === 'iam' || hasIamCredentials(_options)) {
this.tokenManager = new auth_1.IamTokenManagerV1({
iamApikey: _options.iam_apikey,
iamAccessToken: _options.iam_access_token,
iamUrl: _options.iam_url,
accessToken: _options.iam_access_token,
url: _options.iam_url,
iamClientId: _options.iam_client_id,
iamClientSecret: _options.iam_client_secret
iamClientSecret: _options.iam_client_secret,
});
}
else if (usesBasicForIam(_options)) {
this.tokenManager = new v1_1.IamTokenManagerV1({
this.tokenManager = new auth_1.IamTokenManagerV1({
iamApikey: _options.password,
iamUrl: _options.iam_url,
url: _options.iam_url,
iamClientId: _options.iam_client_id,
iamClientSecret: _options.iam_client_secret
iamClientSecret: _options.iam_client_secret,
});
}
else if (isForICP4D(_options)) {
if (!_options.icp4d_url && !_options.icp4d_access_token) {
throw new Error('`icp4d_url` is required when using an SDK-managed token for ICP4D.');
}
this.tokenManager = new auth_1.Icp4dTokenManagerV1({
url: _options.icp4d_url,
username: _options.username,
password: _options.password,
accessToken: _options.icp4d_access_token,
disableSslVerification: options.disable_ssl_verification,
});
}
else {
this.tokenManager = null;
}
// rejectUnauthorized should only be false if disable_ssl_verification is true
// used to disable ssl checking for icp
this._options.rejectUnauthorized = !options.disable_ssl_verification;
this.requestWrapperInstance = new requestwrapper_1.RequestWrapper(this._options);

@@ -158,2 +177,11 @@ }

}
if (this._options.icp4d_access_token) {
credentials.icp4d_access_token = this._options.icp4d_access_token;
}
if (this._options.icp4d_url) {
credentials.icp4d_url = this._options.icp4d_url;
}
if (this._options.authentication_type) {
credentials.authentication_type = this._options.authentication_type;
}
return credentials;

@@ -170,12 +198,19 @@ };

*
* @param {string} iam_access_token - A valid, non-expired IAM access token
* @param {string} access_token - A valid, non-expired IAM access token
* @returns {void}
*/
BaseService.prototype.setAccessToken = function (iam_access_token) {
BaseService.prototype.setAccessToken = function (access_token) {
if (this.tokenManager) {
this.tokenManager.setAccessToken(iam_access_token);
this.tokenManager.setAccessToken(access_token);
}
else if (this._options.authentication_type === 'icp4d') {
this.tokenManager = new auth_1.Icp4dTokenManagerV1({
accessToken: access_token,
url: this._options.icp4d_url,
disableSslVerification: this._options.disable_ssl_verification,
});
}
else {
this.tokenManager = new v1_1.IamTokenManagerV1({
iamAccessToken: iam_access_token
this.tokenManager = new auth_1.IamTokenManagerV1({
accessToken: access_token,
});

@@ -247,2 +282,6 @@ }

_options = extend({}, this.getCredentialsFromCloud(this.name), this.getCredentialsFromEnvironment(process.env, this.name), this.getCredentialsFromEnvironment(read_credentials_file_1.readCredentialsFile(), this.name), options, _options);
// make authentication_type non-case-sensitive
if (typeof _options.authentication_type === 'string') {
_options.authentication_type = _options.authentication_type.toLowerCase();
}
if (!_options.use_unauthenticated) {

@@ -253,3 +292,3 @@ if (!hasCredentials(_options)) {

'required parameters. Common examples are username/password and ' +
'iam_access_token.';
'iam_apikey.';
throw new Error(errorMessage);

@@ -265,7 +304,7 @@ }

}
if (!hasIamCredentials(_options) && !usesBasicForIam(_options)) {
if (hasBasicCredentials(_options)) {
if (!hasIamCredentials(_options) && !usesBasicForIam(_options) && !isForICP4D(_options)) {
if (_options.authentication_type === 'basic' || hasBasicCredentials(_options)) {
// Calculate and add Authorization header to base options
var encodedCredentials = Buffer.from(_options.username + ":" + _options.password).toString('base64');
var authHeader = { Authorization: "Basic " + encodedCredentials };
var encodedCredentials = auth_1.computeBasicAuthHeader(_options.username, _options.password);
var authHeader = { Authorization: "" + encodedCredentials };
_options.headers = extend(authHeader, _options.headers);

@@ -312,2 +351,5 @@ }

var iamUrl = envObj[_name + "_IAM_URL"] || envObj[nameWithUnderscore + "_IAM_URL"];
var icp4dAccessToken = envObj[_name + "_ICP4D_ACCESS_TOKEN"] || envObj[nameWithUnderscore + "_ICP4D_ACCESS_TOKEN"];
var icp4dUrl = envObj[_name + "_ICP4D_URL"] || envObj[nameWithUnderscore + "_ICP4D_URL"];
var authenticationType = envObj[_name + "_AUTHENTICATION_TYPE"] || envObj[nameWithUnderscore + "_AUTHENTICATION_TYPE"];
return {

@@ -319,3 +361,6 @@ username: username,

iam_apikey: iamApiKey,
iam_url: iamUrl
iam_url: iamUrl,
icp4d_access_token: icp4dAccessToken,
icp4d_url: icp4dUrl,
authentication_type: authenticationType,
};

@@ -322,0 +367,0 @@ };

@@ -24,4 +24,2 @@ "use strict";

var helper_1 = require("./helper");
// tslint:disable-next-line:no-var-requires
var pkg = require('../package.json');
var isBrowser = typeof window === 'object';

@@ -28,0 +26,0 @@ var globalTransactionId = 'x-global-transaction-id';

{
"name": "ibm-cloud-sdk-core",
"version": "0.2.8",
"version": "0.3.0",
"description": "Core functionality to support SDKs generated with IBM's OpenAPI 3 SDK Generator.",

@@ -64,2 +64,3 @@ "main": "./index",

"isstream": "~0.1.2",
"jsonwebtoken": "^8.5.1",
"mime-types": "~2.1.18",

@@ -66,0 +67,0 @@ "object.omit": "~3.0.0",

@@ -20,2 +20,15 @@ # node-sdk-core

## Authentication Types
There are several flavors of authentication supported in this package. To specify the intended authentication pattern to use, the user can pass in the parameter `authentication_type`. This parameter is optional, but it may become required in a future major release. The options for this parameter are `basic`, `iam`, and `icp4d`.
### basic
This indicates Basic Auth is to be used. Users will pass in a `username` and `password` and the SDK will generate a Basic Auth header to send with requests to the service.
### iam
This indicates that IAM token authentication is to be used. Users can pass in an `iam_apikey` or an `iam_access_token`. If an API key is used, the SDK will manage the token for the user. In either case, the SDK will generate a Bearer Auth header to send with requests to the service.
### icp4d
This indicates that the service is an instance of ICP4D, which has its own version of token authentication. Users can pass in a `username` and `password`, or an `icp4d_access_token`. If a username and password is given, the SDK will manage the token for the user.
A `url` is **required** for this type. In order to use an SDK-managed token with ICP4D authentication, this option **must** be passed in.
## Available Modules

@@ -26,4 +39,7 @@ ### BaseService

### IamTokenManagerV1
This Class contains logic for managing an IAM token over its lifetime. Tokens can be requested or set manually. When requested, the token manager will either return the current token, request a new token or refresh the current token if it is expired. If a token is manually set, it must be managed by the user.
This Class contains logic for managing an IAM token over its lifetime. Tokens can be requested or set manually. When requested, the token manager will either return the current token or request a new token if one is not saved or the the current token is expired. If a token is manually set, it must be managed by the user.
### Icp4dTokenManagerV1
This Class is similar in function to IamTokenManagerV1. The only difference is that the `url` parameter is required, it takes a `username` and `password` instead of an API key, and manages tokens for instances of ICP4D. To use this token manager in an SDK, the parameter `authentication_type` must be set to `icp4d` in the constructor.
### isFileParam

@@ -30,0 +46,0 @@ This function takes an Object and returns `true` if the object is a Stream, a Buffer, has a `value` property, or has a `data` property that is a file param (checked recursively).

@@ -61,4 +61,5 @@ {

"./iam-token-manager/*.ts",
"./auth/*.ts",
"index.ts"
]
}

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

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