Skip to content

Commit b38d692

Browse files
fix: AuthorizationV1.Options requires type definitions for iam_a… (#917)
fix: AuthorizationV1.Options requires type definitions for iam_apikey and ibm_url
2 parents afa7dd5 + 13ac681 commit b38d692

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

authorization/v1.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class AuthorizationV1 extends BaseService {
3535
* @param {String} options.username
3636
* @param {String} options.password
3737
* @param {String} [options.url] url of the service for which auth tokens are being generated
38+
* @param {string} [options.iam_apikey] - An API key that can be used to request IAM tokens. If this API key is provided, the SDK will manage the token and handle the refreshing.
39+
* @param {string} [options.iam_url] - An optional URL for the IAM service API. Defaults to 'https://iam.cloud.ibm.com/identity/token'.
3840
* @constructor
3941
*/
4042
constructor(options: AuthorizationV1.Options) {
@@ -93,9 +95,11 @@ AuthorizationV1.prototype.serviceVersion = 'v1';
9395
namespace AuthorizationV1 {
9496
/** Options for the AuthorizationV1 constructor */
9597
export type Options = {
96-
username: string;
97-
password: string;
98+
username?: string;
99+
password?: string;
98100
url?: string;
101+
iam_apikey?: string;
102+
iam_url?: string;
99103
}
100104

101105
export interface GetTokenResponse {

0 commit comments

Comments
 (0)