ibm-cloud-sdk-core 5.8.0 → 5.9.0
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/auth/authenticators/cloud-pak-for-data-authenticator.d.ts +4 -0
- package/auth/authenticators/cloud-pak-for-data-authenticator.js +2 -0
- package/auth/token-managers/cp4d-token-manager.d.ts +4 -0
- package/auth/token-managers/cp4d-token-manager.js +3 -0
- package/docs/ibm-cloud-sdk-core.api.json +2 -2
- package/es/auth/authenticators/cloud-pak-for-data-authenticator.d.ts +4 -0
- package/es/auth/authenticators/cloud-pak-for-data-authenticator.js +2 -0
- package/es/auth/token-managers/cp4d-token-manager.d.ts +4 -0
- package/es/auth/token-managers/cp4d-token-manager.js +3 -0
- package/ibm-cloud-sdk-core.d.ts +8 -0
- package/package.json +1 -1
|
@@ -25,6 +25,8 @@ export interface Options extends BaseOptions {
|
|
|
25
25
|
apikey?: string;
|
|
26
26
|
/** The URL representing the Cloud Pak for Data token service endpoint. */
|
|
27
27
|
url: string;
|
|
28
|
+
/** The CP4D account ID used to obtain a bearer token [optional]. */
|
|
29
|
+
cp4dAccountId?: string;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* The CloudPakForDataAuthenticator will either use a username/password pair or a username/apikey pair to obtain
|
|
@@ -40,6 +42,7 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
40
42
|
private username;
|
|
41
43
|
private password;
|
|
42
44
|
private apikey;
|
|
45
|
+
private cp4dAccountId;
|
|
43
46
|
/**
|
|
44
47
|
* Create a new CloudPakForDataAuthenticator instance.
|
|
45
48
|
*
|
|
@@ -49,6 +52,7 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
49
52
|
* - username: (required) the username used to obtain a bearer token
|
|
50
53
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
51
54
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
55
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
52
56
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
53
57
|
* should be disabled or not
|
|
54
58
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -53,6 +53,7 @@ var CloudPakForDataAuthenticator = /** @class */ (function (_super) {
|
|
|
53
53
|
* - username: (required) the username used to obtain a bearer token
|
|
54
54
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
55
55
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
56
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
56
57
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
57
58
|
* should be disabled or not
|
|
58
59
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -65,6 +66,7 @@ var CloudPakForDataAuthenticator = /** @class */ (function (_super) {
|
|
|
65
66
|
_this.username = options.username;
|
|
66
67
|
_this.password = options.password;
|
|
67
68
|
_this.apikey = options.apikey;
|
|
69
|
+
_this.cp4dAccountId = options.cp4dAccountId;
|
|
68
70
|
// the param names are shared between the authenticator and the token
|
|
69
71
|
// manager so we can just pass along the options object.
|
|
70
72
|
// also, the token manager will handle input validation
|
|
@@ -24,6 +24,8 @@ interface Options extends JwtTokenManagerOptions {
|
|
|
24
24
|
password?: string;
|
|
25
25
|
/** The API key used to obtain a bearer token [required if password not specified]. */
|
|
26
26
|
apikey?: string;
|
|
27
|
+
/** The CP4D account ID used to obtain a bearer token [optional]. */
|
|
28
|
+
cp4dAccountId?: string;
|
|
27
29
|
}
|
|
28
30
|
export interface CpdTokenData {
|
|
29
31
|
username: string;
|
|
@@ -48,6 +50,7 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
|
|
|
48
50
|
private username;
|
|
49
51
|
private password;
|
|
50
52
|
private apikey;
|
|
53
|
+
private cp4dAccountId;
|
|
51
54
|
/**
|
|
52
55
|
* Create a new Cp4dTokenManager instance.
|
|
53
56
|
*
|
|
@@ -57,6 +60,7 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
|
|
|
57
60
|
* - username: (required) the username used to obtain a bearer token
|
|
58
61
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
59
62
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
63
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
60
64
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
61
65
|
* should be disabled or not
|
|
62
66
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -56,6 +56,7 @@ var Cp4dTokenManager = /** @class */ (function (_super) {
|
|
|
56
56
|
* - username: (required) the username used to obtain a bearer token
|
|
57
57
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
58
58
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
59
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
59
60
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
60
61
|
* should be disabled or not
|
|
61
62
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -78,6 +79,7 @@ var Cp4dTokenManager = /** @class */ (function (_super) {
|
|
|
78
79
|
_this.username = options.username;
|
|
79
80
|
_this.password = options.password;
|
|
80
81
|
_this.apikey = options.apikey;
|
|
82
|
+
_this.cp4dAccountId = options.cp4dAccountId;
|
|
81
83
|
_this.userAgent = (0, build_user_agent_1.buildUserAgent)('cp4d-authenticator');
|
|
82
84
|
return _this;
|
|
83
85
|
}
|
|
@@ -94,6 +96,7 @@ var Cp4dTokenManager = /** @class */ (function (_super) {
|
|
|
94
96
|
username: this.username,
|
|
95
97
|
password: this.password,
|
|
96
98
|
api_key: this.apikey,
|
|
99
|
+
account_id: this.cp4dAccountId,
|
|
97
100
|
},
|
|
98
101
|
method: 'POST',
|
|
99
102
|
headers: (0, extend_1.default)(true, {}, this.headers, requiredHeaders),
|
|
@@ -2131,7 +2131,7 @@
|
|
|
2131
2131
|
{
|
|
2132
2132
|
"kind": "Constructor",
|
|
2133
2133
|
"canonicalReference": "ibm-cloud-sdk-core!CloudPakForDataAuthenticator:constructor(1)",
|
|
2134
|
-
"docComment": "/**\n * Create a new CloudPakForDataAuthenticator instance.\n *\n * @param 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\n *\n * @throws\n *\n * Error: the username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token requests.\n */\n",
|
|
2134
|
+
"docComment": "/**\n * Create a new CloudPakForDataAuthenticator instance.\n *\n * @param 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) - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token - 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\n *\n * @throws\n *\n * Error: the username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token requests.\n */\n",
|
|
2135
2135
|
"excerptTokens": [
|
|
2136
2136
|
{
|
|
2137
2137
|
"kind": "Content",
|
|
@@ -3167,7 +3167,7 @@
|
|
|
3167
3167
|
{
|
|
3168
3168
|
"kind": "Constructor",
|
|
3169
3169
|
"canonicalReference": "ibm-cloud-sdk-core!Cp4dTokenManager:constructor(1)",
|
|
3170
|
-
"docComment": "/**\n * Create a new Cp4dTokenManager instance.\n *\n * @param 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\n *\n * @throws\n *\n * Error: the configuration options were invalid.\n */\n",
|
|
3170
|
+
"docComment": "/**\n * Create a new Cp4dTokenManager instance.\n *\n * @param 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) - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token - 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\n *\n * @throws\n *\n * Error: the configuration options were invalid.\n */\n",
|
|
3171
3171
|
"excerptTokens": [
|
|
3172
3172
|
{
|
|
3173
3173
|
"kind": "Content",
|
|
@@ -25,6 +25,8 @@ export interface Options extends BaseOptions {
|
|
|
25
25
|
apikey?: string;
|
|
26
26
|
/** The URL representing the Cloud Pak for Data token service endpoint. */
|
|
27
27
|
url: string;
|
|
28
|
+
/** The CP4D account ID used to obtain a bearer token [optional]. */
|
|
29
|
+
cp4dAccountId?: string;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* The CloudPakForDataAuthenticator will either use a username/password pair or a username/apikey pair to obtain
|
|
@@ -40,6 +42,7 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
40
42
|
private username;
|
|
41
43
|
private password;
|
|
42
44
|
private apikey;
|
|
45
|
+
private cp4dAccountId;
|
|
43
46
|
/**
|
|
44
47
|
* Create a new CloudPakForDataAuthenticator instance.
|
|
45
48
|
*
|
|
@@ -49,6 +52,7 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
49
52
|
* - username: (required) the username used to obtain a bearer token
|
|
50
53
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
51
54
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
55
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
52
56
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
53
57
|
* should be disabled or not
|
|
54
58
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -34,6 +34,7 @@ export class CloudPakForDataAuthenticator extends TokenRequestBasedAuthenticator
|
|
|
34
34
|
* - username: (required) the username used to obtain a bearer token
|
|
35
35
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
36
36
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
37
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
37
38
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
38
39
|
* should be disabled or not
|
|
39
40
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -46,6 +47,7 @@ export class CloudPakForDataAuthenticator extends TokenRequestBasedAuthenticator
|
|
|
46
47
|
this.username = options.username;
|
|
47
48
|
this.password = options.password;
|
|
48
49
|
this.apikey = options.apikey;
|
|
50
|
+
this.cp4dAccountId = options.cp4dAccountId;
|
|
49
51
|
// the param names are shared between the authenticator and the token
|
|
50
52
|
// manager so we can just pass along the options object.
|
|
51
53
|
// also, the token manager will handle input validation
|
|
@@ -24,6 +24,8 @@ interface Options extends JwtTokenManagerOptions {
|
|
|
24
24
|
password?: string;
|
|
25
25
|
/** The API key used to obtain a bearer token [required if password not specified]. */
|
|
26
26
|
apikey?: string;
|
|
27
|
+
/** The CP4D account ID used to obtain a bearer token [optional]. */
|
|
28
|
+
cp4dAccountId?: string;
|
|
27
29
|
}
|
|
28
30
|
export interface CpdTokenData {
|
|
29
31
|
username: string;
|
|
@@ -48,6 +50,7 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
|
|
|
48
50
|
private username;
|
|
49
51
|
private password;
|
|
50
52
|
private apikey;
|
|
53
|
+
private cp4dAccountId;
|
|
51
54
|
/**
|
|
52
55
|
* Create a new Cp4dTokenManager instance.
|
|
53
56
|
*
|
|
@@ -57,6 +60,7 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
|
|
|
57
60
|
* - username: (required) the username used to obtain a bearer token
|
|
58
61
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
59
62
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
63
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
60
64
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
61
65
|
* should be disabled or not
|
|
62
66
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -34,6 +34,7 @@ export class Cp4dTokenManager extends JwtTokenManager {
|
|
|
34
34
|
* - username: (required) the username used to obtain a bearer token
|
|
35
35
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
36
36
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
37
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
37
38
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
38
39
|
* should be disabled or not
|
|
39
40
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -56,6 +57,7 @@ export class Cp4dTokenManager extends JwtTokenManager {
|
|
|
56
57
|
this.username = options.username;
|
|
57
58
|
this.password = options.password;
|
|
58
59
|
this.apikey = options.apikey;
|
|
60
|
+
this.cp4dAccountId = options.cp4dAccountId;
|
|
59
61
|
this.userAgent = buildUserAgent('cp4d-authenticator');
|
|
60
62
|
}
|
|
61
63
|
requestToken() {
|
|
@@ -71,6 +73,7 @@ export class Cp4dTokenManager extends JwtTokenManager {
|
|
|
71
73
|
username: this.username,
|
|
72
74
|
password: this.password,
|
|
73
75
|
api_key: this.apikey,
|
|
76
|
+
account_id: this.cp4dAccountId,
|
|
74
77
|
},
|
|
75
78
|
method: 'POST',
|
|
76
79
|
headers: extend(true, {}, this.headers, requiredHeaders),
|
package/ibm-cloud-sdk-core.d.ts
CHANGED
|
@@ -361,6 +361,7 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
361
361
|
private username;
|
|
362
362
|
private password;
|
|
363
363
|
private apikey;
|
|
364
|
+
private cp4dAccountId;
|
|
364
365
|
/**
|
|
365
366
|
* Create a new CloudPakForDataAuthenticator instance.
|
|
366
367
|
*
|
|
@@ -370,6 +371,7 @@ export declare class CloudPakForDataAuthenticator extends TokenRequestBasedAuthe
|
|
|
370
371
|
* - username: (required) the username used to obtain a bearer token
|
|
371
372
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
372
373
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
374
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
373
375
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
374
376
|
* should be disabled or not
|
|
375
377
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -572,6 +574,7 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
|
|
|
572
574
|
private username;
|
|
573
575
|
private password;
|
|
574
576
|
private apikey;
|
|
577
|
+
private cp4dAccountId;
|
|
575
578
|
/**
|
|
576
579
|
* Create a new Cp4dTokenManager instance.
|
|
577
580
|
*
|
|
@@ -581,6 +584,7 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
|
|
|
581
584
|
* - username: (required) the username used to obtain a bearer token
|
|
582
585
|
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
|
|
583
586
|
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
|
|
587
|
+
* - cp4dAccountId: (optional) the CP4D account ID used to obtain a bearer token
|
|
584
588
|
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
|
|
585
589
|
* should be disabled or not
|
|
586
590
|
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
|
|
@@ -1480,6 +1484,8 @@ declare interface Options_3 extends JwtTokenManagerOptions {
|
|
|
1480
1484
|
password?: string;
|
|
1481
1485
|
/** The API key used to obtain a bearer token [required if password not specified]. */
|
|
1482
1486
|
apikey?: string;
|
|
1487
|
+
/** The CP4D account ID used to obtain a bearer token [optional]. */
|
|
1488
|
+
cp4dAccountId?: string;
|
|
1483
1489
|
}
|
|
1484
1490
|
|
|
1485
1491
|
/** Configuration options for CloudPakForData authentication. */
|
|
@@ -1492,6 +1498,8 @@ declare interface Options_4 extends BaseOptions {
|
|
|
1492
1498
|
apikey?: string;
|
|
1493
1499
|
/** The URL representing the Cloud Pak for Data token service endpoint. */
|
|
1494
1500
|
url: string;
|
|
1501
|
+
/** The CP4D account ID used to obtain a bearer token [optional]. */
|
|
1502
|
+
cp4dAccountId?: string;
|
|
1495
1503
|
}
|
|
1496
1504
|
|
|
1497
1505
|
/** Configuration options for IAM token retrieval. */
|