Skip to content

Commit

Permalink
enabling option passing to the authV4
Browse files Browse the repository at this point in the history
Issue: ARSN-469
  • Loading branch information
benzekrimaha committed Feb 19, 2025
1 parent 3a8ee04 commit 1cb06ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/auth/Vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ export default class Vault {
authenticateV4Request(
params: AuthV4RequestParams,
requestContexts: any[] | null,
callback: (err: Error | null, data?: any) => void
callback: (err: Error | null, data?: any) => void,
options: any = {},
) {
params.log.debug('authenticating V4 request');
let serializedRCs: any;
Expand All @@ -221,6 +222,7 @@ export default class Vault {
logger: params.log,
securityToken: params.data.securityToken,
requestContext: serializedRCs,
...options,
},
(err: Error | null, userInfo?: any) => vaultSignatureCb(err, userInfo,
params.log, callback, streamingV4Params),
Expand Down
5 changes: 3 additions & 2 deletions lib/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ function doAuth(
log: Logger,
cb: (err: Error | null, data?: any) => void,
awsService: string,
requestContexts: any[] | null
requestContexts: any[] | null,
options: any = {},
) {
const res = extractParams(request, log, awsService, request.query);
if (res.err) {
Expand Down Expand Up @@ -154,7 +155,7 @@ function doAuth(
}
if (res.params.version === 4) {
// @ts-ignore
return vault!.authenticateV4Request(res.params, requestContexts, cb);
return vault!.authenticateV4Request(res.params, requestContexts, cb, options);
}

log.error('authentication method not found', {
Expand Down

0 comments on commit 1cb06ed

Please sign in to comment.