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
package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.disablesslverification.md
ADDED
|
@@ -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) > [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md) > [disableSslVerification](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.disablesslverification.md)
|
|
4
|
+
|
|
5
|
+
## TokenRequestBasedAuthenticator.disableSslVerification property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected disableSslVerification: boolean;
|
|
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) > [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md) > [headers](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.headers.md)
|
|
4
|
+
|
|
5
|
+
## TokenRequestBasedAuthenticator.headers property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected headers: OutgoingHttpHeaders;
|
|
11
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
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) > [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md)
|
|
4
|
+
|
|
5
|
+
## TokenRequestBasedAuthenticator class
|
|
6
|
+
|
|
7
|
+
Class for common functionality shared by token-request authenticators. \[\[TokenRequestBasedAuthenticator\]\]s use token managers to retrieve, store, and refresh tokens. Not intended to be used as stand-alone authenticator, but as parent class to authenticators that have their own token manager implementations.
|
|
8
|
+
|
|
9
|
+
The tokens will be added as an Authorization headers in the form:
|
|
10
|
+
|
|
11
|
+
Authorization: Bearer <bearer-token>
|
|
12
|
+
|
|
13
|
+
<b>Signature:</b>
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
export declare class TokenRequestBasedAuthenticator extends Authenticator
|
|
17
|
+
```
|
|
18
|
+
<b>Extends:</b> [Authenticator](./ibm-cloud-sdk-core.authenticator.md)
|
|
19
|
+
|
|
20
|
+
## Constructors
|
|
21
|
+
|
|
22
|
+
| Constructor | Modifiers | Description |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| [(constructor)(options)](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md) | | Create a new \[\[TokenRequestBasedAuthenticator\]\] instance with an internal \[\[JwtTokenManager\]\]. |
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Property | Modifiers | Type | Description |
|
|
29
|
+
| --- | --- | --- | --- |
|
|
30
|
+
| [disableSslVerification](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.disablesslverification.md) | | boolean | |
|
|
31
|
+
| [headers](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.headers.md) | | OutgoingHttpHeaders | |
|
|
32
|
+
| [tokenManager](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.tokenmanager.md) | | [JwtTokenManager](./ibm-cloud-sdk-core.jwttokenmanager.md) | |
|
|
33
|
+
| [url](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.url.md) | | string | |
|
|
34
|
+
|
|
35
|
+
## Methods
|
|
36
|
+
|
|
37
|
+
| Method | Modifiers | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| [authenticate(requestOptions)](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md) | | Adds bearer token information to <code>request</code>. The bearer token information will be set in the Authorization property of<code>request.headers</code> in the form:<!-- -->Authorization: Bearer <bearer-token> |
|
|
40
|
+
| [setDisableSslVerification(value)](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md) | | Set the flag that indicates whether verification of the server's SSL certificate should be disabled or not. |
|
|
41
|
+
| [setHeaders(headers)](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md) | | Set headers. |
|
|
42
|
+
|
package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md
ADDED
|
@@ -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) > [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md) > [setDisableSslVerification](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md)
|
|
4
|
+
|
|
5
|
+
## TokenRequestBasedAuthenticator.setDisableSslVerification() method
|
|
6
|
+
|
|
7
|
+
Set the flag that indicates whether verification of the server's SSL certificate should be disabled or not.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setDisableSslVerification(value: boolean): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| value | boolean | A flag that indicates whether verification of the token server's SSL certificate should be disabled or not. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -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) > [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md) > [setHeaders](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md)
|
|
4
|
+
|
|
5
|
+
## TokenRequestBasedAuthenticator.setHeaders() method
|
|
6
|
+
|
|
7
|
+
Set headers.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setHeaders(headers: OutgoingHttpHeaders): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| headers | OutgoingHttpHeaders | Default headers to be sent with every Cloud Pak For Data token request. Overwrites previous default headers. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -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) > [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md) > [tokenManager](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.tokenmanager.md)
|
|
4
|
+
|
|
5
|
+
## TokenRequestBasedAuthenticator.tokenManager property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected tokenManager: JwtTokenManager;
|
|
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) > [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md) > [url](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.url.md)
|
|
4
|
+
|
|
5
|
+
## TokenRequestBasedAuthenticator.url property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected url: string;
|
|
11
|
+
```
|
|
@@ -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) > [toLowerKeys](./ibm-cloud-sdk-core.tolowerkeys.md)
|
|
4
|
+
|
|
5
|
+
## toLowerKeys() function
|
|
6
|
+
|
|
7
|
+
This function converts an object's keys to lower case. note: does not convert nested keys
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function toLowerKeys(obj: Object): Object;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| obj | Object | The object to convert the keys of. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
Object
|
|
24
|
+
|
|
25
|
+
{<!-- -->Object<!-- -->}
|
|
26
|
+
|
|
@@ -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) > [unitTestUtils](./ibm-cloud-sdk-core.unittestutils.md) > [checkForSuccessfulExecution](./ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md)
|
|
4
|
+
|
|
5
|
+
## unitTestUtils.checkForSuccessfulExecution() function
|
|
6
|
+
|
|
7
|
+
This method simply ensures that the method executed without any issues by extracting the argument from the mock object for the `createRequest` method and verifying that it is an object.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function checkForSuccessfulExecution(createRequestMock: any): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| createRequestMock | any | the jest mock object for the <code>createRequest</code> method in the <code>RequestWrapper</code> class |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
25
|
+
{<!-- -->void<!-- -->}
|
|
26
|
+
|
|
@@ -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) > [unitTestUtils](./ibm-cloud-sdk-core.unittestutils.md) > [checkMediaHeaders](./ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md)
|
|
4
|
+
|
|
5
|
+
## unitTestUtils.checkMediaHeaders() function
|
|
6
|
+
|
|
7
|
+
Takes the mock object for the `createRequest` method, extracts the headers that were sent with the call, and checks for the expected values for `Accept` and `Content-Type`<!-- -->. This to verify that the SDK sets the correct values in the code.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function checkMediaHeaders(createRequestMock: any, accept: string, contentType: string): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| createRequestMock | any | the jest mock object for the <code>createRequest</code> method in the <code>RequestWrapper</code> class |
|
|
20
|
+
| accept | string | the expected value for the <code>Accept</code> header |
|
|
21
|
+
| contentType | string | the expected value for the <code>Content-Type</code> header |
|
|
22
|
+
|
|
23
|
+
<b>Returns:</b>
|
|
24
|
+
|
|
25
|
+
void
|
|
26
|
+
|
|
27
|
+
{<!-- -->void<!-- -->}
|
|
28
|
+
|
|
@@ -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) > [unitTestUtils](./ibm-cloud-sdk-core.unittestutils.md) > [checkUrlAndMethod](./ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md)
|
|
4
|
+
|
|
5
|
+
## unitTestUtils.checkUrlAndMethod() function
|
|
6
|
+
|
|
7
|
+
Takes the request options constructed by the SDK and checks that the `url` and `method` properties were set to their correct values.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function checkUrlAndMethod(options: any, url: string, method: any): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| options | any | the options object put together by the SDK, retrieved from the createRequest mock |
|
|
20
|
+
| url | string | The URL path of the service endpoint, from the paths section of the API definition |
|
|
21
|
+
| method | any | |
|
|
22
|
+
|
|
23
|
+
<b>Returns:</b>
|
|
24
|
+
|
|
25
|
+
void
|
|
26
|
+
|
|
27
|
+
{<!-- -->void<!-- -->}
|
|
28
|
+
|
|
@@ -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) > [unitTestUtils](./ibm-cloud-sdk-core.unittestutils.md) > [checkUserHeader](./ibm-cloud-sdk-core.unittestutils.checkuserheader.md)
|
|
4
|
+
|
|
5
|
+
## unitTestUtils.checkUserHeader() function
|
|
6
|
+
|
|
7
|
+
Takes the mock object for the `createRequest` method, extracts the headers that were sent with the call, and checks for the expected value for a user-defined header. This is verify that the SDK accepts header parameters and sends them as headers in the request.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function checkUserHeader(createRequestMock: any, userHeaderName: string, userHeaderValue: string): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| createRequestMock | any | the jest mock object for the <code>createRequest</code> method in the <code>RequestWrapper</code> class |
|
|
20
|
+
| userHeaderName | string | the name of the header passed by the user, e.g. <code>Contained-Content-Type</code> |
|
|
21
|
+
| userHeaderValue | string | the expected value for the header passed by the user |
|
|
22
|
+
|
|
23
|
+
<b>Returns:</b>
|
|
24
|
+
|
|
25
|
+
void
|
|
26
|
+
|
|
27
|
+
{<!-- -->void<!-- -->}
|
|
28
|
+
|
|
@@ -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) > [unitTestUtils](./ibm-cloud-sdk-core.unittestutils.md) > [expectToBePromise](./ibm-cloud-sdk-core.unittestutils.expecttobepromise.md)
|
|
4
|
+
|
|
5
|
+
## unitTestUtils.expectToBePromise() function
|
|
6
|
+
|
|
7
|
+
This method simply ensures that the SDK methods return Promises by checking for the `then` function - common way to assess whether or not an object is a Promise.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function expectToBePromise(sdkPromise: any): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| sdkPromise | any | the Promise returned by an SDK method |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
25
|
+
{<!-- -->void<!-- -->}
|
|
26
|
+
|
|
@@ -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) > [unitTestUtils](./ibm-cloud-sdk-core.unittestutils.md) > [getOptions](./ibm-cloud-sdk-core.unittestutils.getoptions.md)
|
|
4
|
+
|
|
5
|
+
## unitTestUtils.getOptions() function
|
|
6
|
+
|
|
7
|
+
This method extracts the `options` property from the object passed into `createRequest`<!-- -->. This property is an object containing all of the SDK method-specific information (like `path` and `body`<!-- -->) used to build a request. This method is just a convenience method for the unit tests to be able to make assertions on the items in the request.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getOptions(createRequestMock: any): any;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| createRequestMock | any | the jest mock object for the <code>createRequest</code> method in the <code>RequestWrapper</code> class |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
any
|
|
24
|
+
|
|
25
|
+
{<!-- -->Object<!-- -->}
|
|
26
|
+
|
|
@@ -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) > [unitTestUtils](./ibm-cloud-sdk-core.unittestutils.md)
|
|
4
|
+
|
|
5
|
+
## unitTestUtils namespace
|
|
6
|
+
|
|
7
|
+
## Functions
|
|
8
|
+
|
|
9
|
+
| Function | Description |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [checkForSuccessfulExecution(createRequestMock)](./ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md) | This method simply ensures that the method executed without any issues by extracting the argument from the mock object for the <code>createRequest</code> method and verifying that it is an object. |
|
|
12
|
+
| [checkMediaHeaders(createRequestMock, accept, contentType)](./ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md) | Takes the mock object for the <code>createRequest</code> method, extracts the headers that were sent with the call, and checks for the expected values for <code>Accept</code> and <code>Content-Type</code>. This to verify that the SDK sets the correct values in the code. |
|
|
13
|
+
| [checkUrlAndMethod(options, url, method)](./ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md) | Takes the request options constructed by the SDK and checks that the <code>url</code> and <code>method</code> properties were set to their correct values. |
|
|
14
|
+
| [checkUserHeader(createRequestMock, userHeaderName, userHeaderValue)](./ibm-cloud-sdk-core.unittestutils.checkuserheader.md) | Takes the mock object for the <code>createRequest</code> method, extracts the headers that were sent with the call, and checks for the expected value for a user-defined header. This is verify that the SDK accepts header parameters and sends them as headers in the request. |
|
|
15
|
+
| [expectToBePromise(sdkPromise)](./ibm-cloud-sdk-core.unittestutils.expecttobepromise.md) | This method simply ensures that the SDK methods return Promises by checking for the <code>then</code> function - common way to assess whether or not an object is a Promise. |
|
|
16
|
+
| [getOptions(createRequestMock)](./ibm-cloud-sdk-core.unittestutils.getoptions.md) | This method extracts the <code>options</code> property from the object passed into <code>createRequest</code>. This property is an object containing all of the SDK method-specific information (like <code>path</code> and <code>body</code>) used to build a request. This method is just a convenience method for the unit tests to be able to make assertions on the items in the request. |
|
|
17
|
+
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md) > [authenticator](./ibm-cloud-sdk-core.useroptions.authenticator.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions.authenticator property
|
|
6
|
+
|
|
7
|
+
The Authenticator object used to authenticate requests to the service
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
authenticator?: AuthenticatorInterface;
|
|
13
|
+
```
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md) > [disableSslVerification](./ibm-cloud-sdk-core.useroptions.disablesslverification.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions.disableSslVerification property
|
|
6
|
+
|
|
7
|
+
Set to `true` to allow unauthorized requests - not recommended for production use.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
disableSslVerification?: boolean;
|
|
13
|
+
```
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md) > [headers](./ibm-cloud-sdk-core.useroptions.headers.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions.headers property
|
|
6
|
+
|
|
7
|
+
Default headers that shall be included with every request to the service.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
headers?: OutgoingHttpHeaders;
|
|
13
|
+
```
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md) > [jar](./ibm-cloud-sdk-core.useroptions.jar.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions.jar property
|
|
6
|
+
|
|
7
|
+
Set your own cookie jar object
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
jar?: CookieJar | boolean;
|
|
13
|
+
```
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions interface
|
|
6
|
+
|
|
7
|
+
Configuration values for a service.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface UserOptions
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
| Property | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| [authenticator?](./ibm-cloud-sdk-core.useroptions.authenticator.md) | [AuthenticatorInterface](./ibm-cloud-sdk-core.authenticatorinterface.md) | <i>(Optional)</i> The Authenticator object used to authenticate requests to the service |
|
|
20
|
+
| [disableSslVerification?](./ibm-cloud-sdk-core.useroptions.disablesslverification.md) | boolean | <i>(Optional)</i> Set to <code>true</code> to allow unauthorized requests - not recommended for production use. |
|
|
21
|
+
| [headers?](./ibm-cloud-sdk-core.useroptions.headers.md) | OutgoingHttpHeaders | <i>(Optional)</i> Default headers that shall be included with every request to the service. |
|
|
22
|
+
| [jar?](./ibm-cloud-sdk-core.useroptions.jar.md) | CookieJar \| boolean | <i>(Optional)</i> Set your own cookie jar object |
|
|
23
|
+
| [serviceUrl?](./ibm-cloud-sdk-core.useroptions.serviceurl.md) | string | <i>(Optional)</i> The base url to use when contacting the service. The base url may differ between IBM Cloud regions. |
|
|
24
|
+
| [url?](./ibm-cloud-sdk-core.useroptions.url.md) | string | <i>(Optional)</i> Deprecated. Use <code>serviceUrl</code> instead. |
|
|
25
|
+
| [version?](./ibm-cloud-sdk-core.useroptions.version.md) | string | <i>(Optional)</i> The API version date to use with the service, in "YYYY-MM-DD" format. |
|
|
26
|
+
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md) > [serviceUrl](./ibm-cloud-sdk-core.useroptions.serviceurl.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions.serviceUrl property
|
|
6
|
+
|
|
7
|
+
The base url to use when contacting the service. The base url may differ between IBM Cloud regions.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
serviceUrl?: string;
|
|
13
|
+
```
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md) > [url](./ibm-cloud-sdk-core.useroptions.url.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions.url property
|
|
6
|
+
|
|
7
|
+
Deprecated. Use `serviceUrl` instead.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
url?: string;
|
|
13
|
+
```
|
|
@@ -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) > [UserOptions](./ibm-cloud-sdk-core.useroptions.md) > [version](./ibm-cloud-sdk-core.useroptions.version.md)
|
|
4
|
+
|
|
5
|
+
## UserOptions.version property
|
|
6
|
+
|
|
7
|
+
The API version date to use with the service, in "YYYY-MM-DD" format.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
version?: string;
|
|
13
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
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) > [validateInput](./ibm-cloud-sdk-core.validateinput.md)
|
|
4
|
+
|
|
5
|
+
## validateInput() function
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
export declare function validateInput(options: any, requiredOptions: string[]): void;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| options | any | A configuration options object. |
|
|
18
|
+
| requiredOptions | string\[\] | The list of properties that must be specified. |
|
|
19
|
+
|
|
20
|
+
<b>Returns:</b>
|
|
21
|
+
|
|
22
|
+
void
|
|
23
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
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) > [validateParams](./ibm-cloud-sdk-core.validateparams.md)
|
|
4
|
+
|
|
5
|
+
## validateParams() function
|
|
6
|
+
|
|
7
|
+
Validates that "params" contains a value for each key listed in "requiredParams", and that each key contained in "params" is a valid key listed in "allParams". In essence, we want params to contain only valid keys and we want params to contain at least the required keys.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function validateParams(params: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}, requiredParams: string[], allParams: string[]): null | Error;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| params | { \[key: string\]: any; } | the "params" object passed into an operation containing method parameters. |
|
|
22
|
+
| requiredParams | string\[\] | the names of required parameters. If null, then the "required params" check is bypassed. |
|
|
23
|
+
| allParams | string\[\] | the names of all valid parameters. If null, then the "valid params" check is bypassed. |
|
|
24
|
+
|
|
25
|
+
<b>Returns:</b>
|
|
26
|
+
|
|
27
|
+
null \| Error
|
|
28
|
+
|
|
29
|
+
{<!-- -->Error\|null<!-- -->}
|
|
30
|
+
|
|
@@ -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) > [VpcInstanceAuthenticator](./ibm-cloud-sdk-core.vpcinstanceauthenticator.md) > [(constructor)](./ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## VpcInstanceAuthenticator.(constructor)
|
|
6
|
+
|
|
7
|
+
Create a new \[\[VpcInstanceAuthenticator\]\] instance.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
constructor(options: Options);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| options | Options | Configuration options for VpcInstance authentication. |
|
|
20
|
+
|
|
@@ -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) > [VpcInstanceAuthenticator](./ibm-cloud-sdk-core.vpcinstanceauthenticator.md) > [authenticationType](./ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md)
|
|
4
|
+
|
|
5
|
+
## VpcInstanceAuthenticator.authenticationType() method
|
|
6
|
+
|
|
7
|
+
Returns the authenticator's type ('vpc').
|
|
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,39 @@
|
|
|
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) > [VpcInstanceAuthenticator](./ibm-cloud-sdk-core.vpcinstanceauthenticator.md)
|
|
4
|
+
|
|
5
|
+
## VpcInstanceAuthenticator class
|
|
6
|
+
|
|
7
|
+
The \[\[VpcInstanceAuthenticator\]\] implements an authentication scheme in which it retrieves an "instance identity token" and exchanges that for an IAM access token using the VPC Instance Metadata Service API which is available on the local compute resource (VM). The instance identity token is similar to an IAM apikey, except that it is managed automatically by the compute resource provider (VPC).
|
|
8
|
+
|
|
9
|
+
The resulting IAM access token is then added to outbound requests in an Authorization header
|
|
10
|
+
|
|
11
|
+
Authorization: Bearer <access-token>
|
|
12
|
+
|
|
13
|
+
<b>Signature:</b>
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
export declare class VpcInstanceAuthenticator extends TokenRequestBasedAuthenticator
|
|
17
|
+
```
|
|
18
|
+
<b>Extends:</b> [TokenRequestBasedAuthenticator](./ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md)
|
|
19
|
+
|
|
20
|
+
## Constructors
|
|
21
|
+
|
|
22
|
+
| Constructor | Modifiers | Description |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| [(constructor)(options)](./ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md) | | Create a new \[\[VpcInstanceAuthenticator\]\] instance. |
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Property | Modifiers | Type | Description |
|
|
29
|
+
| --- | --- | --- | --- |
|
|
30
|
+
| [tokenManager](./ibm-cloud-sdk-core.vpcinstanceauthenticator.tokenmanager.md) | | [VpcInstanceTokenManager](./ibm-cloud-sdk-core.vpcinstancetokenmanager.md) | |
|
|
31
|
+
|
|
32
|
+
## Methods
|
|
33
|
+
|
|
34
|
+
| Method | Modifiers | Description |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| [authenticationType()](./ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md) | | Returns the authenticator's type ('vpc'). |
|
|
37
|
+
| [setIamProfileCrn(iamProfileCrn)](./ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md) | | Setter for the "profile\_crn" parameter to use when fetching the bearer token from the IAM token server. |
|
|
38
|
+
| [setIamProfileId(iamProfileId)](./ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md) | | Setter for the "profile\_id" parameter to use when fetching the bearer token from the IAM token server. |
|
|
39
|
+
|