Skip to content

Commit 7c97498

Browse files
committed
feat(credential-providers): rename contextClientConfig to callerClientConfig
1 parent 486f1fb commit 7c97498

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ export const resolveAwsSdkSigV4Config = <T>(
129129
}
130130
}
131131

132-
const contextBoundCredentialsProvider = async () => {
133-
return credentialsProvider!({ contextClientConfig: config });
132+
const boundCredentialsProvider = async () => {
133+
return credentialsProvider!({ callerClientConfig: config });
134134
};
135135

136136
// Populate sigv4 arguments
@@ -174,7 +174,7 @@ export const resolveAwsSdkSigV4Config = <T>(
174174

175175
const params: SignatureV4Init & SignatureV4CryptoInit = {
176176
...config,
177-
credentials: contextBoundCredentialsProvider,
177+
credentials: boundCredentialsProvider,
178178
region: config.signingRegion,
179179
service: config.signingName,
180180
sha256,
@@ -210,7 +210,7 @@ export const resolveAwsSdkSigV4Config = <T>(
210210

211211
const params: SignatureV4Init & SignatureV4CryptoInit = {
212212
...config,
213-
credentials: contextBoundCredentialsProvider,
213+
credentials: boundCredentialsProvider,
214214
region: config.signingRegion,
215215
service: config.signingName,
216216
sha256,
@@ -228,10 +228,10 @@ export const resolveAwsSdkSigV4Config = <T>(
228228
signingEscapePath,
229229
credentials: isUserSupplied
230230
? async () =>
231-
contextBoundCredentialsProvider!().then((creds: AttributedAwsCredentialIdentity) =>
231+
boundCredentialsProvider!().then((creds: AttributedAwsCredentialIdentity) =>
232232
setCredentialFeature(creds, "CREDENTIALS_CODE", "e")
233233
)
234-
: contextBoundCredentialsProvider!,
234+
: boundCredentialsProvider!,
235235
signer,
236236
};
237237
};

packages/credential-provider-cognito-identity/src/fromCognitoIdentity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function fromCognitoIdentity(parameters: FromCognitoIdentityParameters):
4747
region:
4848
parameters.clientConfig?.region ??
4949
parameters.parentClientConfig?.region ??
50-
awsIdentityProperties?.contextClientConfig?.region,
50+
awsIdentityProperties?.callerClientConfig?.region,
5151
})
5252
)
5353
).send(

packages/credential-provider-cognito-identity/src/fromCognitoIdentityPool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function fromCognitoIdentityPool({
4242
new CognitoIdentityClient(
4343
Object.assign({}, clientConfig ?? {}, {
4444
region:
45-
clientConfig?.region ?? parentClientConfig?.region ?? awsIdentityProperties?.contextClientConfig?.region,
45+
clientConfig?.region ?? parentClientConfig?.region ?? awsIdentityProperties?.callerClientConfig?.region,
4646
})
4747
);
4848

packages/credential-provider-ini/src/fromIni.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ export interface FromIniInit extends SourceProfileInit, CredentialProviderOption
5757
*/
5858
export const fromIni =
5959
(_init: FromIniInit = {}): RegionalAwsCredentialIdentityProvider =>
60-
async ({ contextClientConfig } = {}) => {
60+
async ({ callerClientConfig } = {}) => {
6161
const init: FromIniInit = {
6262
..._init,
6363
};
64-
if (contextClientConfig?.region) {
64+
if (callerClientConfig?.region) {
6565
init.parentClientConfig = {
66-
region: contextClientConfig.region,
66+
region: callerClientConfig.region,
6767
..._init.parentClientConfig,
6868
};
6969
}

packages/credential-provider-web-identity/src/fromWebToken.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ export const fromWebToken =
169169
{
170170
...init.clientConfig,
171171
credentialProviderLogger: init.logger,
172-
...(awsIdentityProperties?.contextClientConfig?.region || init.parentClientConfig
172+
...(awsIdentityProperties?.callerClientConfig?.region || init.parentClientConfig
173173
? {
174174
parentClientConfig: {
175-
region: awsIdentityProperties?.contextClientConfig?.region,
175+
region: awsIdentityProperties?.callerClientConfig?.region,
176176
...init.parentClientConfig,
177177
},
178178
}

packages/middleware-signing/src/awsAuthConfiguration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const createConfigBoundCredentialProvider = (input: {
328328
);
329329
const normalizedCreds = async () =>
330330
(normalizedCredentialsProvider as RegionalAwsCredentialIdentityProvider)({
331-
contextClientConfig: {
331+
callerClientConfig: {
332332
region: normalizeProvider(input.region),
333333
},
334334
});

packages/token-providers/src/fromSso.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export const fromSso =
4040
async (awsIdentityProperties?: AwsIdentityProperties) => {
4141
const init: FromSsoInit = {
4242
..._init,
43-
...(awsIdentityProperties?.contextClientConfig?.region
43+
...(awsIdentityProperties?.callerClientConfig?.region
4444
? {
4545
parentClientConfig: {
46-
region: awsIdentityProperties?.contextClientConfig?.region,
46+
region: awsIdentityProperties?.callerClientConfig?.region,
4747
..._init.parentClientConfig,
4848
},
4949
}

packages/types/src/identity/AwsCredentialIdentity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export { AwsCredentialIdentity, AwsCredentialIdentityProvider, IdentityProvider
88
* @public
99
*/
1010
export interface AwsIdentityProperties {
11-
contextClientConfig?: {
11+
callerClientConfig?: {
1212
region(): Promise<string>;
1313
};
1414
}

0 commit comments

Comments
 (0)