Skip to content

Commit 06183ea

Browse files
committed
Merge branch 'RUST-1529-no-ff' into RUST-1529-aws-sdk-signature
2 parents f841841 + c64a610 commit 06183ea

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/client/auth/aws.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,6 @@ async fn authenticate_stream_inner(
106106
let server_first = ServerFirst::parse(server_first_response.auth_response_body(MECH_NAME)?)?;
107107
server_first.validate(&nonce)?;
108108

109-
let creds = get_aws_credentials(credential).await.map_err(|e| {
110-
Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}"))
111-
})?;
112-
// let aws_credential = AwsCredential::from_sdk_creds(
113-
// creds.access_key_id().to_string(),
114-
// creds.secret_access_key().to_string(),
115-
// creds.session_token().map(|s| s.to_string()),
116-
// None,
117-
// );
118-
119109
// Find credentials using original implementation without AWS SDK
120110
// let aws_credential = {
121111
// // Limit scope of this variable to avoid holding onto the lock for the duration of
@@ -135,6 +125,16 @@ async fn authenticate_stream_inner(
135125
// }
136126
// };
137127

128+
let creds = get_aws_credentials(credential).await.map_err(|e| {
129+
Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}"))
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+
138138
let date = Utc::now();
139139
// Generate authorization header using original implementation without AWS SDK
140140

0 commit comments

Comments
 (0)