Exemple #1
0
 public ActionResult StartOperation(PullItemModel data)
 {
     if (!string.IsNullOrWhiteSpace(Request.Headers["X-MC-MAC"]))
     {
         Request.InputStream.Seek(0, SeekOrigin.Begin);
         string payload = new StreamReader(Request.InputStream).ReadToEnd();
         if (!_remoteContent.HmacServer.ValidateRequest(new HttpRequestWrapper(System.Web.HttpContext.Current.Request), x => new[] { new SignatureFactor("payload", payload) }))
         {
             System.Web.HttpContext.Current.Response.StatusCode = 403;
             return(null);
         }
     }
     return(ScsJson(_migrationManager.StartContentMigration(data).Status));
 }
Exemple #2
0
 public void Run()
 {
     _migrationManager.StartContentMigration(_args);
 }
Exemple #3
0
 public ActionResult StartOperation(PullItemModel data)
 {
     return(Content(_migrationManager.StartContentMigration(data)));
 }