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
|
-
* 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.
|
|
@@ -31,44 +31,42 @@ export declare class ContainerTokenManager extends IamRequestBasedTokenManager {
|
|
|
31
31
|
private iamProfileId;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* Create a new
|
|
34
|
+
* Create a new ContainerTokenManager instance.
|
|
35
35
|
*
|
|
36
|
-
* @param
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* @
|
|
36
|
+
* @param options - Configuration options.
|
|
37
|
+
* This should be an object containing these fields:
|
|
38
|
+
* - url: (optional) the endpoint URL for the token service (default: "https://iam.cloud.ibm.com")
|
|
39
|
+
* - crTokenFilename: (optional) the file containing the compute resource token (default: "/var/run/secrets/tokens/vault-token")
|
|
40
|
+
* - iamProfileName: (optional) the name of the IAM trusted profile associated with the compute resource token (required if iamProfileId is not specified)
|
|
41
|
+
* - iamProfileId]: (optional) the ID of the IAM trusted profile associated with the compute resource token (required if iamProfileName is not specified)
|
|
42
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
43
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
44
|
+
* should be disabled or not
|
|
45
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
46
|
+
* Authorization header to be included in each request to the token service
|
|
47
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
48
|
+
* Authorization header to be included in each request to the token service
|
|
49
|
+
*
|
|
50
|
+
* @throws Error: the configuration options were invalid
|
|
51
51
|
*/
|
|
52
52
|
constructor(options: Options);
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
* @param
|
|
54
|
+
* Sets the "crTokenFilename" field
|
|
55
|
+
* @param crTokenFilename - the name of the file containing the CR token
|
|
56
56
|
*/
|
|
57
57
|
setCrTokenFilename(crTokenFilename: string): void;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
60
|
-
* @param
|
|
59
|
+
* Sets the name of the IAM trusted profile to use when obtaining an access token from the IAM token server.
|
|
60
|
+
* @param iamProfileName - the name of the IAM trusted profile
|
|
61
61
|
*/
|
|
62
62
|
setIamProfileName(iamProfileName: string): void;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
65
|
-
* @param
|
|
64
|
+
* Sets the ID of the IAM trusted profile to use when obtaining an access token from the IAM token server.
|
|
65
|
+
* @param iamProfileId - the ID of the IAM trusted profile
|
|
66
66
|
*/
|
|
67
67
|
setIamProfileId(iamProfileId: string): void;
|
|
68
68
|
/**
|
|
69
69
|
* Request an IAM token using a compute resource token.
|
|
70
|
-
*
|
|
71
|
-
* @returns {Promise}
|
|
72
70
|
*/
|
|
73
71
|
protected requestToken(): Promise<any>;
|
|
74
72
|
}
|
|
@@ -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.
|
|
@@ -34,23 +34,23 @@ const DEFAULT_CR_TOKEN_FILEPATH = '/var/run/secrets/tokens/vault-token';
|
|
|
34
34
|
export class ContainerTokenManager extends IamRequestBasedTokenManager {
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* Create a new
|
|
37
|
+
* Create a new ContainerTokenManager instance.
|
|
38
38
|
*
|
|
39
|
-
* @param
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* @
|
|
39
|
+
* @param options - Configuration options.
|
|
40
|
+
* This should be an object containing these fields:
|
|
41
|
+
* - url: (optional) the endpoint URL for the token service (default: "https://iam.cloud.ibm.com")
|
|
42
|
+
* - crTokenFilename: (optional) the file containing the compute resource token (default: "/var/run/secrets/tokens/vault-token")
|
|
43
|
+
* - iamProfileName: (optional) the name of the IAM trusted profile associated with the compute resource token (required if iamProfileId is not specified)
|
|
44
|
+
* - iamProfileId]: (optional) the ID of the IAM trusted profile associated with the compute resource token (required if iamProfileName is not specified)
|
|
45
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
46
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
47
|
+
* should be disabled or not
|
|
48
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
49
|
+
* Authorization header to be included in each request to the token service
|
|
50
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
51
|
+
* Authorization header to be included in each request to the token service
|
|
52
|
+
*
|
|
53
|
+
* @throws Error: the configuration options were invalid
|
|
54
54
|
*/
|
|
55
55
|
constructor(options) {
|
|
56
56
|
// all parameters are optional
|
|
@@ -70,30 +70,28 @@ export class ContainerTokenManager extends IamRequestBasedTokenManager {
|
|
|
70
70
|
this.formData.grant_type = 'urn:ibm:params:oauth:grant-type:cr-token';
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
74
|
-
* @param
|
|
73
|
+
* Sets the "crTokenFilename" field
|
|
74
|
+
* @param crTokenFilename - the name of the file containing the CR token
|
|
75
75
|
*/
|
|
76
76
|
setCrTokenFilename(crTokenFilename) {
|
|
77
77
|
this.crTokenFilename = crTokenFilename;
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @param
|
|
80
|
+
* Sets the name of the IAM trusted profile to use when obtaining an access token from the IAM token server.
|
|
81
|
+
* @param iamProfileName - the name of the IAM trusted profile
|
|
82
82
|
*/
|
|
83
83
|
setIamProfileName(iamProfileName) {
|
|
84
84
|
this.iamProfileName = iamProfileName;
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
88
|
-
* @param
|
|
87
|
+
* Sets the ID of the IAM trusted profile to use when obtaining an access token from the IAM token server.
|
|
88
|
+
* @param iamProfileId - the ID of the IAM trusted profile
|
|
89
89
|
*/
|
|
90
90
|
setIamProfileId(iamProfileId) {
|
|
91
91
|
this.iamProfileId = iamProfileId;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* Request an IAM token using a compute resource token.
|
|
95
|
-
*
|
|
96
|
-
* @returns {Promise}
|
|
97
95
|
*/
|
|
98
96
|
requestToken() {
|
|
99
97
|
const _super = Object.create(null, {
|
|
@@ -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.
|
|
@@ -49,19 +49,19 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
|
|
|
49
49
|
private password;
|
|
50
50
|
private apikey;
|
|
51
51
|
/**
|
|
52
|
-
* Create a new
|
|
52
|
+
* Create a new Cp4dTokenManager instance.
|
|
53
53
|
*
|
|
54
|
-
* @param
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* @
|
|
54
|
+
* @param options - Configuration options
|
|
55
|
+
* This should be an object containing these fields:
|
|
56
|
+
* - url: (required) the endpoint URL for the CloudPakForData token service
|
|
57
|
+
* - username: (required) the username used to obtain a bearer token
|
|
58
|
+
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
59
|
+
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
60
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
61
|
+
* should be disabled or not
|
|
62
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
63
|
+
*
|
|
64
|
+
* @throws Error: the configuration options were invalid.
|
|
65
65
|
*/
|
|
66
66
|
constructor(options: Options);
|
|
67
67
|
protected requestToken(): Promise<any>;
|
|
@@ -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.
|
|
@@ -24,19 +24,19 @@ import { JwtTokenManager } from './jwt-token-manager';
|
|
|
24
24
|
*/
|
|
25
25
|
export class Cp4dTokenManager extends JwtTokenManager {
|
|
26
26
|
/**
|
|
27
|
-
* Create a new
|
|
27
|
+
* Create a new Cp4dTokenManager instance.
|
|
28
28
|
*
|
|
29
|
-
* @param
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* @
|
|
29
|
+
* @param options - Configuration options
|
|
30
|
+
* This should be an object containing these fields:
|
|
31
|
+
* - url: (required) the endpoint URL for the CloudPakForData token service
|
|
32
|
+
* - username: (required) the username used to obtain a bearer token
|
|
33
|
+
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
34
|
+
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
35
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
36
|
+
* should be disabled or not
|
|
37
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
38
|
+
*
|
|
39
|
+
* @throws Error: the configuration options were invalid.
|
|
40
40
|
*/
|
|
41
41
|
constructor(options) {
|
|
42
42
|
super(options);
|
|
@@ -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.
|
|
@@ -35,63 +35,58 @@ export declare class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
|
35
35
|
protected formData: any;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* Create a new
|
|
38
|
+
* Create a new IamRequestBasedTokenManager instance.
|
|
39
39
|
*
|
|
40
|
-
* @param
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
40
|
+
* @param options - Configuration options.
|
|
41
|
+
* This should be an object containing these fields:
|
|
42
|
+
* - url: (optional) the endpoint URL for the token service (default value: "https://iam.cloud.ibm.com")
|
|
43
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
44
|
+
* should be disabled or not
|
|
45
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
46
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
47
|
+
* Authorization header to be included in each request to the token service
|
|
48
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
49
|
+
* Authorization header to be included in each request to the token service
|
|
50
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
51
|
+
*
|
|
52
|
+
* @throws Error: the configuration options are not valid.
|
|
52
53
|
*/
|
|
53
54
|
constructor(options: IamRequestOptions);
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
-
* This value is the form parameter
|
|
57
|
-
* from the IAM token server.
|
|
56
|
+
* Sets the IAM "scope" value.
|
|
57
|
+
* This value is sent as the "scope" form parameter within the request sent to the IAM token service.
|
|
58
58
|
*
|
|
59
|
-
* @param
|
|
60
|
-
* @returns {void}
|
|
59
|
+
* @param scope - a space-separated string that contains one or more scope names
|
|
61
60
|
*/
|
|
62
61
|
setScope(scope: string): void;
|
|
63
62
|
/**
|
|
64
|
-
*
|
|
63
|
+
* Sets the IAM "clientId" and "clientSecret" values.
|
|
65
64
|
* These values are used to compute the Authorization header used
|
|
66
65
|
* when retrieving the IAM access token.
|
|
67
66
|
* If these values are not set, no Authorization header will be
|
|
68
67
|
* set on the request (it is not required).
|
|
69
68
|
*
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
* @returns {void}
|
|
69
|
+
* @param clientId - the client id.
|
|
70
|
+
* @param clientSecret - the client secret.
|
|
73
71
|
*/
|
|
74
72
|
setClientIdAndSecret(clientId: string, clientSecret: string): void;
|
|
75
73
|
/**
|
|
76
|
-
*
|
|
74
|
+
* Returns the most recently stored refresh token.
|
|
77
75
|
*
|
|
78
|
-
* @
|
|
79
|
-
* @returns {string}
|
|
76
|
+
* @returns the refresh token
|
|
80
77
|
*/
|
|
81
78
|
getRefreshToken(): string;
|
|
82
79
|
/**
|
|
83
80
|
* Extend this method from the parent class to extract the refresh token from
|
|
84
81
|
* the request and save it.
|
|
85
82
|
*
|
|
86
|
-
* @param tokenResponse -
|
|
87
|
-
* @protected
|
|
88
|
-
* @returns {void}
|
|
83
|
+
* @param tokenResponse - the response object from JWT service request
|
|
89
84
|
*/
|
|
90
85
|
protected saveTokenInfo(tokenResponse: any): void;
|
|
91
86
|
/**
|
|
92
|
-
* Request an IAM token using an API key.
|
|
87
|
+
* Request an IAM access token using an API key.
|
|
93
88
|
*
|
|
94
|
-
* @returns
|
|
89
|
+
* @returns Promise
|
|
95
90
|
*/
|
|
96
91
|
protected requestToken(): Promise<any>;
|
|
97
92
|
}
|
|
@@ -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.
|
|
@@ -30,20 +30,21 @@ const OPERATION_PATH = '/identity/token';
|
|
|
30
30
|
export class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
|
-
* Create a new
|
|
33
|
+
* Create a new IamRequestBasedTokenManager instance.
|
|
34
34
|
*
|
|
35
|
-
* @param
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
35
|
+
* @param options - Configuration options.
|
|
36
|
+
* This should be an object containing these fields:
|
|
37
|
+
* - url: (optional) the endpoint URL for the token service (default value: "https://iam.cloud.ibm.com")
|
|
38
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
39
|
+
* should be disabled or not
|
|
40
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
41
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
42
|
+
* Authorization header to be included in each request to the token service
|
|
43
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
44
|
+
* Authorization header to be included in each request to the token service
|
|
45
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
46
|
+
*
|
|
47
|
+
* @throws Error: the configuration options are not valid.
|
|
47
48
|
*/
|
|
48
49
|
constructor(options) {
|
|
49
50
|
// all parameters are optional
|
|
@@ -68,26 +69,23 @@ export class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
|
68
69
|
this.formData = {};
|
|
69
70
|
}
|
|
70
71
|
/**
|
|
71
|
-
*
|
|
72
|
-
* This value is the form parameter
|
|
73
|
-
* from the IAM token server.
|
|
72
|
+
* Sets the IAM "scope" value.
|
|
73
|
+
* This value is sent as the "scope" form parameter within the request sent to the IAM token service.
|
|
74
74
|
*
|
|
75
|
-
* @param
|
|
76
|
-
* @returns {void}
|
|
75
|
+
* @param scope - a space-separated string that contains one or more scope names
|
|
77
76
|
*/
|
|
78
77
|
setScope(scope) {
|
|
79
78
|
this.scope = scope;
|
|
80
79
|
}
|
|
81
80
|
/**
|
|
82
|
-
*
|
|
81
|
+
* Sets the IAM "clientId" and "clientSecret" values.
|
|
83
82
|
* These values are used to compute the Authorization header used
|
|
84
83
|
* when retrieving the IAM access token.
|
|
85
84
|
* If these values are not set, no Authorization header will be
|
|
86
85
|
* set on the request (it is not required).
|
|
87
86
|
*
|
|
88
|
-
* @param
|
|
89
|
-
* @param
|
|
90
|
-
* @returns {void}
|
|
87
|
+
* @param clientId - the client id.
|
|
88
|
+
* @param clientSecret - the client secret.
|
|
91
89
|
*/
|
|
92
90
|
setClientIdAndSecret(clientId, clientSecret) {
|
|
93
91
|
this.clientId = clientId;
|
|
@@ -98,10 +96,9 @@ export class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
|
98
96
|
}
|
|
99
97
|
}
|
|
100
98
|
/**
|
|
101
|
-
*
|
|
99
|
+
* Returns the most recently stored refresh token.
|
|
102
100
|
*
|
|
103
|
-
* @
|
|
104
|
-
* @returns {string}
|
|
101
|
+
* @returns the refresh token
|
|
105
102
|
*/
|
|
106
103
|
getRefreshToken() {
|
|
107
104
|
return this.refreshToken;
|
|
@@ -110,9 +107,7 @@ export class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
|
110
107
|
* Extend this method from the parent class to extract the refresh token from
|
|
111
108
|
* the request and save it.
|
|
112
109
|
*
|
|
113
|
-
* @param tokenResponse -
|
|
114
|
-
* @protected
|
|
115
|
-
* @returns {void}
|
|
110
|
+
* @param tokenResponse - the response object from JWT service request
|
|
116
111
|
*/
|
|
117
112
|
saveTokenInfo(tokenResponse) {
|
|
118
113
|
super.saveTokenInfo(tokenResponse);
|
|
@@ -122,9 +117,9 @@ export class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
119
|
/**
|
|
125
|
-
* Request an IAM token using an API key.
|
|
120
|
+
* Request an IAM access token using an API key.
|
|
126
121
|
*
|
|
127
|
-
* @returns
|
|
122
|
+
* @returns Promise
|
|
128
123
|
*/
|
|
129
124
|
requestToken() {
|
|
130
125
|
// these cannot be overwritten
|
|
@@ -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.
|
|
@@ -21,28 +21,29 @@ interface Options extends IamRequestOptions {
|
|
|
21
21
|
/**
|
|
22
22
|
* The IAMTokenManager takes an api key and performs the necessary interactions with
|
|
23
23
|
* the IAM token service to obtain and store a suitable bearer token. Additionally, the IAMTokenManager
|
|
24
|
-
* will retrieve bearer tokens via basic auth using a supplied
|
|
24
|
+
* will retrieve bearer tokens via basic auth using a supplied "clientId" and "clientSecret" pair.
|
|
25
25
|
*/
|
|
26
26
|
export declare class IamTokenManager extends IamRequestBasedTokenManager {
|
|
27
27
|
protected requiredOptions: string[];
|
|
28
28
|
private apikey;
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
|
-
* Create a new
|
|
31
|
+
* Create a new IamTokenManager instance.
|
|
32
32
|
*
|
|
33
|
-
* @param
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
33
|
+
* @param options - Configuration options.
|
|
34
|
+
* This should be an object containing these fields:
|
|
35
|
+
* - url: (optional) the endpoint URL for the IAM token service (default value: "https://iam.cloud.ibm.com")
|
|
36
|
+
* - apikey: (required) the IAM api key
|
|
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
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
41
|
+
* Authorization header to be included in each request to the token service
|
|
42
|
+
* - clientSecret: (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
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
45
|
+
*
|
|
46
|
+
* @throws Error: the configuration options are not valid.
|
|
46
47
|
*/
|
|
47
48
|
constructor(options: Options);
|
|
48
49
|
}
|
|
@@ -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.
|
|
@@ -18,26 +18,27 @@ import { IamRequestBasedTokenManager } from './iam-request-based-token-manager';
|
|
|
18
18
|
/**
|
|
19
19
|
* The IAMTokenManager takes an api key and performs the necessary interactions with
|
|
20
20
|
* the IAM token service to obtain and store a suitable bearer token. Additionally, the IAMTokenManager
|
|
21
|
-
* will retrieve bearer tokens via basic auth using a supplied
|
|
21
|
+
* will retrieve bearer tokens via basic auth using a supplied "clientId" and "clientSecret" pair.
|
|
22
22
|
*/
|
|
23
23
|
export class IamTokenManager extends IamRequestBasedTokenManager {
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
|
-
* Create a new
|
|
26
|
+
* Create a new IamTokenManager instance.
|
|
27
27
|
*
|
|
28
|
-
* @param
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
28
|
+
* @param options - Configuration options.
|
|
29
|
+
* This should be an object containing these fields:
|
|
30
|
+
* - url: (optional) the endpoint URL for the IAM token service (default value: "https://iam.cloud.ibm.com")
|
|
31
|
+
* - apikey: (required) the IAM api key
|
|
32
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
33
|
+
* should be disabled or not
|
|
34
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
35
|
+
* - clientId: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
36
|
+
* Authorization header to be included in each request to the token service
|
|
37
|
+
* - clientSecret: (optional) the "clientId" and "clientSecret" fields are used to form a Basic
|
|
38
|
+
* Authorization header to be included in each request to the token service
|
|
39
|
+
* - scope: (optional) the "scope" parameter to use when fetching the bearer token from the token service
|
|
40
|
+
*
|
|
41
|
+
* @throws Error: the configuration options are not valid.
|
|
41
42
|
*/
|
|
42
43
|
constructor(options) {
|
|
43
44
|
super(options);
|
|
@@ -11,29 +11,26 @@ export declare class JwtTokenManager extends TokenManager {
|
|
|
11
11
|
protected tokenName: string;
|
|
12
12
|
protected tokenInfo: any;
|
|
13
13
|
/**
|
|
14
|
-
* Create a new
|
|
15
|
-
*
|
|
16
|
-
* @param
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* outbound HTTP requests to token services.
|
|
14
|
+
* Create a new JwtTokenManager instance.
|
|
15
|
+
*
|
|
16
|
+
* @param options - Configuration options.
|
|
17
|
+
* This should be an object containing these fields:
|
|
18
|
+
* - url: (optional) the endpoint URL for the token service
|
|
19
|
+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
20
|
+
* should be disabled or not
|
|
21
|
+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
23
22
|
*/
|
|
24
23
|
constructor(options: JwtTokenManagerOptions);
|
|
25
24
|
/**
|
|
26
25
|
* Request a JWT using an API key.
|
|
27
26
|
*
|
|
28
|
-
* @returns
|
|
27
|
+
* @returns Promise
|
|
29
28
|
*/
|
|
30
29
|
protected requestToken(): Promise<any>;
|
|
31
30
|
/**
|
|
32
31
|
* Save the JWT service response and the calculated expiration time to the object's state.
|
|
33
32
|
*
|
|
34
|
-
* @param tokenResponse -
|
|
35
|
-
* @protected
|
|
36
|
-
* @returns {void}
|
|
33
|
+
* @param tokenResponse - the response object from JWT service request
|
|
37
34
|
*/
|
|
38
35
|
protected saveTokenInfo(tokenResponse: any): void;
|
|
39
36
|
}
|