@@ -106,16 +106,6 @@ async fn authenticate_stream_inner(
106
106
let server_first = ServerFirst :: parse ( server_first_response. auth_response_body ( MECH_NAME ) ?) ?;
107
107
server_first. validate ( & nonce) ?;
108
108
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
-
119
109
// Find credentials using original implementation without AWS SDK
120
110
// let aws_credential = {
121
111
// // Limit scope of this variable to avoid holding onto the lock for the duration of
@@ -135,6 +125,16 @@ async fn authenticate_stream_inner(
135
125
// }
136
126
// };
137
127
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
+
138
138
let date = Utc :: now ( ) ;
139
139
// Generate authorization header using original implementation without AWS SDK
140
140
0 commit comments