ibm-cloud-sdk-core 3.2.2-beta-5 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cra/.cveignore +2 -0
- package/.secrets.baseline +542 -0
- package/Authentication.md +525 -0
- package/CHANGELOG.md +682 -0
- package/LICENSE.md +201 -0
- package/MIGRATION-V1.md +42 -0
- package/README.md +116 -0
- package/api-extractor.json +39 -0
- package/appscan-config.xml +7 -0
- package/auth/authenticators/authenticator.js +0 -1
- package/auth/authenticators/basic-authenticator.d.ts +1 -1
- package/auth/authenticators/basic-authenticator.js +4 -7
- package/auth/authenticators/bearer-token-authenticator.d.ts +1 -1
- package/auth/authenticators/bearer-token-authenticator.js +4 -7
- package/auth/authenticators/cloud-pak-for-data-authenticator.js +1 -4
- package/auth/authenticators/container-authenticator.js +1 -4
- package/auth/authenticators/iam-authenticator.js +2 -5
- package/auth/authenticators/iam-request-based-authenticator.js +1 -4
- package/auth/authenticators/index.js +10 -11
- package/auth/authenticators/no-auth-authenticator.js +1 -4
- package/auth/authenticators/token-request-based-authenticator.d.ts +1 -1
- package/auth/authenticators/token-request-based-authenticator.js +3 -6
- package/auth/authenticators/vpc-instance-authenticator.js +1 -4
- package/auth/index.js +6 -17
- package/auth/token-managers/container-token-manager.js +5 -8
- package/auth/token-managers/cp4d-token-manager.js +3 -6
- package/auth/token-managers/iam-request-based-token-manager.js +6 -9
- package/auth/token-managers/iam-token-manager.js +2 -5
- package/auth/token-managers/index.js +7 -8
- package/auth/token-managers/jwt-token-manager.d.ts +1 -1
- package/auth/token-managers/jwt-token-manager.js +2 -5
- package/auth/token-managers/token-manager.d.ts +1 -1
- package/auth/token-managers/token-manager.js +4 -5
- package/auth/token-managers/vpc-instance-token-manager.js +9 -12
- package/auth/utils/file-reading-helpers.browser.js +0 -1
- package/auth/utils/file-reading-helpers.js +11 -12
- package/auth/utils/get-authenticator-from-environment.js +2 -3
- package/auth/utils/helpers.js +4 -5
- package/auth/utils/index.js +7 -19
- package/auth/utils/read-external-sources.js +5 -6
- package/build/docs/ibm-cloud-sdk-core.atleastone.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.atmostone.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_basic.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_bearertoken.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_container.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_cp4d.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_iam.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_noauth.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_unknown.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_vpc.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.md +41 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.md +21 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.baseoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_name.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.disableretries.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.enableretries.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.getauthenticator.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.gethttpclient.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.md +44 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authheader.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.md +39 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +39 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +38 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.computebasicauthheader.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.constructfilepath.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +40 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +30 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.contenttype.md +14 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +35 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileexistsatpath.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.options.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.value.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileoptions.contenttype.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileoptions.filename.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileoptions.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.filestream.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.filestream.path.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.contenttype.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.data.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.filename.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.getformat.md +29 -0
- package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +29 -0
- package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +30 -0
- package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +31 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +38 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.clientid.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.clientsecret.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.md +38 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +25 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.formdata.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +38 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.refreshtoken.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.savetokeninfo.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientid.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientsecret.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.md +23 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.isemptyobject.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.isfiledata.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.isfilewithmetadata.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.ishtml.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +35 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokeninfo.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokenname.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanageroptions.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.md +96 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticate.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.onlyone.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.qs.md +21 -0
- package/build/docs/ibm-cloud-sdk-core.readcredentialsfile.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.readcrtokenfile.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.removesuffix.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.debug.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.error.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.info.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.verbose.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.warn.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.streamtopromise.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.accesstoken.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.disablesslverification.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.expiretime.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.gettoken.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.headers.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +43 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.pacedrequesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.refreshtime.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.requestwrapperinstance.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.savetokeninfo.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanageroptions.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.disablesslverification.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.headers.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +42 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkuserheader.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.expecttobepromise.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.getoptions.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.authenticator.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.disablesslverification.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.headers.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.jar.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.serviceurl.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.url.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.version.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.validateinput.md +23 -0
- package/build/docs/ibm-cloud-sdk-core.validateparams.md +30 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +39 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +29 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +24 -0
- package/build/docs/index.md +12 -0
- package/docs/ibm-cloud-sdk-core.api.json +2 -2
- package/es/auth/authenticators/authenticator-interface.js +0 -1
- package/es/auth/authenticators/basic-authenticator.d.ts +1 -1
- package/es/auth/authenticators/bearer-token-authenticator.d.ts +1 -1
- package/es/auth/authenticators/token-request-based-authenticator.d.ts +1 -1
- package/es/auth/token-managers/jwt-token-manager.d.ts +1 -1
- package/es/auth/token-managers/token-manager.d.ts +1 -1
- package/es/lib/request-wrapper.d.ts +1 -1
- package/es/lib/request-wrapper.js +7 -9
- package/es/tsdoc-metadata.json +11 -0
- package/etc/ibm-cloud-sdk-core.api.md +483 -0
- package/iamtest.env +3 -0
- package/index.js +12 -32
- package/lib/base-service.js +6 -7
- package/lib/content-type.js +1 -1
- package/lib/get-new-logger.js +5 -6
- package/lib/helper.js +19 -22
- package/lib/logger.js +1 -1
- package/lib/querystring.js +1 -1
- package/lib/request-wrapper.d.ts +1 -1
- package/lib/request-wrapper.js +31 -52
- package/lib/sdk-test-helpers.browser.js +0 -1
- package/lib/sdk-test-helpers.js +7 -8
- package/lib/stream-to-promise.js +0 -1
- package/package.json +7 -40
- package/temp/ibm-cloud-sdk-core.api.json +7571 -0
- package/temp/ibm-cloud-sdk-core.api.md +483 -0
- package/tsconfig-es6.json +9 -0
- package/es/lib/cookie-support.d.ts +0 -23
- package/es/lib/cookie-support.js +0 -86
- package/lib/cookie-support.d.ts +0 -23
- package/lib/cookie-support.js +0 -141
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.getAuthenticatorFromEnvironment = void 0;
|
|
19
18
|
var authenticators_1 = require("../authenticators");
|
|
20
19
|
var read_external_sources_1 = require("./read-external-sources");
|
|
21
20
|
/**
|
|
@@ -34,7 +33,7 @@ function getAuthenticatorFromEnvironment(serviceName) {
|
|
|
34
33
|
throw new Error('Service name is required.');
|
|
35
34
|
}
|
|
36
35
|
// construct the credentials object from the environment
|
|
37
|
-
var credentials =
|
|
36
|
+
var credentials = read_external_sources_1.readExternalSources(serviceName);
|
|
38
37
|
if (credentials === null) {
|
|
39
38
|
throw new Error('Unable to create an authenticator from the environment.');
|
|
40
39
|
}
|
|
@@ -88,7 +87,7 @@ function getAuthenticatorFromEnvironment(serviceName) {
|
|
|
88
87
|
authenticator = new authenticators_1.VpcInstanceAuthenticator(credentials);
|
|
89
88
|
}
|
|
90
89
|
else {
|
|
91
|
-
throw new Error("Invalid value for AUTH_TYPE: "
|
|
90
|
+
throw new Error("Invalid value for AUTH_TYPE: " + authType);
|
|
92
91
|
}
|
|
93
92
|
return authenticator;
|
|
94
93
|
}
|
package/auth/utils/helpers.js
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.atMostOne = exports.atLeastOne = exports.removeSuffix = exports.onlyOne = exports.getCurrentTime = exports.validateInput = exports.checkCredentials = exports.computeBasicAuthHeader = void 0;
|
|
19
18
|
var helper_1 = require("../../lib/helper");
|
|
20
19
|
/**
|
|
21
20
|
* Compute and return a Basic Authorization header from a username and password.
|
|
@@ -25,8 +24,8 @@ var helper_1 = require("../../lib/helper");
|
|
|
25
24
|
* @returns {string} - A Basic Auth header with format "Basic <encoded-credentials>"
|
|
26
25
|
*/
|
|
27
26
|
function computeBasicAuthHeader(username, password) {
|
|
28
|
-
var encodedCreds = Buffer.from(
|
|
29
|
-
return "Basic "
|
|
27
|
+
var encodedCreds = Buffer.from(username + ":" + password).toString('base64');
|
|
28
|
+
return "Basic " + encodedCreds;
|
|
30
29
|
}
|
|
31
30
|
exports.computeBasicAuthHeader = computeBasicAuthHeader;
|
|
32
31
|
// returns true if the string has a curly bracket or quote as the first or last character
|
|
@@ -45,7 +44,7 @@ function checkCredentials(obj, credsToCheck) {
|
|
|
45
44
|
var errorMessage = '';
|
|
46
45
|
credsToCheck.forEach(function (cred) {
|
|
47
46
|
if (obj[cred] && badCharAtAnEnd(obj[cred])) {
|
|
48
|
-
errorMessage += "The "
|
|
47
|
+
errorMessage += "The " + cred + " shouldn't start or end with curly brackets or quotes. Be sure to remove any {, }, or \"";
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
if (errorMessage.length) {
|
|
@@ -62,7 +61,7 @@ exports.checkCredentials = checkCredentials;
|
|
|
62
61
|
*/
|
|
63
62
|
function validateInput(options, requiredOptions) {
|
|
64
63
|
// check for required params
|
|
65
|
-
var missingParamsError =
|
|
64
|
+
var missingParamsError = helper_1.getMissingParams(options, requiredOptions);
|
|
66
65
|
if (missingParamsError) {
|
|
67
66
|
throw missingParamsError;
|
|
68
67
|
}
|
package/auth/utils/index.js
CHANGED
|
@@ -14,22 +14,10 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
-
};
|
|
17
|
+
function __export(m) {
|
|
18
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
19
|
+
}
|
|
31
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.readExternalSources = exports.getAuthenticatorFromEnvironment = void 0;
|
|
33
21
|
/**
|
|
34
22
|
* @module utils
|
|
35
23
|
* Helper functions used by generated SDKs.
|
|
@@ -38,9 +26,9 @@ exports.readExternalSources = exports.getAuthenticatorFromEnvironment = void 0;
|
|
|
38
26
|
* getAuthenticatorFromEnvironment: Get authenticator from external sources.
|
|
39
27
|
* readExternalSources: Get config object from external sources.
|
|
40
28
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
__export(require("./helpers"));
|
|
30
|
+
__export(require("./file-reading-helpers"));
|
|
43
31
|
var get_authenticator_from_environment_1 = require("./get-authenticator-from-environment");
|
|
44
|
-
|
|
32
|
+
exports.getAuthenticatorFromEnvironment = get_authenticator_from_environment_1.getAuthenticatorFromEnvironment;
|
|
45
33
|
var read_external_sources_1 = require("./read-external-sources");
|
|
46
|
-
|
|
34
|
+
exports.readExternalSources = read_external_sources_1.readExternalSources;
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.readExternalSources = void 0;
|
|
8
7
|
/**
|
|
9
8
|
* (C) Copyright IBM Corp. 2019, 2021.
|
|
10
9
|
*
|
|
@@ -47,11 +46,11 @@ function getProperties(serviceName) {
|
|
|
47
46
|
// 3. VCAP Services (Cloud Foundry)
|
|
48
47
|
// only get properties from one source, return null if none found
|
|
49
48
|
var properties = null;
|
|
50
|
-
properties = filterPropertiesByServiceName(
|
|
51
|
-
if (
|
|
49
|
+
properties = filterPropertiesByServiceName(file_reading_helpers_1.readCredentialsFile(), serviceName);
|
|
50
|
+
if (lodash_isempty_1.default(properties)) {
|
|
52
51
|
properties = filterPropertiesByServiceName(process.env, serviceName);
|
|
53
52
|
}
|
|
54
|
-
if (
|
|
53
|
+
if (lodash_isempty_1.default(properties)) {
|
|
55
54
|
properties = getPropertiesFromVCAP(serviceName);
|
|
56
55
|
}
|
|
57
56
|
return properties;
|
|
@@ -69,11 +68,11 @@ function getProperties(serviceName) {
|
|
|
69
68
|
*/
|
|
70
69
|
function filterPropertiesByServiceName(envObj, serviceName) {
|
|
71
70
|
var credentials = {};
|
|
72
|
-
var name =
|
|
71
|
+
var name = serviceName.toUpperCase().replace(/-/g, '_') + "_"; // append the underscore that must follow the service name
|
|
73
72
|
// filter out properties that don't begin with the service name
|
|
74
73
|
Object.keys(envObj).forEach(function (key) {
|
|
75
74
|
if (key.startsWith(name)) {
|
|
76
|
-
var propName =
|
|
75
|
+
var propName = camelcase_1.default(key.substring(name.length)); // remove the name from the front of the string and make camelcase
|
|
77
76
|
credentials[propName] = envObj[key];
|
|
78
77
|
}
|
|
79
78
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [atLeastOne](./ibm-cloud-sdk-core.atleastone.md)
|
|
4
|
+
|
|
5
|
+
## atLeastOne() function
|
|
6
|
+
|
|
7
|
+
Check for at least one of two elements being defined. Returns true if a or b is defined. Returns false if both are undefined.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function atLeastOne(a: any, b: any): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| a | any | The first object |
|
|
20
|
+
| b | any | The second object |
|
|
21
|
+
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
boolean
|
|
25
|
+
|
|
26
|
+
{<!-- -->boolean<!-- -->}
|
|
27
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [atMostOne](./ibm-cloud-sdk-core.atmostone.md)
|
|
4
|
+
|
|
5
|
+
## atMostOne() function
|
|
6
|
+
|
|
7
|
+
Verify that both properties are not specified. Returns true if only a, only b, or neither is defined. Returns false if both are defined.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function atMostOne(a: any, b: any): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| a | any | The first object |
|
|
20
|
+
| b | any | The second object |
|
|
21
|
+
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
boolean
|
|
25
|
+
|
|
26
|
+
{<!-- -->boolean<!-- -->}
|
|
27
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [(constructor)](./ibm-cloud-sdk-core.authenticator._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.(constructor)
|
|
6
|
+
|
|
7
|
+
Create a new Authenticator instance.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
constructor();
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Exceptions
|
|
16
|
+
|
|
17
|
+
{<!-- -->Error<!-- -->} The `new` keyword was not used to create construct the authenticator.
|
|
18
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [authenticate](./ibm-cloud-sdk-core.authenticator.authenticate.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.authenticate() method
|
|
6
|
+
|
|
7
|
+
Augment the request with authentication information.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| requestOptions | AuthenticateOptions | The request to augment with authentication information. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
Promise<void>
|
|
24
|
+
|
|
25
|
+
## Exceptions
|
|
26
|
+
|
|
27
|
+
{<!-- -->Error<!-- -->} - The authenticate method was not implemented by a subclass.
|
|
28
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [authenticationType](./ibm-cloud-sdk-core.authenticator.authenticationtype.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.authenticationType() method
|
|
6
|
+
|
|
7
|
+
Retrieves the authenticator's type. The returned value will be the same string that is used when configuring an instance of the authenticator with the "<!-- --><<!-- -->service\_name<!-- -->><!-- -->\_AUTH\_TYPE" configuration property (e.g. "basic", "iam", etc.). This function should be overridden in each authenticator implementation class that extends this class.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
authenticationType(): string;
|
|
13
|
+
```
|
|
14
|
+
<b>Returns:</b>
|
|
15
|
+
|
|
16
|
+
string
|
|
17
|
+
|
|
18
|
+
a string that indicates the authenticator's type
|
|
19
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_BASIC](./ibm-cloud-sdk-core.authenticator.authtype_basic.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_BASIC property
|
|
6
|
+
|
|
7
|
+
Constants that define the various authenticator types.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static AUTHTYPE_BASIC: string;
|
|
13
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_BEARERTOKEN](./ibm-cloud-sdk-core.authenticator.authtype_bearertoken.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_BEARERTOKEN property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static AUTHTYPE_BEARERTOKEN: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_CONTAINER](./ibm-cloud-sdk-core.authenticator.authtype_container.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_CONTAINER property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static AUTHTYPE_CONTAINER: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_CP4D](./ibm-cloud-sdk-core.authenticator.authtype_cp4d.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_CP4D property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static AUTHTYPE_CP4D: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_IAM](./ibm-cloud-sdk-core.authenticator.authtype_iam.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_IAM property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static AUTHTYPE_IAM: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_NOAUTH](./ibm-cloud-sdk-core.authenticator.authtype_noauth.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_NOAUTH property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static AUTHTYPE_NOAUTH: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_UNKNOWN](./ibm-cloud-sdk-core.authenticator.authtype_unknown.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_UNKNOWN property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static AUTHTYPE_UNKNOWN: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_VPC](./ibm-cloud-sdk-core.authenticator.authtype_vpc.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_VPC property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static AUTHTYPE_VPC: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator class
|
|
6
|
+
|
|
7
|
+
Base Authenticator class for other Authenticators to extend. Not intended to be used as a stand-alone authenticator.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class Authenticator implements AuthenticatorInterface
|
|
13
|
+
```
|
|
14
|
+
<b>Implements:</b> [AuthenticatorInterface](./ibm-cloud-sdk-core.authenticatorinterface.md)
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
| Constructor | Modifiers | Description |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| [(constructor)()](./ibm-cloud-sdk-core.authenticator._constructor_.md) | | Create a new Authenticator instance. |
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
| Property | Modifiers | Type | Description |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| [AUTHTYPE\_BASIC](./ibm-cloud-sdk-core.authenticator.authtype_basic.md) | <code>static</code> | string | Constants that define the various authenticator types. |
|
|
27
|
+
| [AUTHTYPE\_BEARERTOKEN](./ibm-cloud-sdk-core.authenticator.authtype_bearertoken.md) | <code>static</code> | string | |
|
|
28
|
+
| [AUTHTYPE\_CONTAINER](./ibm-cloud-sdk-core.authenticator.authtype_container.md) | <code>static</code> | string | |
|
|
29
|
+
| [AUTHTYPE\_CP4D](./ibm-cloud-sdk-core.authenticator.authtype_cp4d.md) | <code>static</code> | string | |
|
|
30
|
+
| [AUTHTYPE\_IAM](./ibm-cloud-sdk-core.authenticator.authtype_iam.md) | <code>static</code> | string | |
|
|
31
|
+
| [AUTHTYPE\_NOAUTH](./ibm-cloud-sdk-core.authenticator.authtype_noauth.md) | <code>static</code> | string | |
|
|
32
|
+
| [AUTHTYPE\_UNKNOWN](./ibm-cloud-sdk-core.authenticator.authtype_unknown.md) | <code>static</code> | string | |
|
|
33
|
+
| [AUTHTYPE\_VPC](./ibm-cloud-sdk-core.authenticator.authtype_vpc.md) | <code>static</code> | string | |
|
|
34
|
+
|
|
35
|
+
## Methods
|
|
36
|
+
|
|
37
|
+
| Method | Modifiers | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| [authenticate(requestOptions)](./ibm-cloud-sdk-core.authenticator.authenticate.md) | | Augment the request with authentication information. |
|
|
40
|
+
| [authenticationType()](./ibm-cloud-sdk-core.authenticator.authenticationtype.md) | | Retrieves the authenticator's type. The returned value will be the same string that is used when configuring an instance of the authenticator with the "<!-- --><<!-- -->service\_name<!-- -->><!-- -->\_AUTH\_TYPE" configuration property (e.g. "basic", "iam", etc.). This function should be overridden in each authenticator implementation class that extends this class. |
|
|
41
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [AuthenticatorInterface](./ibm-cloud-sdk-core.authenticatorinterface.md) > [authenticate](./ibm-cloud-sdk-core.authenticatorinterface.authenticate.md)
|
|
4
|
+
|
|
5
|
+
## AuthenticatorInterface.authenticate() method
|
|
6
|
+
|
|
7
|
+
Add authentication information to the specified request.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| requestOptions | AuthenticateOptions | The request to augment with authentication information. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
Promise<void>
|
|
24
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [AuthenticatorInterface](./ibm-cloud-sdk-core.authenticatorinterface.md) > [authenticationType](./ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md)
|
|
4
|
+
|
|
5
|
+
## AuthenticatorInterface.authenticationType() method
|
|
6
|
+
|
|
7
|
+
Returns a string that indicates the authentication type.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
authenticationType(): string;
|
|
13
|
+
```
|
|
14
|
+
<b>Returns:</b>
|
|
15
|
+
|
|
16
|
+
string
|
|
17
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [AuthenticatorInterface](./ibm-cloud-sdk-core.authenticatorinterface.md)
|
|
4
|
+
|
|
5
|
+
## AuthenticatorInterface interface
|
|
6
|
+
|
|
7
|
+
This interface defines the common methods associated with an Authenticator implementation.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface AuthenticatorInterface
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [authenticate(requestOptions)](./ibm-cloud-sdk-core.authenticatorinterface.authenticate.md) | Add authentication information to the specified request. |
|
|
20
|
+
| [authenticationType()](./ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md) | Returns a string that indicates the authentication type. |
|
|
21
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [(constructor)](./ibm-cloud-sdk-core.baseservice._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.(constructor)
|
|
6
|
+
|
|
7
|
+
Configuration values for a service.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
constructor(userOptions: UserOptions);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| userOptions | [UserOptions](./ibm-cloud-sdk-core.useroptions.md) | |
|
|
20
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [baseOptions](./ibm-cloud-sdk-core.baseservice.baseoptions.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.baseOptions property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected baseOptions: BaseServiceOptions;
|
|
11
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [configureService](./ibm-cloud-sdk-core.baseservice.configureservice.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.configureService() method
|
|
6
|
+
|
|
7
|
+
Configure the service using external configuration
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
protected configureService(serviceName: string): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| serviceName | string | The name of the service. Will be used to read from external configuration. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [createRequest](./ibm-cloud-sdk-core.baseservice.createrequest.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.createRequest() method
|
|
6
|
+
|
|
7
|
+
Wrapper around `sendRequest` that enforces the request will be authenticated.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
protected createRequest(parameters: any): Promise<any>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| parameters | any | Service request options passed in by user. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
Promise<any>
|
|
24
|
+
|
|
25
|
+
{<!-- -->Promise<any>}
|
|
26
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [DEFAULT\_SERVICE\_NAME](./ibm-cloud-sdk-core.baseservice.default_service_name.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.DEFAULT\_SERVICE\_NAME property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static DEFAULT_SERVICE_NAME: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [DEFAULT\_SERVICE\_URL](./ibm-cloud-sdk-core.baseservice.default_service_url.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.DEFAULT\_SERVICE\_URL property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static DEFAULT_SERVICE_URL: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [disableRetries](./ibm-cloud-sdk-core.baseservice.disableretries.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.disableRetries() method
|
|
6
|
+
|
|
7
|
+
Disables retries.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
disableRetries(): void;
|
|
13
|
+
```
|
|
14
|
+
<b>Returns:</b>
|
|
15
|
+
|
|
16
|
+
void
|
|
17
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [enableRetries](./ibm-cloud-sdk-core.baseservice.enableretries.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.enableRetries() method
|
|
6
|
+
|
|
7
|
+
Enable retries for unfulfilled requests.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
enableRetries(retryOptions?: RetryOptions): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| retryOptions | RetryOptions | <i>(Optional)</i> configuration for retries |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [BaseService](./ibm-cloud-sdk-core.baseservice.md) > [getAuthenticator](./ibm-cloud-sdk-core.baseservice.getauthenticator.md)
|
|
4
|
+
|
|
5
|
+
## BaseService.getAuthenticator() method
|
|
6
|
+
|
|
7
|
+
Get the instance of the authenticator set on the service.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getAuthenticator(): any;
|
|
13
|
+
```
|
|
14
|
+
<b>Returns:</b>
|
|
15
|
+
|
|
16
|
+
any
|
|
17
|
+
|
|
18
|
+
{<!-- -->Authenticator<!-- -->}
|
|
19
|
+
|