File tree 3 files changed +16
-3
lines changed
3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "type" : " bugfix" ,
3
+ "category" : " Typing" ,
4
+ "description" : " Align the typing for constructor param of TokenFileWebIdentityCredentials with STS client"
5
+ }
Original file line number Diff line number Diff line change 1
1
import { Credentials } from '../credentials' ;
2
2
import { AWSError } from '../error' ;
3
- import { ConfigurationOptions } from '../config-base ' ;
3
+ import { ClientConfiguration } from '../../clients/sts ' ;
4
4
export class TokenFileWebIdentityCredentials extends Credentials {
5
5
/**
6
6
* Creates a new credentials object with optional configuraion.
7
7
* @param {Object } clientConfig - a map of configuration options to pass to the underlying STS client.
8
8
*/
9
- constructor ( clientConfig ?: ConfigurationOptions ) ;
9
+ constructor ( clientConfig ?: ClientConfiguration ) ;
10
10
/**
11
11
* Refreshes credentials using AWS.STS.assumeRoleWithWebIdentity().
12
12
*/
Original file line number Diff line number Diff line change @@ -2121,6 +2121,14 @@ const exp = require('constants');
2121
2121
} ) ;
2122
2122
} ) ;
2123
2123
2124
+ it ( 'should forward endpoint param to sts client' , function ( ) {
2125
+ var creds = new AWS . TokenFileWebIdentityCredentials ( {
2126
+ endpoint : 'https://testendpoint'
2127
+ } ) ;
2128
+ creds . createClients ( ) ;
2129
+ expect ( creds . service . endpoint . hostname ) . to . equal ( 'testendpoint' ) ;
2130
+ } ) ;
2131
+
2124
2132
return it ( 'fails if params are not available in both environment variables or shared config' , function ( done ) {
2125
2133
delete process . env . AWS_WEB_IDENTITY_TOKEN_FILE ;
2126
2134
helpers . spyOn ( AWS . util , 'getProfilesFromSharedConfig' ) . andReturn ( { } ) ;
@@ -2359,7 +2367,7 @@ const exp = require('constants');
2359
2367
} ) ;
2360
2368
expect ( creds ) . to . have . property ( 'tokenCodeFn' , null ) ;
2361
2369
} ) ;
2362
- it ( 'should forward enpoint param to sts client' , function ( ) {
2370
+ it ( 'should forward endpoint param to sts client' , function ( ) {
2363
2371
var creds = new AWS . ChainableTemporaryCredentials ( {
2364
2372
stsConfig : { endpoint : 'https://testendpoint' }
2365
2373
} ) ;
You can’t perform that action at this time.
0 commit comments