Beispiel #1
0
 public RequestSigner(AwsHttpRequest req, SigV4Context ctx, bool x_amz_date = true, Tuple <string, string> dt = null)
 {
     if (dt == null)
     {
         dt = KPLNETInterface.Utils.get_date_time(DateTime.UtcNow);
     }
     this.req        = req;
     this.sig_v4_ctx = ctx;
     this.date       = dt.Item1;
     this.time       = dt.Item2;
     this.date_time  = this.date + "T" + this.time + "Z";
     if (!x_amz_date)
     {
         return;
     }
     req.headers().Add("x-amz-date", this.date_time);
 }
Beispiel #2
0
 public static void sign_v4(AwsHttpRequest req, SigV4Context ctx)
 {
     new RequestSigner(req, ctx).sign();
 }