File tree Expand file tree Collapse file tree 1 file changed +2
-23
lines changed Expand file tree Collapse file tree 1 file changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -128,12 +128,6 @@ async fn authenticate_stream_inner(
128
128
let creds = get_aws_credentials ( credential) . await . map_err ( |e| {
129
129
Error :: authentication_error ( MECH_NAME , & format ! ( "failed to get creds: {e}" ) )
130
130
} ) ?;
131
- let aws_credential = AwsCredential :: from_sdk_creds (
132
- creds. access_key_id ( ) . to_string ( ) ,
133
- creds. secret_access_key ( ) . to_string ( ) ,
134
- creds. session_token ( ) . map ( |s| s. to_string ( ) ) ,
135
- None ,
136
- ) ;
137
131
138
132
let date = Utc :: now ( ) ;
139
133
@@ -284,8 +278,8 @@ pub async fn compute_aws_sigv4_headers(
284
278
let signing_settings = SigningSettings :: default ( ) ;
285
279
let signing_params = SigningParams :: builder ( )
286
280
. identity ( & identity)
287
- . region ( & region)
288
- . name ( & service)
281
+ . region ( region)
282
+ . name ( service)
289
283
. time ( date. into ( ) )
290
284
. settings ( signing_settings)
291
285
. build ( )
@@ -439,21 +433,6 @@ impl AwsCredential {
439
433
}
440
434
}
441
435
442
- // Creates AwsCredential from keys.
443
- fn from_sdk_creds (
444
- access_key_id : String ,
445
- secret_access_key : String ,
446
- session_token : Option < String > ,
447
- expiration : Option < crate :: bson:: DateTime > ,
448
- ) -> Self {
449
- Self {
450
- access_key_id,
451
- secret_access_key,
452
- session_token,
453
- expiration,
454
- }
455
- }
456
-
457
436
async fn get_from_assume_role_with_web_identity_request (
458
437
token_file : String ,
459
438
role_arn : String ,
You can’t perform that action at this time.
0 commit comments