ibm-cloud-sdk-core 5.0.2 → 5.1.1
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/.secrets.baseline +118 -14
- package/Authentication.md +146 -21
- package/CHANGELOG.md +14 -0
- package/README.md +4 -3
- package/auth/authenticators/authenticator.d.ts +1 -0
- package/auth/authenticators/authenticator.js +1 -0
- package/auth/authenticators/container-authenticator.d.ts +6 -0
- package/auth/authenticators/container-authenticator.js +8 -0
- package/auth/authenticators/iam-assume-authenticator.d.ts +82 -0
- package/auth/authenticators/iam-assume-authenticator.js +92 -0
- package/auth/authenticators/iam-authenticator.d.ts +6 -0
- package/auth/authenticators/iam-authenticator.js +8 -0
- package/auth/authenticators/iam-request-based-authenticator-immutable.d.ts +64 -0
- package/auth/authenticators/iam-request-based-authenticator-immutable.js +74 -0
- package/auth/authenticators/iam-request-based-authenticator.d.ts +19 -47
- package/auth/authenticators/iam-request-based-authenticator.js +28 -36
- package/auth/authenticators/index.d.ts +4 -1
- package/auth/authenticators/index.js +3 -1
- package/auth/authenticators/token-request-based-authenticator-immutable.d.ts +71 -0
- package/auth/authenticators/token-request-based-authenticator-immutable.js +91 -0
- package/auth/authenticators/token-request-based-authenticator.d.ts +4 -42
- package/auth/authenticators/token-request-based-authenticator.js +5 -43
- package/auth/token-managers/container-token-manager.d.ts +6 -0
- package/auth/token-managers/container-token-manager.js +18 -50
- package/auth/token-managers/iam-assume-token-manager.d.ts +101 -0
- package/auth/token-managers/iam-assume-token-manager.js +220 -0
- package/auth/token-managers/iam-request-based-token-manager.d.ts +3 -9
- package/auth/token-managers/iam-request-based-token-manager.js +0 -8
- package/auth/token-managers/iam-token-manager.d.ts +8 -2
- package/auth/token-managers/iam-token-manager.js +10 -2
- package/auth/token-managers/index.d.ts +4 -2
- package/auth/token-managers/index.js +6 -3
- package/auth/utils/get-authenticator-from-environment.js +3 -0
- package/auth/utils/helpers.d.ts +18 -23
- package/auth/utils/helpers.js +50 -30
- package/build/docs/ibm-cloud-sdk-core.atleastone.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.atmostone.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +57 -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_iam_assume.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_mcsp.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 +313 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.md +50 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.baseoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.convertmodel.md +85 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequestanddeserializeresponse.md +87 -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 +53 -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 +313 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +55 -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 +165 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +160 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +149 -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 +71 -0
- package/build/docs/ibm-cloud-sdk-core.constructfilepath.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +87 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +186 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.getcrtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +156 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.contenttype.md +14 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +128 -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 +49 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.md +80 -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 +74 -0
- package/build/docs/ibm-cloud-sdk-core.filestream.md +54 -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 +87 -0
- package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.getformat.md +69 -0
- package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +73 -0
- package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +59 -0
- package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator.md +130 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.md +200 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.requesttoken.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.savetokeninfo.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setclientidandsecret.md +69 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setdisablesslverification.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setscope.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +163 -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.md +90 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +69 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setdisablesslverification.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.clientid.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.clientsecret.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.formdata.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.istokenexpired.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +264 -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 +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +69 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +53 -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 +96 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +126 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.isemptyobject.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.isfiledata.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.isfilewithmetadata.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.ishtml.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.isjsonmimetype.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +163 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +53 -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.mcspauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.md +145 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.md +128 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.md +820 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticate.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.md +60 -0
- package/build/docs/ibm-cloud-sdk-core.onlyone.md +55 -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 +49 -0
- package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.removesuffix.md +71 -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 +121 -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 +55 -0
- package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +49 -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.istokenexpired.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +352 -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 +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.useragent.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanageroptions.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +66 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +55 -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 +171 -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 +73 -0
- package/build/docs/ibm-cloud-sdk-core.validateparams.md +89 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +158 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.istokenexpired.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +126 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +53 -0
- package/build/docs/index.md +29 -0
- package/docs/ibm-cloud-sdk-core.api.json +787 -404
- package/es/auth/authenticators/authenticator.d.ts +1 -0
- package/es/auth/authenticators/authenticator.js +1 -0
- package/es/auth/authenticators/container-authenticator.d.ts +6 -0
- package/es/auth/authenticators/container-authenticator.js +8 -0
- package/es/auth/authenticators/iam-assume-authenticator.d.ts +82 -0
- package/es/auth/authenticators/iam-assume-authenticator.js +70 -0
- package/es/auth/authenticators/iam-authenticator.d.ts +6 -0
- package/es/auth/authenticators/iam-authenticator.js +8 -0
- package/es/auth/authenticators/iam-request-based-authenticator-immutable.d.ts +64 -0
- package/es/auth/authenticators/iam-request-based-authenticator-immutable.js +51 -0
- package/es/auth/authenticators/iam-request-based-authenticator.d.ts +19 -47
- package/es/auth/authenticators/iam-request-based-authenticator.js +26 -35
- package/es/auth/authenticators/index.d.ts +4 -1
- package/es/auth/authenticators/index.js +1 -0
- package/es/auth/authenticators/token-request-based-authenticator-immutable.d.ts +71 -0
- package/es/auth/authenticators/token-request-based-authenticator-immutable.js +65 -0
- package/es/auth/authenticators/token-request-based-authenticator.d.ts +4 -42
- package/es/auth/authenticators/token-request-based-authenticator.js +3 -39
- package/es/auth/token-managers/container-token-manager.d.ts +6 -0
- package/es/auth/token-managers/container-token-manager.js +18 -24
- package/es/auth/token-managers/iam-assume-token-manager.d.ts +101 -0
- package/es/auth/token-managers/iam-assume-token-manager.js +164 -0
- package/es/auth/token-managers/iam-request-based-token-manager.d.ts +3 -9
- package/es/auth/token-managers/iam-request-based-token-manager.js +0 -8
- package/es/auth/token-managers/iam-token-manager.d.ts +8 -2
- package/es/auth/token-managers/iam-token-manager.js +10 -2
- package/es/auth/token-managers/index.d.ts +4 -2
- package/es/auth/token-managers/index.js +4 -2
- package/es/auth/utils/get-authenticator-from-environment.js +4 -1
- package/es/auth/utils/helpers.d.ts +18 -23
- package/es/auth/utils/helpers.js +35 -27
- package/es/tsdoc-metadata.json +11 -0
- package/etc/ibm-cloud-sdk-core.api.md +46 -28
- package/ibm-cloud-sdk-core.d.ts +264 -68
- package/package.json +2 -2
- package/temp/ibm-cloud-sdk-core.api.json +8646 -0
- package/temp/ibm-cloud-sdk-core.api.md +505 -0
package/ibm-cloud-sdk-core.d.ts
CHANGED
|
@@ -7,24 +7,21 @@ import { OutgoingHttpHeaders } from 'http';
|
|
|
7
7
|
import { Stream } from 'stream';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Checks for at least one of
|
|
10
|
+
* Checks for at least one of the given elements being defined.
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @
|
|
14
|
-
* @returns true if a or b is defined; false if both are undefined
|
|
12
|
+
* @param args - The spread of arguments to check
|
|
13
|
+
* @returns true if one or more are defined; false if all are undefined
|
|
15
14
|
*/
|
|
16
|
-
export declare function atLeastOne(
|
|
15
|
+
export declare function atLeastOne(...args: any): boolean;
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
|
-
* Verifies that
|
|
18
|
+
* Verifies that no more than one of the given elements are defined.
|
|
19
|
+
* Returns true if one or none are defined, and false otherwise.
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
22
|
-
* @
|
|
23
|
-
*
|
|
24
|
-
* @returns false if a and b are both defined, true otherwise
|
|
25
|
-
|
|
21
|
+
* @param args - The spread of arguments to check
|
|
22
|
+
* @returns false if more than one elements are defined, true otherwise
|
|
26
23
|
*/
|
|
27
|
-
export declare function atMostOne(
|
|
24
|
+
export declare function atMostOne(...args: any): boolean;
|
|
28
25
|
|
|
29
26
|
/**
|
|
30
27
|
* The request object containing the headers property that
|
|
@@ -49,6 +46,7 @@ export declare class Authenticator implements AuthenticatorInterface {
|
|
|
49
46
|
static AUTHTYPE_BASIC: string;
|
|
50
47
|
static AUTHTYPE_BEARERTOKEN: string;
|
|
51
48
|
static AUTHTYPE_IAM: string;
|
|
49
|
+
static AUTHTYPE_IAM_ASSUME: string;
|
|
52
50
|
static AUTHTYPE_CONTAINER: string;
|
|
53
51
|
static AUTHTYPE_CP4D: string;
|
|
54
52
|
static AUTHTYPE_NOAUTH: string;
|
|
@@ -384,7 +382,7 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
384
382
|
}
|
|
385
383
|
|
|
386
384
|
/**
|
|
387
|
-
* (C) Copyright IBM Corp. 2019,
|
|
385
|
+
* (C) Copyright IBM Corp. 2019, 2024.
|
|
388
386
|
*
|
|
389
387
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
390
388
|
* you may not use this file except in compliance with the License.
|
|
@@ -478,6 +476,12 @@ export declare class ContainerAuthenticator extends IamRequestBasedAuthenticator
|
|
|
478
476
|
* @returns a string that indicates the authenticator's type
|
|
479
477
|
*/
|
|
480
478
|
authenticationType(): string;
|
|
479
|
+
/**
|
|
480
|
+
* Return the most recently stored refresh token.
|
|
481
|
+
*
|
|
482
|
+
* @returns the refresh token string
|
|
483
|
+
*/
|
|
484
|
+
getRefreshToken(): string;
|
|
481
485
|
}
|
|
482
486
|
|
|
483
487
|
/**
|
|
@@ -525,6 +529,12 @@ export declare class ContainerTokenManager extends IamRequestBasedTokenManager {
|
|
|
525
529
|
* @param iamProfileId - the ID of the IAM trusted profile
|
|
526
530
|
*/
|
|
527
531
|
setIamProfileId(iamProfileId: string): void;
|
|
532
|
+
/**
|
|
533
|
+
* Returns the most recently stored refresh token.
|
|
534
|
+
*
|
|
535
|
+
* @returns the refresh token
|
|
536
|
+
*/
|
|
537
|
+
getRefreshToken(): string;
|
|
528
538
|
/**
|
|
529
539
|
* Request an IAM token using a compute resource token.
|
|
530
540
|
*/
|
|
@@ -687,6 +697,126 @@ export declare function getNewLogger(moduleName: string): SDKLogger;
|
|
|
687
697
|
*/
|
|
688
698
|
export declare function getQueryParam(urlStr: string, param: string): string;
|
|
689
699
|
|
|
700
|
+
/**
|
|
701
|
+
* The IamAssumeAuthenticator obtains an IAM access token using the IAM "get-token"
|
|
702
|
+
* operation's "assume" grant type. The authenticator obtains an initial IAM access
|
|
703
|
+
* token from a user-supplied apikey, then exchanges this initial IAM access token
|
|
704
|
+
* for another IAM access token that has "assumed the identity" of the specified
|
|
705
|
+
* trusted profile.
|
|
706
|
+
*
|
|
707
|
+
* The bearer token will be sent as an Authorization header in the form:
|
|
708
|
+
*
|
|
709
|
+
* Authorization: Bearer \<bearer-token\>
|
|
710
|
+
*/
|
|
711
|
+
export declare class IamAssumeAuthenticator extends IamRequestBasedAuthenticatorImmutable {
|
|
712
|
+
protected tokenManager: IamAssumeTokenManager;
|
|
713
|
+
/**
|
|
714
|
+
*
|
|
715
|
+
* Create a new IamAssumeAuthenticator instance.
|
|
716
|
+
*
|
|
717
|
+
* @param options - Configuration options for IAM authentication.
|
|
718
|
+
* This should be an object containing these fields:
|
|
719
|
+
* - apikey: (required) the IAM api key for initial token request
|
|
720
|
+
* - iamProfileId: (optional) the ID of the trusted profile to use
|
|
721
|
+
* - iamProfileCrn: (optional) the CRN of the trusted profile to use
|
|
722
|
+
* - iamProfileName: (optional) the name of the trusted profile to use (must be specified with iamAccountId)
|
|
723
|
+
* - iamAccountId: (optional) the ID of the account the trusted profile is in (must be specified with iamProfileName)
|
|
724
|
+
* - url: (optional) the endpoint URL for the token service
|
|
725
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
726
|
+
* should be disabled or not
|
|
727
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
728
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
729
|
+
* Authorization header to be included in each request to the token service
|
|
730
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
731
|
+
* Authorization header to be included in each request to the token service
|
|
732
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
733
|
+
*
|
|
734
|
+
* @throws Error: the configuration options are not valid.
|
|
735
|
+
*/
|
|
736
|
+
constructor(options: Options_14);
|
|
737
|
+
/**
|
|
738
|
+
* Returns the authenticator's type ('iamAssume').
|
|
739
|
+
*
|
|
740
|
+
* @returns a string that indicates the authenticator's type
|
|
741
|
+
*/
|
|
742
|
+
authenticationType(): string;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* The IamAssumeTokenManager takes an api key, along with trusted profile information, and performs
|
|
747
|
+
* the necessary interactions with the IAM token service to obtain and store a suitable bearer token
|
|
748
|
+
* that "assumes" the identify of the trusted profile.
|
|
749
|
+
*/
|
|
750
|
+
export declare class IamAssumeTokenManager extends IamRequestBasedTokenManager {
|
|
751
|
+
protected requiredOptions: string[];
|
|
752
|
+
private iamProfileId;
|
|
753
|
+
private iamProfileCrn;
|
|
754
|
+
private iamProfileName;
|
|
755
|
+
private iamAccountId;
|
|
756
|
+
private iamDelegate;
|
|
757
|
+
/**
|
|
758
|
+
*
|
|
759
|
+
* Create a new IamAssumeTokenManager instance.
|
|
760
|
+
*
|
|
761
|
+
* @param options - Configuration options.
|
|
762
|
+
* This should be an object containing these fields:
|
|
763
|
+
* - apikey: (required) the IAM api key
|
|
764
|
+
* - iamProfileId: (optional) the ID of the trusted profile to use
|
|
765
|
+
* - iamProfileCrn: (optional) the CRN of the trusted profile to use
|
|
766
|
+
* - iamProfileName: (optional) the name of the trusted profile to use (must be specified with iamAccountId)
|
|
767
|
+
* - iamAccountId: (optional) the ID of the account the trusted profile is in (must be specified with iamProfileName)
|
|
768
|
+
* - url: (optional) the endpoint URL for the IAM token service (default value: "https://iam.cloud.ibm.com")
|
|
769
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
770
|
+
* should be disabled or not
|
|
771
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
772
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
773
|
+
* Authorization header to be included in each request to the token service
|
|
774
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
775
|
+
* Authorization header to be included in each request to the token service
|
|
776
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
777
|
+
*
|
|
778
|
+
* @throws Error: the configuration options are not valid.
|
|
779
|
+
*/
|
|
780
|
+
constructor(options: Options_13);
|
|
781
|
+
/**
|
|
782
|
+
* Request an IAM token using a standard access token and a trusted profile.
|
|
783
|
+
*/
|
|
784
|
+
protected requestToken(): Promise<any>;
|
|
785
|
+
/**
|
|
786
|
+
* Extend this method from the parent class to erase the refresh token from
|
|
787
|
+
* the class - we do not want to expose it for IAM Assume authentication.
|
|
788
|
+
*
|
|
789
|
+
* @param tokenResponse - the response object from JWT service request
|
|
790
|
+
*/
|
|
791
|
+
protected saveTokenInfo(tokenResponse: any): void;
|
|
792
|
+
/**
|
|
793
|
+
* Sets the IAM "scope" value.
|
|
794
|
+
* This value is sent as the "scope" form parameter in the IAM delegate request.
|
|
795
|
+
*
|
|
796
|
+
* @param scope - a space-separated string that contains one or more scope names
|
|
797
|
+
*/
|
|
798
|
+
setScope(scope: string): void;
|
|
799
|
+
/**
|
|
800
|
+
* Sets the IAM "clientId" and "clientSecret" values for the IAM delegate.
|
|
801
|
+
*
|
|
802
|
+
* @param clientId - the client id.
|
|
803
|
+
* @param clientSecret - the client secret.
|
|
804
|
+
*/
|
|
805
|
+
setClientIdAndSecret(clientId: string, clientSecret: string): void;
|
|
806
|
+
/**
|
|
807
|
+
* Sets the "disableSslVerification" property for the IAM delegate.
|
|
808
|
+
*
|
|
809
|
+
* @param value - the new value for the disableSslVerification property
|
|
810
|
+
*/
|
|
811
|
+
setDisableSslVerification(value: boolean): void;
|
|
812
|
+
/**
|
|
813
|
+
* Sets the headers to be included in the IAM delegate's requests.
|
|
814
|
+
*
|
|
815
|
+
* @param headers - the set of headers to send with each request to the token server
|
|
816
|
+
*/
|
|
817
|
+
setHeaders(headers: OutgoingHttpHeaders): void;
|
|
818
|
+
}
|
|
819
|
+
|
|
690
820
|
/**
|
|
691
821
|
* The IamAuthenticator will use the user-supplied `apikey`
|
|
692
822
|
* value to obtain a bearer token from a token server. When the bearer token
|
|
@@ -728,6 +858,12 @@ export declare class IamAuthenticator extends IamRequestBasedAuthenticator {
|
|
|
728
858
|
* @returns a string that indicates the authenticator's type
|
|
729
859
|
*/
|
|
730
860
|
authenticationType(): string;
|
|
861
|
+
/**
|
|
862
|
+
* Return the most recently stored refresh token.
|
|
863
|
+
*
|
|
864
|
+
* @returns the refresh token string
|
|
865
|
+
*/
|
|
866
|
+
getRefreshToken(): string;
|
|
731
867
|
}
|
|
732
868
|
|
|
733
869
|
/**
|
|
@@ -735,14 +871,49 @@ export declare class IamAuthenticator extends IamRequestBasedAuthenticator {
|
|
|
735
871
|
* for authenticators that interact with the IAM token service. This authenticator
|
|
736
872
|
* is not meant for use on its own.
|
|
737
873
|
*/
|
|
738
|
-
export declare class IamRequestBasedAuthenticator extends
|
|
874
|
+
export declare class IamRequestBasedAuthenticator extends IamRequestBasedAuthenticatorImmutable {
|
|
875
|
+
/**
|
|
876
|
+
* Setter for the mutually inclusive "clientId" and the "clientSecret" fields.
|
|
877
|
+
* @param clientId - the "clientId" value used to form a Basic Authorization header for IAM token requests
|
|
878
|
+
* @param clientSecret - the "clientSecret" value used to form a Basic Authorization header for IAM token requests
|
|
879
|
+
*/
|
|
880
|
+
setClientIdAndSecret(clientId: string, clientSecret: string): void;
|
|
881
|
+
/**
|
|
882
|
+
* Setter for the "scope" parameter to use when fetching the bearer token from the IAM token server.
|
|
883
|
+
* @param scope - (optional) a space-separated string that specifies one or more scopes to be
|
|
884
|
+
* associated with IAM token requests
|
|
885
|
+
*/
|
|
886
|
+
setScope(scope: string): void;
|
|
887
|
+
/**
|
|
888
|
+
* Set the flag that indicates whether verification of the server's SSL
|
|
889
|
+
* certificate should be disabled or not.
|
|
890
|
+
*
|
|
891
|
+
* @param value - a flag that indicates whether verification of the
|
|
892
|
+
* token server's SSL certificate should be disabled or not.
|
|
893
|
+
*/
|
|
894
|
+
setDisableSslVerification(value: boolean): void;
|
|
895
|
+
/**
|
|
896
|
+
* Set headers.
|
|
897
|
+
*
|
|
898
|
+
* @param headers - a set of HTTP headers to be sent with each outbound token server request.
|
|
899
|
+
* Overwrites previous default headers.
|
|
900
|
+
*/
|
|
901
|
+
setHeaders(headers: OutgoingHttpHeaders): void;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* The IamRequestBasedAuthenticatorImmutable provides shared configuration and functionality
|
|
906
|
+
* for authenticators that interact with the IAM token service. This authenticator
|
|
907
|
+
* is not meant for use on its own.
|
|
908
|
+
*/
|
|
909
|
+
declare class IamRequestBasedAuthenticatorImmutable extends TokenRequestBasedAuthenticatorImmutable {
|
|
739
910
|
protected tokenManager: IamRequestBasedTokenManager;
|
|
740
911
|
protected clientId: string;
|
|
741
912
|
protected clientSecret: string;
|
|
742
913
|
protected scope: string;
|
|
743
914
|
/**
|
|
744
915
|
*
|
|
745
|
-
* Create a new
|
|
916
|
+
* Create a new IamRequestBasedAuthenticatorImmutable instance.
|
|
746
917
|
*
|
|
747
918
|
* @param options - Configuration options for IAM authentication.
|
|
748
919
|
* This should be an object containing these fields:
|
|
@@ -759,24 +930,6 @@ export declare class IamRequestBasedAuthenticator extends TokenRequestBasedAuthe
|
|
|
759
930
|
* @throws Error: the configuration options are not valid.
|
|
760
931
|
*/
|
|
761
932
|
constructor(options: IamRequestOptions_2);
|
|
762
|
-
/**
|
|
763
|
-
* Setter for the mutually inclusive "clientId" and the "clientSecret" fields.
|
|
764
|
-
* @param clientId - the "clientId" value used to form a Basic Authorization header for IAM token requests
|
|
765
|
-
* @param clientSecret - the "clientSecret" value used to form a Basic Authorization header for IAM token requests
|
|
766
|
-
*/
|
|
767
|
-
setClientIdAndSecret(clientId: string, clientSecret: string): void;
|
|
768
|
-
/**
|
|
769
|
-
* Setter for the "scope" parameter to use when fetching the bearer token from the IAM token server.
|
|
770
|
-
* @param scope - (optional) a space-separated string that specifies one or more scopes to be
|
|
771
|
-
* associated with IAM token requests
|
|
772
|
-
*/
|
|
773
|
-
setScope(scope: string): void;
|
|
774
|
-
/**
|
|
775
|
-
* Return the most recently stored refresh token.
|
|
776
|
-
*
|
|
777
|
-
* @returns the refresh token string
|
|
778
|
-
*/
|
|
779
|
-
getRefreshToken(): string;
|
|
780
933
|
}
|
|
781
934
|
|
|
782
935
|
/**
|
|
@@ -787,9 +940,9 @@ export declare class IamRequestBasedAuthenticator extends TokenRequestBasedAuthe
|
|
|
787
940
|
* class be extended with specific implementations.
|
|
788
941
|
*/
|
|
789
942
|
export declare class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
943
|
+
protected clientId: string;
|
|
944
|
+
protected clientSecret: string;
|
|
945
|
+
protected scope: string;
|
|
793
946
|
protected refreshToken: string;
|
|
794
947
|
protected formData: any;
|
|
795
948
|
/**
|
|
@@ -829,12 +982,6 @@ export declare class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
|
829
982
|
* @param clientSecret - the client secret.
|
|
830
983
|
*/
|
|
831
984
|
setClientIdAndSecret(clientId: string, clientSecret: string): void;
|
|
832
|
-
/**
|
|
833
|
-
* Returns the most recently stored refresh token.
|
|
834
|
-
*
|
|
835
|
-
* @returns the refresh token
|
|
836
|
-
*/
|
|
837
|
-
getRefreshToken(): string;
|
|
838
985
|
/**
|
|
839
986
|
* Extend this method from the parent class to extract the refresh token from
|
|
840
987
|
* the request and save it.
|
|
@@ -886,8 +1033,8 @@ declare interface IamRequestOptions_2 extends BaseOptions {
|
|
|
886
1033
|
}
|
|
887
1034
|
|
|
888
1035
|
/**
|
|
889
|
-
* The
|
|
890
|
-
* the IAM token service to obtain and store a suitable bearer token. Additionally, the
|
|
1036
|
+
* The IamTokenManager takes an api key and performs the necessary interactions with
|
|
1037
|
+
* the IAM token service to obtain and store a suitable bearer token. Additionally, the IamTokenManager
|
|
891
1038
|
* will retrieve bearer tokens via basic auth using a supplied "clientId" and "clientSecret" pair.
|
|
892
1039
|
*/
|
|
893
1040
|
export declare class IamTokenManager extends IamRequestBasedTokenManager {
|
|
@@ -913,6 +1060,12 @@ export declare class IamTokenManager extends IamRequestBasedTokenManager {
|
|
|
913
1060
|
* @throws Error: the configuration options are not valid.
|
|
914
1061
|
*/
|
|
915
1062
|
constructor(options: Options_5);
|
|
1063
|
+
/**
|
|
1064
|
+
* Returns the most recently stored refresh token.
|
|
1065
|
+
*
|
|
1066
|
+
* @returns the refresh token
|
|
1067
|
+
*/
|
|
1068
|
+
getRefreshToken(): string;
|
|
916
1069
|
}
|
|
917
1070
|
|
|
918
1071
|
export declare function isEmptyObject(obj: any): boolean;
|
|
@@ -1049,16 +1202,14 @@ export declare class NoAuthAuthenticator extends Authenticator {
|
|
|
1049
1202
|
}
|
|
1050
1203
|
|
|
1051
1204
|
/**
|
|
1052
|
-
* Checks
|
|
1053
|
-
* Returns true if
|
|
1054
|
-
*
|
|
1055
|
-
* or both are undefined.
|
|
1205
|
+
* Checks that exactly one of the arguments provided is defined.
|
|
1206
|
+
* Returns true if one argument is defined. Returns false if no
|
|
1207
|
+
* argument are defined or if 2 or more are defined.
|
|
1056
1208
|
*
|
|
1057
|
-
* @param
|
|
1058
|
-
* @
|
|
1059
|
-
* @returns true if and only if exactly one of a or b is defined
|
|
1209
|
+
* @param args - The spread of arguments to check
|
|
1210
|
+
* @returns true if and only if exactly one argument is defined
|
|
1060
1211
|
*/
|
|
1061
|
-
export declare function onlyOne(
|
|
1212
|
+
export declare function onlyOne(...args: any): boolean;
|
|
1062
1213
|
|
|
1063
1214
|
/** Configuration options for basic authentication. */
|
|
1064
1215
|
declare type Options = {
|
|
@@ -1094,6 +1245,37 @@ declare interface Options_12 extends BaseOptions {
|
|
|
1094
1245
|
url: string;
|
|
1095
1246
|
}
|
|
1096
1247
|
|
|
1248
|
+
/** Configuration options for IAM Assume token retrieval. */
|
|
1249
|
+
declare interface Options_13 extends IamRequestOptions {
|
|
1250
|
+
apikey: string;
|
|
1251
|
+
iamProfileId?: string;
|
|
1252
|
+
iamProfileCrn?: string;
|
|
1253
|
+
iamProfileName?: string;
|
|
1254
|
+
iamAccountId?: string;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/** Configuration options for IAM Assume authentication. */
|
|
1258
|
+
declare interface Options_14 extends IamRequestOptions_2 {
|
|
1259
|
+
/** The IAM api key */
|
|
1260
|
+
apikey: string;
|
|
1261
|
+
/**
|
|
1262
|
+
* Specify exactly one of [iamProfileId, iamProfileCrn, or iamProfileName] to
|
|
1263
|
+
* identify the trusted profile whose identity should be used. If iamProfileId
|
|
1264
|
+
* or iamProfileCrn is used, the trusted profile must exist in the same account.
|
|
1265
|
+
* If and only if iamProfileName is used, then iamAccountId must also be
|
|
1266
|
+
* specified to indicate the account that contains the trusted profile.
|
|
1267
|
+
*/
|
|
1268
|
+
iamProfileId?: string;
|
|
1269
|
+
iamProfileCrn?: string;
|
|
1270
|
+
iamProfileName?: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* If and only if iamProfileName is used to specify the trusted profile, then
|
|
1273
|
+
* iamAccountId must also be specified to indicate the account that contains
|
|
1274
|
+
* the trusted profile.
|
|
1275
|
+
*/
|
|
1276
|
+
iamAccountId?: string;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1097
1279
|
/** Configuration options for bearer authentication. */
|
|
1098
1280
|
declare type Options_2 = {
|
|
1099
1281
|
/** The bearer token to be added to requests. */
|
|
@@ -1446,22 +1628,7 @@ export declare type TokenManagerOptions = {
|
|
|
1446
1628
|
*
|
|
1447
1629
|
* Authorization: Bearer \<bearer-token\>
|
|
1448
1630
|
*/
|
|
1449
|
-
export declare class TokenRequestBasedAuthenticator extends
|
|
1450
|
-
protected tokenManager: JwtTokenManager;
|
|
1451
|
-
protected url: string;
|
|
1452
|
-
protected headers: OutgoingHttpHeaders;
|
|
1453
|
-
protected disableSslVerification: boolean;
|
|
1454
|
-
/**
|
|
1455
|
-
* Create a new TokenRequestBasedAuthenticator instance with an internal JwtTokenManager.
|
|
1456
|
-
*
|
|
1457
|
-
* @param options - Configuration options.
|
|
1458
|
-
* This should be an object containing these fields:
|
|
1459
|
-
* - url: (optional) the endpoint URL for the token service
|
|
1460
|
-
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
1461
|
-
* should be disabled or not
|
|
1462
|
-
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
1463
|
-
*/
|
|
1464
|
-
constructor(options: BaseOptions);
|
|
1631
|
+
export declare class TokenRequestBasedAuthenticator extends TokenRequestBasedAuthenticatorImmutable {
|
|
1465
1632
|
/**
|
|
1466
1633
|
* Set the flag that indicates whether verification of the server's SSL
|
|
1467
1634
|
* certificate should be disabled or not.
|
|
@@ -1477,6 +1644,35 @@ export declare class TokenRequestBasedAuthenticator extends Authenticator {
|
|
|
1477
1644
|
* Overwrites previous default headers.
|
|
1478
1645
|
*/
|
|
1479
1646
|
setHeaders(headers: OutgoingHttpHeaders): void;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* Class for common functionality shared by token-request authenticators.
|
|
1651
|
+
* Token-request authenticators use token managers to retrieve, store,
|
|
1652
|
+
* and refresh tokens. Not intended to be used as stand-alone authenticator,
|
|
1653
|
+
* but as base class to authenticators that have their own token manager
|
|
1654
|
+
* implementations.
|
|
1655
|
+
*
|
|
1656
|
+
* The token will be added as an Authorization header in the form:
|
|
1657
|
+
*
|
|
1658
|
+
* Authorization: Bearer \<bearer-token\>
|
|
1659
|
+
*/
|
|
1660
|
+
declare class TokenRequestBasedAuthenticatorImmutable extends Authenticator {
|
|
1661
|
+
protected tokenManager: JwtTokenManager;
|
|
1662
|
+
protected url: string;
|
|
1663
|
+
protected headers: OutgoingHttpHeaders;
|
|
1664
|
+
protected disableSslVerification: boolean;
|
|
1665
|
+
/**
|
|
1666
|
+
* Create a new TokenRequestBasedAuthenticatorImmutable instance with an internal JwtTokenManager.
|
|
1667
|
+
*
|
|
1668
|
+
* @param options - Configuration options.
|
|
1669
|
+
* This should be an object containing these fields:
|
|
1670
|
+
* - url: (optional) the endpoint URL for the token service
|
|
1671
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
1672
|
+
* should be disabled or not
|
|
1673
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
1674
|
+
*/
|
|
1675
|
+
constructor(options: BaseOptions);
|
|
1480
1676
|
/**
|
|
1481
1677
|
* Adds bearer token information to "requestOptions". The bearer token information
|
|
1482
1678
|
* will be set in the Authorization property of "requestOptions.headers" in the form:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ibm-cloud-sdk-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "./es/index.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"eslint:fix": "eslint . --fix",
|
|
68
68
|
"eslint:check": "eslint . --cache",
|
|
69
69
|
"lint": "npm run eslint:check",
|
|
70
|
-
"
|
|
70
|
+
"fix": "npm run eslint:fix",
|
|
71
71
|
"jest": "jest",
|
|
72
72
|
"test": "jest test/unit/",
|
|
73
73
|
"test-travis": "jest --runInBand test/unit/",
|