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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -34,9 +34,8 @@ export interface AuthenticatorInterface {
|
|
|
34
34
|
/**
|
|
35
35
|
* Add authentication information to the specified request.
|
|
36
36
|
*
|
|
37
|
-
* @param
|
|
38
|
-
*
|
|
39
|
-
* authentication information will be added to.
|
|
37
|
+
* @param requestOptions - The request to which authentication information is added
|
|
38
|
+
* (in the headers field).
|
|
40
39
|
*/
|
|
41
40
|
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
42
41
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -33,25 +33,21 @@ export declare class Authenticator implements AuthenticatorInterface {
|
|
|
33
33
|
/**
|
|
34
34
|
* Create a new Authenticator instance.
|
|
35
35
|
*
|
|
36
|
-
* @throws
|
|
37
|
-
* authenticator.
|
|
36
|
+
* @throws Error: the "new" keyword was not used to construct the authenticator.
|
|
38
37
|
*/
|
|
39
38
|
constructor();
|
|
40
39
|
/**
|
|
41
40
|
* Augment the request with authentication information.
|
|
42
41
|
*
|
|
43
|
-
* @param
|
|
44
|
-
* @
|
|
45
|
-
* authentication information will be added too.
|
|
46
|
-
* @throws {Error} - The authenticate method was not implemented by a
|
|
47
|
-
* subclass.
|
|
42
|
+
* @param requestOptions - The request to augment with authentication information.
|
|
43
|
+
* @throws Error: The authenticate method was not implemented by a subclass.
|
|
48
44
|
*/
|
|
49
45
|
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
50
46
|
/**
|
|
51
47
|
* Retrieves the authenticator's type.
|
|
52
48
|
* The returned value will be the same string that is used
|
|
53
49
|
* when configuring an instance of the authenticator with the
|
|
54
|
-
*
|
|
50
|
+
* \<service_name\>_AUTH_TYPE configuration property
|
|
55
51
|
* (e.g. "basic", "iam", etc.).
|
|
56
52
|
* This function should be overridden in each authenticator
|
|
57
53
|
* implementation class that extends this class.
|
|
@@ -7,8 +7,7 @@ export class Authenticator {
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a new Authenticator instance.
|
|
9
9
|
*
|
|
10
|
-
* @throws
|
|
11
|
-
* authenticator.
|
|
10
|
+
* @throws Error: the "new" keyword was not used to construct the authenticator.
|
|
12
11
|
*/
|
|
13
12
|
constructor() {
|
|
14
13
|
if (!(this instanceof Authenticator)) {
|
|
@@ -18,11 +17,8 @@ export class Authenticator {
|
|
|
18
17
|
/**
|
|
19
18
|
* Augment the request with authentication information.
|
|
20
19
|
*
|
|
21
|
-
* @param
|
|
22
|
-
* @
|
|
23
|
-
* authentication information will be added too.
|
|
24
|
-
* @throws {Error} - The authenticate method was not implemented by a
|
|
25
|
-
* subclass.
|
|
20
|
+
* @param requestOptions - The request to augment with authentication information.
|
|
21
|
+
* @throws Error: The authenticate method was not implemented by a subclass.
|
|
26
22
|
*/
|
|
27
23
|
authenticate(requestOptions) {
|
|
28
24
|
const error = new Error('Should be implemented by subclass!');
|
|
@@ -32,7 +28,7 @@ export class Authenticator {
|
|
|
32
28
|
* Retrieves the authenticator's type.
|
|
33
29
|
* The returned value will be the same string that is used
|
|
34
30
|
* when configuring an instance of the authenticator with the
|
|
35
|
-
*
|
|
31
|
+
* \<service_name\>_AUTH_TYPE configuration property
|
|
36
32
|
* (e.g. "basic", "iam", etc.).
|
|
37
33
|
* This function should be overridden in each authenticator
|
|
38
34
|
* implementation class that extends this class.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -28,7 +28,7 @@ export type Options = {
|
|
|
28
28
|
*
|
|
29
29
|
* Basic Authorization will be sent as an Authorization header in the form:
|
|
30
30
|
*
|
|
31
|
-
* Authorization: Basic
|
|
31
|
+
* Authorization: Basic \<encoded username and password\>
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
34
|
export declare class BasicAuthenticator extends Authenticator {
|
|
@@ -39,21 +39,21 @@ export declare class BasicAuthenticator extends Authenticator {
|
|
|
39
39
|
/**
|
|
40
40
|
* Create a new BasicAuthenticator instance.
|
|
41
41
|
*
|
|
42
|
-
* @param
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
42
|
+
* @param options - Configuration options for basic authentication.
|
|
43
|
+
* This should be an object containing these fields:
|
|
44
|
+
* - username: the username portion of basic authentication
|
|
45
|
+
* - password: the password portion of basic authentication
|
|
46
|
+
*
|
|
47
|
+
* @throws Error: the configuration options are not valid.
|
|
46
48
|
*/
|
|
47
49
|
constructor(options: Options);
|
|
48
50
|
/**
|
|
49
|
-
* Add basic authentication information to `
|
|
50
|
-
* will be set in the Authorization property of`
|
|
51
|
+
* Add basic authentication information to `requestOptions`. The basic authentication information
|
|
52
|
+
* will be set in the Authorization property of `requestOptions.headers` in the form:
|
|
51
53
|
*
|
|
52
|
-
* Authorization: Basic
|
|
54
|
+
* Authorization: Basic \<encoded username and password\>
|
|
53
55
|
*
|
|
54
|
-
* @param
|
|
55
|
-
* @param {object.<string, string>} requestOptions.headers - The headers the
|
|
56
|
-
* authentication information will be added too.
|
|
56
|
+
* @param requestOptions - The request to augment with authentication information.
|
|
57
57
|
*/
|
|
58
58
|
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
59
59
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -22,17 +22,19 @@ import { Authenticator } from './authenticator';
|
|
|
22
22
|
*
|
|
23
23
|
* Basic Authorization will be sent as an Authorization header in the form:
|
|
24
24
|
*
|
|
25
|
-
* Authorization: Basic
|
|
25
|
+
* Authorization: Basic \<encoded username and password\>
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class BasicAuthenticator extends Authenticator {
|
|
29
29
|
/**
|
|
30
30
|
* Create a new BasicAuthenticator instance.
|
|
31
31
|
*
|
|
32
|
-
* @param
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* @param options - Configuration options for basic authentication.
|
|
33
|
+
* This should be an object containing these fields:
|
|
34
|
+
* - username: the username portion of basic authentication
|
|
35
|
+
* - password: the password portion of basic authentication
|
|
36
|
+
*
|
|
37
|
+
* @throws Error: the configuration options are not valid.
|
|
36
38
|
*/
|
|
37
39
|
constructor(options) {
|
|
38
40
|
super();
|
|
@@ -43,14 +45,12 @@ export class BasicAuthenticator extends Authenticator {
|
|
|
43
45
|
this.authHeader = { Authorization: authHeaderString };
|
|
44
46
|
}
|
|
45
47
|
/**
|
|
46
|
-
* Add basic authentication information to `
|
|
47
|
-
* will be set in the Authorization property of`
|
|
48
|
+
* Add basic authentication information to `requestOptions`. The basic authentication information
|
|
49
|
+
* will be set in the Authorization property of `requestOptions.headers` in the form:
|
|
48
50
|
*
|
|
49
|
-
* Authorization: Basic
|
|
51
|
+
* Authorization: Basic \<encoded username and password\>
|
|
50
52
|
*
|
|
51
|
-
* @param
|
|
52
|
-
* @param {object.<string, string>} requestOptions.headers - The headers the
|
|
53
|
-
* authentication information will be added too.
|
|
53
|
+
* @param requestOptions - The request to augment with authentication information.
|
|
54
54
|
*/
|
|
55
55
|
authenticate(requestOptions) {
|
|
56
56
|
return new Promise((resolve) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -26,7 +26,7 @@ export type Options = {
|
|
|
26
26
|
*
|
|
27
27
|
* The bearer token will be sent as an Authorization header in the form:
|
|
28
28
|
*
|
|
29
|
-
* Authorization: Bearer
|
|
29
|
+
* Authorization: Bearer \<bearer-token\>
|
|
30
30
|
*/
|
|
31
31
|
export declare class BearerTokenAuthenticator extends Authenticator {
|
|
32
32
|
protected requiredOptions: string[];
|
|
@@ -34,29 +34,26 @@ export declare class BearerTokenAuthenticator extends Authenticator {
|
|
|
34
34
|
/**
|
|
35
35
|
* Create a new BearerTokenAuthenticator instance.
|
|
36
36
|
*
|
|
37
|
-
* @param
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @throws
|
|
37
|
+
* @param options - Configuration options for bearer authentication.
|
|
38
|
+
* This should be an object containing the "bearerToken" field.
|
|
39
|
+
*
|
|
40
|
+
* @throws Error: the options.bearerToken field is not valid, or unspecified
|
|
41
41
|
*/
|
|
42
42
|
constructor(options: Options);
|
|
43
43
|
/**
|
|
44
44
|
* Set a new bearer token to be sent in subsequent requests.
|
|
45
45
|
*
|
|
46
|
-
* @param
|
|
46
|
+
* @param bearerToken - The bearer token that will be sent in service
|
|
47
47
|
* requests.
|
|
48
48
|
*/
|
|
49
49
|
setBearerToken(bearerToken: string): void;
|
|
50
50
|
/**
|
|
51
|
-
* Add a bearer token to
|
|
52
|
-
* will be set in the Authorization property of
|
|
51
|
+
* Add a bearer token to `requestOptions`. The bearer token information
|
|
52
|
+
* will be set in the Authorization property of "requestOptions.headers" in the form:
|
|
53
53
|
*
|
|
54
|
-
* Authorization: Bearer
|
|
54
|
+
* Authorization: Bearer \<bearer-token\>
|
|
55
55
|
*
|
|
56
|
-
* @param
|
|
57
|
-
* information.
|
|
58
|
-
* @param {object.<string, string>} requestOptions.headers - The headers the
|
|
59
|
-
* authentication information will be added to.
|
|
56
|
+
* @param requestOptions - The request to augment with authentication information.
|
|
60
57
|
*/
|
|
61
58
|
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
62
59
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -22,16 +22,16 @@ import { Authenticator } from './authenticator';
|
|
|
22
22
|
*
|
|
23
23
|
* The bearer token will be sent as an Authorization header in the form:
|
|
24
24
|
*
|
|
25
|
-
* Authorization: Bearer
|
|
25
|
+
* Authorization: Bearer \<bearer-token\>
|
|
26
26
|
*/
|
|
27
27
|
export class BearerTokenAuthenticator extends Authenticator {
|
|
28
28
|
/**
|
|
29
29
|
* Create a new BearerTokenAuthenticator instance.
|
|
30
30
|
*
|
|
31
|
-
* @param
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @throws
|
|
31
|
+
* @param options - Configuration options for bearer authentication.
|
|
32
|
+
* This should be an object containing the "bearerToken" field.
|
|
33
|
+
*
|
|
34
|
+
* @throws Error: the options.bearerToken field is not valid, or unspecified
|
|
35
35
|
*/
|
|
36
36
|
constructor(options) {
|
|
37
37
|
super();
|
|
@@ -42,22 +42,19 @@ export class BearerTokenAuthenticator extends Authenticator {
|
|
|
42
42
|
/**
|
|
43
43
|
* Set a new bearer token to be sent in subsequent requests.
|
|
44
44
|
*
|
|
45
|
-
* @param
|
|
45
|
+
* @param bearerToken - The bearer token that will be sent in service
|
|
46
46
|
* requests.
|
|
47
47
|
*/
|
|
48
48
|
setBearerToken(bearerToken) {
|
|
49
49
|
this.bearerToken = bearerToken;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Add a bearer token to
|
|
53
|
-
* will be set in the Authorization property of
|
|
52
|
+
* Add a bearer token to `requestOptions`. The bearer token information
|
|
53
|
+
* will be set in the Authorization property of "requestOptions.headers" in the form:
|
|
54
54
|
*
|
|
55
|
-
* Authorization: Bearer
|
|
55
|
+
* Authorization: Bearer \<bearer-token\>
|
|
56
56
|
*
|
|
57
|
-
* @param
|
|
58
|
-
* information.
|
|
59
|
-
* @param {object.<string, string>} requestOptions.headers - The headers the
|
|
60
|
-
* authentication information will be added to.
|
|
57
|
+
* @param requestOptions - The request to augment with authentication information.
|
|
61
58
|
*/
|
|
62
59
|
authenticate(requestOptions) {
|
|
63
60
|
return new Promise((resolve) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -27,12 +27,12 @@ export interface Options extends BaseOptions {
|
|
|
27
27
|
url: string;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* The
|
|
30
|
+
* The CloudPakForDataAuthenticator will either use a username/password pair or a username/apikey pair to obtain
|
|
31
31
|
* a bearer token from a token server. When the bearer token expires, a new token is obtained from the token server.
|
|
32
32
|
*
|
|
33
33
|
* The bearer token will be sent as an Authorization header in the form:
|
|
34
34
|
*
|
|
35
|
-
* Authorization: Bearer
|
|
35
|
+
* Authorization: Bearer \<bearer-token\>
|
|
36
36
|
*/
|
|
37
37
|
export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthenticator {
|
|
38
38
|
protected requiredOptions: string[];
|
|
@@ -41,19 +41,19 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
41
41
|
private password;
|
|
42
42
|
private apikey;
|
|
43
43
|
/**
|
|
44
|
-
* Create a new
|
|
44
|
+
* Create a new CloudPakForDataAuthenticator instance.
|
|
45
45
|
*
|
|
46
|
-
* @param
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
46
|
+
* @param options - Configuration options for CloudPakForData authentication.
|
|
47
|
+
* This should be an object containing these fields:
|
|
48
|
+
* - url: (required) the endpoint URL for the CloudPakForData token service
|
|
49
|
+
* - username: (required) the username used to obtain a bearer token
|
|
50
|
+
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
51
|
+
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
52
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
53
|
+
* should be disabled or not
|
|
54
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
55
|
+
*
|
|
56
|
+
* @throws Error: the username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token requests.
|
|
57
57
|
*/
|
|
58
58
|
constructor(options: Options);
|
|
59
59
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp. 2019,
|
|
2
|
+
* (C) Copyright IBM Corp. 2019, 2022.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -17,28 +17,28 @@ import { Authenticator } from './authenticator';
|
|
|
17
17
|
import { Cp4dTokenManager } from '../token-managers';
|
|
18
18
|
import { TokenRequestBasedAuthenticator } from './token-request-based-authenticator';
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
20
|
+
* The CloudPakForDataAuthenticator will either use a username/password pair or a username/apikey pair to obtain
|
|
21
21
|
* a bearer token from a token server. When the bearer token expires, a new token is obtained from the token server.
|
|
22
22
|
*
|
|
23
23
|
* The bearer token will be sent as an Authorization header in the form:
|
|
24
24
|
*
|
|
25
|
-
* Authorization: Bearer
|
|
25
|
+
* Authorization: Bearer \<bearer-token\>
|
|
26
26
|
*/
|
|
27
27
|
export class CloudPakForDataAuthenticator extends TokenRequestBasedAuthenticator {
|
|
28
28
|
/**
|
|
29
|
-
* Create a new
|
|
29
|
+
* Create a new CloudPakForDataAuthenticator instance.
|
|
30
30
|
*
|
|
31
|
-
* @param
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
31
|
+
* @param options - Configuration options for CloudPakForData authentication.
|
|
32
|
+
* This should be an object containing these fields:
|
|
33
|
+
* - url: (required) the endpoint URL for the CloudPakForData token service
|
|
34
|
+
* - username: (required) the username used to obtain a bearer token
|
|
35
|
+
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
36
|
+
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
37
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
38
|
+
* should be disabled or not
|
|
39
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
40
|
+
*
|
|
41
|
+
* @throws Error: the username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token requests.
|
|
42
42
|
*/
|
|
43
43
|
constructor(options) {
|
|
44
44
|
super(options);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2021 IBM Corp. All Rights Reserved.
|
|
2
|
+
* Copyright 2021, 2022 IBM Corp. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -25,13 +25,13 @@ export interface Options extends IamRequestOptions {
|
|
|
25
25
|
iamProfileId?: string;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* The
|
|
28
|
+
* The ContainerAuthenticator will read a compute resource token from the file system
|
|
29
29
|
* and use this value to obtain a bearer token from the IAM token server. When the bearer
|
|
30
30
|
* token expires, a new token is obtained from the token server.
|
|
31
31
|
*
|
|
32
32
|
* The bearer token will be sent as an Authorization header in the form:
|
|
33
33
|
*
|
|
34
|
-
* Authorization: Bearer
|
|
34
|
+
* Authorization: Bearer \<bearer-token\>
|
|
35
35
|
*/
|
|
36
36
|
export declare class ContainerAuthenticator extends IamRequestBasedAuthenticator {
|
|
37
37
|
protected tokenManager: ContainerTokenManager;
|
|
@@ -40,39 +40,39 @@ export declare class ContainerAuthenticator extends IamRequestBasedAuthenticator
|
|
|
40
40
|
private iamProfileId;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
|
-
* Create a new
|
|
43
|
+
* Create a new ContainerAuthenticator instance.
|
|
44
44
|
*
|
|
45
|
-
* @param
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* @throws
|
|
45
|
+
* @param options - Configuration options for IAM authentication.
|
|
46
|
+
* This should be an object containing these fields:
|
|
47
|
+
* - url: (optional) the endpoint URL for the token service
|
|
48
|
+
* - crTokenFilename: (optional) the file containing the compute resource token
|
|
49
|
+
* - iamProfileName: (optional) the name of the IAM trusted profile associated with the compute resource token (required if iamProfileId is not specified)
|
|
50
|
+
* - iamProfileId]: (optional) the ID of the IAM trusted profile associated with the compute resource token (required if iamProfileName is not specified)
|
|
51
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
52
|
+
* should be disabled or not
|
|
53
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
54
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
55
|
+
* Authorization header to be included in each request to the token service
|
|
56
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
57
|
+
* Authorization header to be included in each request to the token service
|
|
58
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
59
|
+
*
|
|
60
|
+
* @throws Error: the configuration options are not valid.
|
|
61
61
|
*/
|
|
62
62
|
constructor(options: Options);
|
|
63
63
|
/**
|
|
64
64
|
* Setter for the filename of the compute resource token.
|
|
65
|
-
* @param
|
|
65
|
+
* @param crTokenFilename - A string containing a path to the CR token file
|
|
66
66
|
*/
|
|
67
67
|
setCrTokenFilename(crTokenFilename: string): void;
|
|
68
68
|
/**
|
|
69
69
|
* Setter for the "profile_name" parameter to use when fetching the bearer token from the IAM token server.
|
|
70
|
-
* @param
|
|
70
|
+
* @param iamProfileName - the name of the IAM trusted profile
|
|
71
71
|
*/
|
|
72
72
|
setIamProfileName(iamProfileName: string): void;
|
|
73
73
|
/**
|
|
74
74
|
* Setter for the "profile_id" parameter to use when fetching the bearer token from the IAM token server.
|
|
75
|
-
* @param
|
|
75
|
+
* @param iamProfileId - the ID of the IAM trusted profile
|
|
76
76
|
*/
|
|
77
77
|
setIamProfileId(iamProfileId: string): void;
|
|
78
78
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2021 IBM Corp. All Rights Reserved.
|
|
2
|
+
* Copyright 2021, 2022 IBM Corp. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -17,35 +17,35 @@ import { Authenticator } from './authenticator';
|
|
|
17
17
|
import { ContainerTokenManager } from '../token-managers';
|
|
18
18
|
import { IamRequestBasedAuthenticator } from './iam-request-based-authenticator';
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
20
|
+
* The ContainerAuthenticator will read a compute resource token from the file system
|
|
21
21
|
* and use this value to obtain a bearer token from the IAM token server. When the bearer
|
|
22
22
|
* token expires, a new token is obtained from the token server.
|
|
23
23
|
*
|
|
24
24
|
* The bearer token will be sent as an Authorization header in the form:
|
|
25
25
|
*
|
|
26
|
-
* Authorization: Bearer
|
|
26
|
+
* Authorization: Bearer \<bearer-token\>
|
|
27
27
|
*/
|
|
28
28
|
export class ContainerAuthenticator extends IamRequestBasedAuthenticator {
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
|
-
* Create a new
|
|
31
|
+
* Create a new ContainerAuthenticator instance.
|
|
32
32
|
*
|
|
33
|
-
* @param
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @throws
|
|
33
|
+
* @param options - Configuration options for IAM authentication.
|
|
34
|
+
* This should be an object containing these fields:
|
|
35
|
+
* - url: (optional) the endpoint URL for the token service
|
|
36
|
+
* - crTokenFilename: (optional) the file containing the compute resource token
|
|
37
|
+
* - iamProfileName: (optional) the name of the IAM trusted profile associated with the compute resource token (required if iamProfileId is not specified)
|
|
38
|
+
* - iamProfileId]: (optional) the ID of the IAM trusted profile associated with the compute resource token (required if iamProfileName is not specified)
|
|
39
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
40
|
+
* should be disabled or not
|
|
41
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
42
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
43
|
+
* Authorization header to be included in each request to the token service
|
|
44
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
45
|
+
* Authorization header to be included in each request to the token service
|
|
46
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
47
|
+
*
|
|
48
|
+
* @throws Error: the configuration options are not valid.
|
|
49
49
|
*/
|
|
50
50
|
constructor(options) {
|
|
51
51
|
super(options);
|
|
@@ -59,7 +59,7 @@ export class ContainerAuthenticator extends IamRequestBasedAuthenticator {
|
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Setter for the filename of the compute resource token.
|
|
62
|
-
* @param
|
|
62
|
+
* @param crTokenFilename - A string containing a path to the CR token file
|
|
63
63
|
*/
|
|
64
64
|
setCrTokenFilename(crTokenFilename) {
|
|
65
65
|
this.crTokenFilename = crTokenFilename;
|
|
@@ -68,7 +68,7 @@ export class ContainerAuthenticator extends IamRequestBasedAuthenticator {
|
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Setter for the "profile_name" parameter to use when fetching the bearer token from the IAM token server.
|
|
71
|
-
* @param
|
|
71
|
+
* @param iamProfileName - the name of the IAM trusted profile
|
|
72
72
|
*/
|
|
73
73
|
setIamProfileName(iamProfileName) {
|
|
74
74
|
this.iamProfileName = iamProfileName;
|
|
@@ -77,7 +77,7 @@ export class ContainerAuthenticator extends IamRequestBasedAuthenticator {
|
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Setter for the "profile_id" parameter to use when fetching the bearer token from the IAM token server.
|
|
80
|
-
* @param
|
|
80
|
+
* @param iamProfileId - the ID of the IAM trusted profile
|
|
81
81
|
*/
|
|
82
82
|
setIamProfileId(iamProfileId) {
|
|
83
83
|
this.iamProfileId = iamProfileId;
|