ibm-cloud-sdk-core 4.0.0 → 4.0.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/.secrets.baseline +20 -30
- package/CHANGELOG.md +16 -4
- package/MIGRATION-V4.md +54 -0
- package/auth/authenticators/authenticator-interface.d.ts +3 -4
- package/auth/authenticators/authenticator-interface.js +1 -1
- package/auth/authenticators/authenticator.d.ts +5 -9
- package/auth/authenticators/authenticator.js +4 -8
- package/auth/authenticators/basic-authenticator.d.ts +12 -12
- package/auth/authenticators/basic-authenticator.js +12 -12
- package/auth/authenticators/bearer-token-authenticator.d.ts +11 -14
- package/auth/authenticators/bearer-token-authenticator.js +11 -14
- package/auth/authenticators/cloud-pak-for-data-authenticator.d.ts +15 -15
- package/auth/authenticators/cloud-pak-for-data-authenticator.js +15 -15
- package/auth/authenticators/container-authenticator.d.ts +23 -23
- package/auth/authenticators/container-authenticator.js +23 -23
- package/auth/authenticators/iam-authenticator.d.ts +20 -20
- package/auth/authenticators/iam-authenticator.js +20 -20
- package/auth/authenticators/iam-request-based-authenticator.d.ts +23 -25
- package/auth/authenticators/iam-request-based-authenticator.js +23 -25
- package/auth/authenticators/token-request-based-authenticator.d.ts +19 -24
- package/auth/authenticators/token-request-based-authenticator.js +19 -24
- package/auth/authenticators/vpc-instance-authenticator.d.ts +17 -16
- package/auth/authenticators/vpc-instance-authenticator.js +17 -16
- package/auth/token-managers/container-token-manager.d.ts +23 -25
- package/auth/token-managers/container-token-manager.js +23 -25
- package/auth/token-managers/cp4d-token-manager.d.ts +13 -13
- package/auth/token-managers/cp4d-token-manager.js +13 -13
- package/auth/token-managers/iam-request-based-token-manager.d.ts +26 -31
- package/auth/token-managers/iam-request-based-token-manager.js +26 -31
- package/auth/token-managers/iam-token-manager.d.ts +17 -16
- package/auth/token-managers/iam-token-manager.js +17 -16
- package/auth/token-managers/jwt-token-manager.d.ts +10 -13
- package/auth/token-managers/jwt-token-manager.js +13 -16
- package/auth/token-managers/token-manager.d.ts +23 -35
- package/auth/token-managers/token-manager.js +22 -34
- package/auth/token-managers/vpc-instance-token-manager.d.ts +15 -15
- package/auth/token-managers/vpc-instance-token-manager.js +15 -15
- package/auth/utils/get-authenticator-from-environment.d.ts +2 -2
- package/auth/utils/get-authenticator-from-environment.js +2 -2
- package/auth/utils/helpers.d.ts +34 -32
- package/auth/utils/helpers.js +34 -32
- package/auth/utils/read-external-sources.d.ts +2 -1
- package/auth/utils/read-external-sources.js +5 -4
- package/build/docs/ibm-cloud-sdk-core.atleastone.md +4 -4
- package/build/docs/ibm-cloud-sdk-core.atmostone.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticationtype.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.authenticator.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.baseservice.enableretries.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.baseservice.getauthenticator.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.baseservice.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +5 -5
- package/build/docs/ibm-cloud-sdk-core.computebasicauthheader.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +4 -4
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +4 -4
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +6 -2
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +5 -5
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +0 -2
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +6 -2
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.fileobject.md +5 -5
- package/build/docs/ibm-cloud-sdk-core.fileoptions.md +4 -4
- package/build/docs/ibm-cloud-sdk-core.filestream.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.md +5 -5
- package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.getformat.md +0 -2
- package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +1 -5
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +5 -5
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator._constructor_.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.getrefreshtoken.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.md +7 -7
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +6 -2
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.getrefreshtoken.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +8 -8
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.requesttoken.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.savetokeninfo.md +1 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +3 -5
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +2 -4
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.md +5 -5
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +6 -2
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +3 -3
- package/build/docs/ibm-cloud-sdk-core.ishtml.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +5 -5
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +1 -3
- package/build/docs/ibm-cloud-sdk-core.md +24 -24
- package/build/docs/ibm-cloud-sdk-core.onlyone.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.qs.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.removesuffix.md +4 -4
- package/build/docs/ibm-cloud-sdk-core.sdklogger.md +7 -7
- package/build/docs/ibm-cloud-sdk-core.streamtopromise.md +3 -1
- package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +4 -2
- package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.gettoken.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +15 -15
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.pacedrequesttoken.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.requesttoken.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.savetokeninfo.md +1 -3
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +1 -3
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +2 -4
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +9 -9
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md +0 -2
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md +0 -2
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md +1 -3
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkuserheader.md +0 -2
- package/build/docs/ibm-cloud-sdk-core.unittestutils.expecttobepromise.md +0 -2
- package/build/docs/ibm-cloud-sdk-core.unittestutils.getoptions.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.useroptions.md +9 -9
- package/build/docs/ibm-cloud-sdk-core.validateinput.md +8 -2
- package/build/docs/ibm-cloud-sdk-core.validateparams.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +6 -2
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +6 -6
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +6 -2
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +4 -4
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +2 -2
- package/docs/ibm-cloud-sdk-core.api.json +516 -241
- package/es/auth/authenticators/authenticator-interface.d.ts +3 -4
- package/es/auth/authenticators/authenticator-interface.js +1 -1
- package/es/auth/authenticators/authenticator.d.ts +5 -9
- package/es/auth/authenticators/authenticator.js +4 -8
- package/es/auth/authenticators/basic-authenticator.d.ts +12 -12
- package/es/auth/authenticators/basic-authenticator.js +12 -12
- package/es/auth/authenticators/bearer-token-authenticator.d.ts +11 -14
- package/es/auth/authenticators/bearer-token-authenticator.js +11 -14
- package/es/auth/authenticators/cloud-pak-for-data-authenticator.d.ts +15 -15
- package/es/auth/authenticators/cloud-pak-for-data-authenticator.js +15 -15
- package/es/auth/authenticators/container-authenticator.d.ts +23 -23
- package/es/auth/authenticators/container-authenticator.js +23 -23
- package/es/auth/authenticators/iam-authenticator.d.ts +20 -20
- package/es/auth/authenticators/iam-authenticator.js +20 -20
- package/es/auth/authenticators/iam-request-based-authenticator.d.ts +23 -25
- package/es/auth/authenticators/iam-request-based-authenticator.js +23 -25
- package/es/auth/authenticators/token-request-based-authenticator.d.ts +19 -24
- package/es/auth/authenticators/token-request-based-authenticator.js +19 -24
- package/es/auth/authenticators/vpc-instance-authenticator.d.ts +17 -16
- package/es/auth/authenticators/vpc-instance-authenticator.js +17 -16
- package/es/auth/token-managers/container-token-manager.d.ts +23 -25
- package/es/auth/token-managers/container-token-manager.js +23 -25
- package/es/auth/token-managers/cp4d-token-manager.d.ts +13 -13
- package/es/auth/token-managers/cp4d-token-manager.js +13 -13
- package/es/auth/token-managers/iam-request-based-token-manager.d.ts +26 -31
- package/es/auth/token-managers/iam-request-based-token-manager.js +26 -31
- package/es/auth/token-managers/iam-token-manager.d.ts +17 -16
- package/es/auth/token-managers/iam-token-manager.js +17 -16
- package/es/auth/token-managers/jwt-token-manager.d.ts +10 -13
- package/es/auth/token-managers/jwt-token-manager.js +13 -16
- package/es/auth/token-managers/token-manager.d.ts +23 -35
- package/es/auth/token-managers/token-manager.js +22 -34
- package/es/auth/token-managers/vpc-instance-token-manager.d.ts +15 -15
- package/es/auth/token-managers/vpc-instance-token-manager.js +15 -15
- package/es/auth/utils/get-authenticator-from-environment.d.ts +2 -2
- package/es/auth/utils/get-authenticator-from-environment.js +2 -2
- package/es/auth/utils/helpers.d.ts +34 -32
- package/es/auth/utils/helpers.js +34 -32
- package/es/auth/utils/read-external-sources.d.ts +2 -1
- package/es/auth/utils/read-external-sources.js +5 -4
- package/es/lib/base-service.d.ts +31 -32
- package/es/lib/base-service.js +31 -32
- package/es/lib/content-type.js +5 -5
- package/es/lib/get-new-logger.d.ts +2 -2
- package/es/lib/get-new-logger.js +2 -2
- package/es/lib/helper.d.ts +24 -31
- package/es/lib/helper.js +25 -32
- package/es/lib/querystring.d.ts +1 -1
- package/es/lib/querystring.js +3 -3
- package/es/lib/request-wrapper.d.ts +4 -6
- package/es/lib/request-wrapper.js +17 -23
- package/es/lib/sdk-test-helpers.d.ts +14 -19
- package/es/lib/sdk-test-helpers.js +14 -19
- package/es/lib/stream-to-promise.d.ts +3 -3
- package/es/lib/stream-to-promise.js +3 -3
- package/es/tsdoc-metadata.json +1 -1
- package/etc/ibm-cloud-sdk-core.api.md +12 -12
- package/ibm-cloud-sdk-core.d.ts +1402 -1449
- package/lib/base-service.d.ts +31 -32
- package/lib/base-service.js +31 -32
- package/lib/content-type.js +5 -5
- package/lib/get-new-logger.d.ts +2 -2
- package/lib/get-new-logger.js +2 -2
- package/lib/helper.d.ts +24 -31
- package/lib/helper.js +25 -32
- package/lib/querystring.d.ts +1 -1
- package/lib/querystring.js +3 -3
- package/lib/request-wrapper.d.ts +4 -6
- package/lib/request-wrapper.js +17 -23
- package/lib/sdk-test-helpers.d.ts +14 -19
- package/lib/sdk-test-helpers.js +14 -19
- package/lib/stream-to-promise.d.ts +3 -3
- package/lib/stream-to-promise.js +3 -3
- package/package.json +2 -2
- package/temp/ibm-cloud-sdk-core.api.json +516 -241
- package/temp/ibm-cloud-sdk-core.api.md +12 -12
- package/MIGRATION-V1.md +0 -42
|
@@ -8,7 +8,7 @@ The BearerTokenAuthenticator will set a user-provided bearer token in requests.
|
|
|
8
8
|
|
|
9
9
|
The bearer token will be sent as an Authorization header in the form:
|
|
10
10
|
|
|
11
|
-
Authorization: Bearer
|
|
11
|
+
Authorization: Bearer <<!-- -->bearer-token<!-- -->>
|
|
12
12
|
|
|
13
13
|
<b>Signature:</b>
|
|
14
14
|
|
|
@@ -27,13 +27,13 @@ export declare class BearerTokenAuthenticator extends Authenticator
|
|
|
27
27
|
|
|
28
28
|
| Property | Modifiers | Type | Description |
|
|
29
29
|
| --- | --- | --- | --- |
|
|
30
|
-
| [requiredOptions](./ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md) |
|
|
30
|
+
| [requiredOptions](./ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md) | <code>protected</code> | string\[\] | |
|
|
31
31
|
|
|
32
32
|
## Methods
|
|
33
33
|
|
|
34
34
|
| Method | Modifiers | Description |
|
|
35
35
|
| --- | --- | --- |
|
|
36
|
-
| [authenticate(requestOptions)](./ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md) | | Add a bearer token to
|
|
36
|
+
| [authenticate(requestOptions)](./ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md) | | <p>Add a bearer token to <code>requestOptions</code>. The bearer token information will be set in the Authorization property of "requestOptions.headers" in the form:</p><p>Authorization: Bearer <<!-- -->bearer-token<!-- -->></p> |
|
|
37
37
|
| [authenticationType()](./ibm-cloud-sdk-core.bearertokenauthenticator.authenticationtype.md) | | Returns the authenticator's type ('bearertoken'). |
|
|
38
38
|
| [setBearerToken(bearerToken)](./ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md) | | Set a new bearer token to be sent in subsequent requests. |
|
|
39
39
|
|
|
@@ -16,11 +16,11 @@ export declare function buildRequestFileObject(fileParam: FileWithMetadata): Pro
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| fileParam | [FileWithMetadata](./ibm-cloud-sdk-core.filewithmetadata.md) | The file
|
|
19
|
+
| fileParam | [FileWithMetadata](./ibm-cloud-sdk-core.filewithmetadata.md) | The FileWithMetadata instance that contains the file information |
|
|
20
20
|
|
|
21
21
|
<b>Returns:</b>
|
|
22
22
|
|
|
23
23
|
Promise<[FileObject](./ibm-cloud-sdk-core.fileobject.md)<!-- -->>
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
the FileObject instance
|
|
26
26
|
|
|
@@ -16,12 +16,12 @@ export declare function checkCredentials(obj: any, credsToCheck: string[]): Erro
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| obj | any |
|
|
20
|
-
| credsToCheck | string\[\] |
|
|
19
|
+
| obj | any | the options object holding credentials |
|
|
20
|
+
| credsToCheck | string\[\] | an array containing the keys of the credentials to check for problems |
|
|
21
21
|
|
|
22
22
|
<b>Returns:</b>
|
|
23
23
|
|
|
24
24
|
Error \| null
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
a string with the error message if there were problems, null if not
|
|
27
27
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## CloudPakForDataAuthenticator.(constructor)
|
|
6
6
|
|
|
7
|
-
Create a new
|
|
7
|
+
Create a new CloudPakForDataAuthenticator instance.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,9 +16,9 @@ constructor(options: Options);
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| options | Options | Configuration options for CloudPakForData authentication. |
|
|
19
|
+
| options | Options | Configuration options for CloudPakForData authentication. This should be an object containing these fields: - url: (required) the endpoint URL for the CloudPakForData token service - username: (required) the username used to obtain a bearer token - password: (optional) the password used to obtain a bearer token (required if apikey is not specified) - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified) - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - headers: (optional) a set of HTTP headers to be sent with each request to the token service |
|
|
20
20
|
|
|
21
21
|
## Exceptions
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Error: the username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token requests.
|
|
24
24
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## CloudPakForDataAuthenticator class
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
The CloudPakForDataAuthenticator will either use a username/password pair or a username/apikey pair to obtain a bearer token from a token server. When the bearer token expires, a new token is obtained from the token server.
|
|
8
8
|
|
|
9
9
|
The bearer token will be sent as an Authorization header in the form:
|
|
10
10
|
|
|
11
|
-
Authorization: Bearer
|
|
11
|
+
Authorization: Bearer <<!-- -->bearer-token<!-- -->>
|
|
12
12
|
|
|
13
13
|
<b>Signature:</b>
|
|
14
14
|
|
|
@@ -21,14 +21,14 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
21
21
|
|
|
22
22
|
| Constructor | Modifiers | Description |
|
|
23
23
|
| --- | --- | --- |
|
|
24
|
-
| [(constructor)(options)](./ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md) | | Create a new
|
|
24
|
+
| [(constructor)(options)](./ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md) | | Create a new CloudPakForDataAuthenticator instance. |
|
|
25
25
|
|
|
26
26
|
## Properties
|
|
27
27
|
|
|
28
28
|
| Property | Modifiers | Type | Description |
|
|
29
29
|
| --- | --- | --- | --- |
|
|
30
|
-
| [requiredOptions](./ibm-cloud-sdk-core.cloudpakfordataauthenticator.requiredoptions.md) |
|
|
31
|
-
| [tokenManager](./ibm-cloud-sdk-core.cloudpakfordataauthenticator.tokenmanager.md) |
|
|
30
|
+
| [requiredOptions](./ibm-cloud-sdk-core.cloudpakfordataauthenticator.requiredoptions.md) | <code>protected</code> | string\[\] | |
|
|
31
|
+
| [tokenManager](./ibm-cloud-sdk-core.cloudpakfordataauthenticator.tokenmanager.md) | <code>protected</code> | [Cp4dTokenManager](./ibm-cloud-sdk-core.cp4dtokenmanager.md) | |
|
|
32
32
|
|
|
33
33
|
## Methods
|
|
34
34
|
|
|
@@ -16,13 +16,13 @@ export declare function constructServiceUrl(parameterizedUrl: string, defaultUrl
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| parameterizedUrl | string | URL that contains variable placeholders, e.g. '<!-- -->{<!-- -->scheme<!-- -->}<!-- -->://ibm.com'. |
|
|
20
|
-
| defaultUrlVariables | Map<string, string> | Map
|
|
21
|
-
| providedUrlVariables | Map<string, string> \| null | Map
|
|
19
|
+
| parameterizedUrl | string | a URL that contains variable placeholders, e.g. '<!-- -->{<!-- -->scheme<!-- -->}<!-- -->://ibm.com'. |
|
|
20
|
+
| defaultUrlVariables | Map<string, string> | a Map of variable names to default values. Each variable in the parameterized URL must have a default value specified in this map. |
|
|
21
|
+
| providedUrlVariables | Map<string, string> \| null | a Map of variable names to desired values. If a variable is not provided in this map, the default variable value will be used instead. |
|
|
22
22
|
|
|
23
23
|
<b>Returns:</b>
|
|
24
24
|
|
|
25
25
|
string
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
the formatted URL with all variable placeholders replaced by values.
|
|
28
28
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## ContainerAuthenticator.(constructor)
|
|
6
6
|
|
|
7
|
-
Create a new
|
|
7
|
+
Create a new ContainerAuthenticator instance.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,9 +16,9 @@ constructor(options: Options);
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| options | Options | Configuration options for IAM authentication. |
|
|
19
|
+
| options | Options | Configuration options for IAM authentication. This should be an object containing these fields: - url: (optional) the endpoint URL for the token service - crTokenFilename: (optional) the file containing the compute resource token - iamProfileName: (optional) the name of the IAM trusted profile associated with the compute resource token (required if iamProfileId is not specified) - iamProfileId\]: (optional) the ID of the IAM trusted profile associated with the compute resource token (required if iamProfileName is not specified) - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - headers: (optional) a set of HTTP headers to be sent with each request to the token service - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service |
|
|
20
20
|
|
|
21
21
|
## Exceptions
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Error: the configuration options are not valid.
|
|
24
24
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## ContainerAuthenticator class
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
The ContainerAuthenticator will read a compute resource token from the file system and use this value to obtain a bearer token from the IAM token server. When the bearer token expires, a new token is obtained from the token server.
|
|
8
8
|
|
|
9
9
|
The bearer token will be sent as an Authorization header in the form:
|
|
10
10
|
|
|
11
|
-
Authorization: Bearer
|
|
11
|
+
Authorization: Bearer <<!-- -->bearer-token<!-- -->>
|
|
12
12
|
|
|
13
13
|
<b>Signature:</b>
|
|
14
14
|
|
|
@@ -21,13 +21,13 @@ export declare class ContainerAuthenticator extends IamRequestBasedAuthenticator
|
|
|
21
21
|
|
|
22
22
|
| Constructor | Modifiers | Description |
|
|
23
23
|
| --- | --- | --- |
|
|
24
|
-
| [(constructor)(options)](./ibm-cloud-sdk-core.containerauthenticator._constructor_.md) | | Create a new
|
|
24
|
+
| [(constructor)(options)](./ibm-cloud-sdk-core.containerauthenticator._constructor_.md) | | Create a new ContainerAuthenticator instance. |
|
|
25
25
|
|
|
26
26
|
## Properties
|
|
27
27
|
|
|
28
28
|
| Property | Modifiers | Type | Description |
|
|
29
29
|
| --- | --- | --- | --- |
|
|
30
|
-
| [tokenManager](./ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md) |
|
|
30
|
+
| [tokenManager](./ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md) | <code>protected</code> | [ContainerTokenManager](./ibm-cloud-sdk-core.containertokenmanager.md) | |
|
|
31
31
|
|
|
32
32
|
## Methods
|
|
33
33
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## ContainerTokenManager.(constructor)
|
|
6
6
|
|
|
7
|
-
Create a new
|
|
7
|
+
Create a new ContainerTokenManager instance.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,5 +16,9 @@ constructor(options: Options);
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| options | Options | Configuration options. |
|
|
19
|
+
| options | Options | Configuration options. This should be an object containing these fields: - url: (optional) the endpoint URL for the token service (default: "https://iam.cloud.ibm.com") - crTokenFilename: (optional) the file containing the compute resource token (default: "/var/run/secrets/tokens/vault-token") - iamProfileName: (optional) the name of the IAM trusted profile associated with the compute resource token (required if iamProfileId is not specified) - iamProfileId\]: (optional) the ID of the IAM trusted profile associated with the compute resource token (required if iamProfileName is not specified) - headers: (optional) a set of HTTP headers to be sent with each request to the token service - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service |
|
|
20
|
+
|
|
21
|
+
## Exceptions
|
|
22
|
+
|
|
23
|
+
Error: the configuration options were invalid
|
|
20
24
|
|
|
@@ -17,14 +17,14 @@ export declare class ContainerTokenManager extends IamRequestBasedTokenManager
|
|
|
17
17
|
|
|
18
18
|
| Constructor | Modifiers | Description |
|
|
19
19
|
| --- | --- | --- |
|
|
20
|
-
| [(constructor)(options)](./ibm-cloud-sdk-core.containertokenmanager._constructor_.md) | | Create a new
|
|
20
|
+
| [(constructor)(options)](./ibm-cloud-sdk-core.containertokenmanager._constructor_.md) | | Create a new ContainerTokenManager instance. |
|
|
21
21
|
|
|
22
22
|
## Methods
|
|
23
23
|
|
|
24
24
|
| Method | Modifiers | Description |
|
|
25
25
|
| --- | --- | --- |
|
|
26
|
-
| [requestToken()](./ibm-cloud-sdk-core.containertokenmanager.requesttoken.md) |
|
|
27
|
-
| [setCrTokenFilename(crTokenFilename)](./ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md) | |
|
|
28
|
-
| [setIamProfileId(iamProfileId)](./ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md) | |
|
|
29
|
-
| [setIamProfileName(iamProfileName)](./ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md) | |
|
|
26
|
+
| [requestToken()](./ibm-cloud-sdk-core.containertokenmanager.requesttoken.md) | <code>protected</code> | Request an IAM token using a compute resource token. |
|
|
27
|
+
| [setCrTokenFilename(crTokenFilename)](./ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md) | | Sets the "crTokenFilename" field |
|
|
28
|
+
| [setIamProfileId(iamProfileId)](./ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md) | | Sets the ID of the IAM trusted profile to use when obtaining an access token from the IAM token server. |
|
|
29
|
+
| [setIamProfileName(iamProfileName)](./ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md) | | Sets the name of the IAM trusted profile to use when obtaining an access token from the IAM token server. |
|
|
30
30
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## ContainerTokenManager.setCrTokenFilename() method
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Sets the "crTokenFilename" field
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ setCrTokenFilename(crTokenFilename: string): void;
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| crTokenFilename | string |
|
|
19
|
+
| crTokenFilename | string | the name of the file containing the CR token |
|
|
20
20
|
|
|
21
21
|
<b>Returns:</b>
|
|
22
22
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## ContainerTokenManager.setIamProfileId() method
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Sets the ID of the IAM trusted profile to use when obtaining an access token from the IAM token server.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ setIamProfileId(iamProfileId: string): void;
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| iamProfileId | string |
|
|
19
|
+
| iamProfileId | string | the ID of the IAM trusted profile |
|
|
20
20
|
|
|
21
21
|
<b>Returns:</b>
|
|
22
22
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## ContainerTokenManager.setIamProfileName() method
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Sets the name of the IAM trusted profile to use when obtaining an access token from the IAM token server.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ setIamProfileName(iamProfileName: string): void;
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| iamProfileName | string |
|
|
19
|
+
| iamProfileName | string | the name of the IAM trusted profile |
|
|
20
20
|
|
|
21
21
|
<b>Returns:</b>
|
|
22
22
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Cp4dTokenManager.(constructor)
|
|
6
6
|
|
|
7
|
-
Create a new
|
|
7
|
+
Create a new Cp4dTokenManager instance.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,5 +16,9 @@ constructor(options: Options);
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| options | Options | Configuration options
|
|
19
|
+
| options | Options | Configuration options This should be an object containing these fields: - url: (required) the endpoint URL for the CloudPakForData token service - username: (required) the username used to obtain a bearer token - password: (optional) the password used to obtain a bearer token (required if apikey is not specified) - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified) - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - headers: (optional) a set of HTTP headers to be sent with each request to the token service |
|
|
20
|
+
|
|
21
|
+
## Exceptions
|
|
22
|
+
|
|
23
|
+
Error: the configuration options were invalid.
|
|
20
24
|
|
|
@@ -19,17 +19,17 @@ export declare class Cp4dTokenManager extends JwtTokenManager
|
|
|
19
19
|
|
|
20
20
|
| Constructor | Modifiers | Description |
|
|
21
21
|
| --- | --- | --- |
|
|
22
|
-
| [(constructor)(options)](./ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md) | | Create a new
|
|
22
|
+
| [(constructor)(options)](./ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md) | | Create a new Cp4dTokenManager instance. |
|
|
23
23
|
|
|
24
24
|
## Properties
|
|
25
25
|
|
|
26
26
|
| Property | Modifiers | Type | Description |
|
|
27
27
|
| --- | --- | --- | --- |
|
|
28
|
-
| [requiredOptions](./ibm-cloud-sdk-core.cp4dtokenmanager.requiredoptions.md) |
|
|
28
|
+
| [requiredOptions](./ibm-cloud-sdk-core.cp4dtokenmanager.requiredoptions.md) | <code>protected</code> | string\[\] | |
|
|
29
29
|
|
|
30
30
|
## Methods
|
|
31
31
|
|
|
32
32
|
| Method | Modifiers | Description |
|
|
33
33
|
| --- | --- | --- |
|
|
34
|
-
| [requestToken()](./ibm-cloud-sdk-core.cp4dtokenmanager.requesttoken.md) |
|
|
34
|
+
| [requestToken()](./ibm-cloud-sdk-core.cp4dtokenmanager.requesttoken.md) | <code>protected</code> | |
|
|
35
35
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## FileObject interface
|
|
6
6
|
|
|
7
|
-
(C) Copyright IBM Corp. 2014,
|
|
7
|
+
(C) Copyright IBM Corp. 2014, 2022.
|
|
8
8
|
|
|
9
9
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
|
10
10
|
|
|
@@ -20,8 +20,8 @@ export interface FileObject
|
|
|
20
20
|
|
|
21
21
|
## Properties
|
|
22
22
|
|
|
23
|
-
| Property | Type | Description |
|
|
24
|
-
| --- | --- | --- |
|
|
25
|
-
| [options?](./ibm-cloud-sdk-core.fileobject.options.md) | [FileOptions](./ibm-cloud-sdk-core.fileoptions.md) | <i>(Optional)</i> |
|
|
26
|
-
| [value](./ibm-cloud-sdk-core.fileobject.value.md) | NodeJS.ReadableStream \| Buffer \| string | |
|
|
23
|
+
| Property | Modifiers | Type | Description |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| [options?](./ibm-cloud-sdk-core.fileobject.options.md) | | [FileOptions](./ibm-cloud-sdk-core.fileoptions.md) | <i>(Optional)</i> |
|
|
26
|
+
| [value](./ibm-cloud-sdk-core.fileobject.value.md) | | NodeJS.ReadableStream \| Buffer \| string | |
|
|
27
27
|
|
|
@@ -12,8 +12,8 @@ export interface FileOptions
|
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
15
|
-
| Property | Type | Description |
|
|
16
|
-
| --- | --- | --- |
|
|
17
|
-
| [contentType?](./ibm-cloud-sdk-core.fileoptions.contenttype.md) | string | <i>(Optional)</i> |
|
|
18
|
-
| [filename?](./ibm-cloud-sdk-core.fileoptions.filename.md) | string | <i>(Optional)</i> |
|
|
15
|
+
| Property | Modifiers | Type | Description |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| [contentType?](./ibm-cloud-sdk-core.fileoptions.contenttype.md) | | string | <i>(Optional)</i> |
|
|
18
|
+
| [filename?](./ibm-cloud-sdk-core.fileoptions.filename.md) | | string | <i>(Optional)</i> |
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ export interface FileStream extends NodeJS.ReadableStream
|
|
|
13
13
|
|
|
14
14
|
## Properties
|
|
15
15
|
|
|
16
|
-
| Property | Type | Description |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| [path](./ibm-cloud-sdk-core.filestream.path.md) | string \| Buffer | |
|
|
16
|
+
| Property | Modifiers | Type | Description |
|
|
17
|
+
| --- | --- | --- | --- |
|
|
18
|
+
| [path](./ibm-cloud-sdk-core.filestream.path.md) | | string \| Buffer | |
|
|
19
19
|
|
|
@@ -12,9 +12,9 @@ export interface FileWithMetadata
|
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
15
|
-
| Property | Type | Description |
|
|
16
|
-
| --- | --- | --- |
|
|
17
|
-
| [contentType](./ibm-cloud-sdk-core.filewithmetadata.contenttype.md) | string | |
|
|
18
|
-
| [data](./ibm-cloud-sdk-core.filewithmetadata.data.md) | NodeJS.ReadableStream \| Buffer | |
|
|
19
|
-
| [filename](./ibm-cloud-sdk-core.filewithmetadata.filename.md) | string | |
|
|
15
|
+
| Property | Modifiers | Type | Description |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| [contentType](./ibm-cloud-sdk-core.filewithmetadata.contenttype.md) | | string | |
|
|
18
|
+
| [data](./ibm-cloud-sdk-core.filewithmetadata.data.md) | | NodeJS.ReadableStream \| Buffer | |
|
|
19
|
+
| [filename](./ibm-cloud-sdk-core.filewithmetadata.filename.md) | | string | |
|
|
20
20
|
|
|
@@ -18,7 +18,7 @@ export declare function getAuthenticatorFromEnvironment(serviceName: string): Au
|
|
|
18
18
|
|
|
19
19
|
| Parameter | Type | Description |
|
|
20
20
|
| --- | --- | --- |
|
|
21
|
-
| serviceName | string |
|
|
21
|
+
| serviceName | string | the service name prefix. |
|
|
22
22
|
|
|
23
23
|
<b>Returns:</b>
|
|
24
24
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## getCurrentTime() function
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Gets the current time.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -15,5 +15,5 @@ export declare function getCurrentTime(): number;
|
|
|
15
15
|
|
|
16
16
|
number
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
the current time in seconds.
|
|
19
19
|
|
|
@@ -23,9 +23,5 @@ export declare function getQueryParam(urlStr: string, param: string): string;
|
|
|
23
23
|
|
|
24
24
|
string
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Exceptions
|
|
29
|
-
|
|
30
|
-
if urlStr is an invalid URL
|
|
26
|
+
the value of the "param" query parameter
|
|
31
27
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## IamAuthenticator.(constructor)
|
|
6
6
|
|
|
7
|
-
Create a new
|
|
7
|
+
Create a new IamAuthenticator instance.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,9 +16,9 @@ constructor(options: Options);
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| options | Options | Configuration options for IAM authentication. |
|
|
19
|
+
| options | Options | Configuration options for IAM authentication. This should be an object containing these fields: - url: (optional) the endpoint URL for the token service - apikey: (required) the IAM api key - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - headers: (optional) a set of HTTP headers to be sent with each request to the token service - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service |
|
|
20
20
|
|
|
21
21
|
## Exceptions
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Error: the configuration options are not valid.
|
|
24
24
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## IamAuthenticator class
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
The IamAuthenticator will use the user-supplied `apikey` value to obtain a bearer token from a token server. When the bearer token expires, a new token is obtained from the token server. If specified, the optional, mutually inclusive "clientId" and "clientSecret" pair can be used to influence rate-limiting for requests to the IAM token server.
|
|
8
8
|
|
|
9
9
|
The bearer token will be sent as an Authorization header in the form:
|
|
10
10
|
|
|
11
|
-
Authorization: Bearer
|
|
11
|
+
Authorization: Bearer <<!-- -->bearer-token<!-- -->>
|
|
12
12
|
|
|
13
13
|
<b>Signature:</b>
|
|
14
14
|
|
|
@@ -21,14 +21,14 @@ export declare class IamAuthenticator extends IamRequestBasedAuthenticator
|
|
|
21
21
|
|
|
22
22
|
| Constructor | Modifiers | Description |
|
|
23
23
|
| --- | --- | --- |
|
|
24
|
-
| [(constructor)(options)](./ibm-cloud-sdk-core.iamauthenticator._constructor_.md) | | Create a new
|
|
24
|
+
| [(constructor)(options)](./ibm-cloud-sdk-core.iamauthenticator._constructor_.md) | | Create a new IamAuthenticator instance. |
|
|
25
25
|
|
|
26
26
|
## Properties
|
|
27
27
|
|
|
28
28
|
| Property | Modifiers | Type | Description |
|
|
29
29
|
| --- | --- | --- | --- |
|
|
30
|
-
| [requiredOptions](./ibm-cloud-sdk-core.iamauthenticator.requiredoptions.md) |
|
|
31
|
-
| [tokenManager](./ibm-cloud-sdk-core.iamauthenticator.tokenmanager.md) |
|
|
30
|
+
| [requiredOptions](./ibm-cloud-sdk-core.iamauthenticator.requiredoptions.md) | <code>protected</code> | string\[\] | |
|
|
31
|
+
| [tokenManager](./ibm-cloud-sdk-core.iamauthenticator.tokenmanager.md) | <code>protected</code> | [IamTokenManager](./ibm-cloud-sdk-core.iamtokenmanager.md) | |
|
|
32
32
|
|
|
33
33
|
## Methods
|
|
34
34
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## IamRequestBasedAuthenticator.(constructor)
|
|
6
6
|
|
|
7
|
-
Create a new
|
|
7
|
+
Create a new IamRequestBasedAuthenticator instance.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
@@ -16,9 +16,9 @@ constructor(options: IamRequestOptions);
|
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| options |
|
|
19
|
+
| options | IamRequestOptions | Configuration options for IAM authentication. This should be an object containing these fields: - url: (optional) the endpoint URL for the token service - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - headers: (optional) a set of HTTP headers to be sent with each request to the token service - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic Authorization header to be included in each request to the token service - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service |
|
|
20
20
|
|
|
21
21
|
## Exceptions
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Error: the configuration options are not valid.
|
|
24
24
|
|