private void attachedAuth() { if (authType == "awsv4") { // Console.WriteLine("============="); // Console.WriteLine(Region); // Console.WriteLine(Service); // Console.WriteLine(methodString); // Console.WriteLine(address.Path); // Console.WriteLine(headers.Keys.ToString()); // Console.WriteLine(queries.ToString()); // Console.WriteLine(payload); // Console.WriteLine("============="); AwsV4 Sign = new AwsV4( AK, SK, Region, Service, methodString.ToUpper(), address.Path, headers, queries, payload ); AwsV4.SignerStruct aws = Sign.Signer(); reAddHeader("Authorization", aws.Authorization); reAddHeader("X-Amz-Date", aws.Time); } }
public AwsV4.SignedResult GetSignedResult(KsyunConfig config, FormUrlEncodedContent content) { var headers = new Dictionary <string, string> { { "host", KsyunSmsConstants.Host } }; var awsv4 = new AwsV4(config, "POST", KsyunSmsConstants.Host, headers, string.Empty, content.ToString()); return(awsv4.Signer()); }