public HttpResponseMessage GetStandardLegacyBcd()
        {
            var diskSignature = StringManipulationServices.Decode(HttpContext.Current.Request.Form["diskSignature"],
                                                                  "diskSignature");

            _response.Content = new StringContent(new BcdServices().GetStandardLegacy(diskSignature),
                                                  Encoding.UTF8, "text/plain");
            return(_response);
        }
        public HttpResponseMessage CheckTaskAuth(TaskDTO taskDto)
        {
            var userToken = StringManipulationServices.Decode(HttpContext.Current.Request.Headers["Authorization"],
                                                              "Authorization");

            _response.Content = new StringContent(new ClientImagingServices().CheckTaskAuth(taskDto.task, userToken),
                                                  Encoding.UTF8, "text/plain");
            return(_response);
        }
示例#3
0
        public HttpResponseMessage UpdateBcd()
        {
            var bcd         = StringManipulationServices.Decode(HttpContext.Current.Request.Form["bcd"], "bcd");
            var offsetBytes = StringManipulationServices.Decode(HttpContext.Current.Request.Form["offsetBytes"],
                                                                "offsetBytes");

            _response.Content = new StringContent(new BcdServices().UpdateEntry(bcd, Convert.ToInt64(offsetBytes)),
                                                  Encoding.UTF8, "text/plain");
            return(_response);
        }
示例#4
0
        public override void OnAuthorization(HttpActionContext actionContext)
        {
            var userToken = StringManipulationServices.Decode(HttpContext.Current.Request.Headers["Authorization"],
                                                              "Authorization");

            if (!new ClientImagingServices().AuthorizeApiCall(userToken))
            {
                var response = actionContext.Request.CreateResponse(HttpStatusCode.Forbidden);
                throw new HttpResponseException(response);
            }
        }
        public void UploadLog()
        {
            var computerId = StringManipulationServices.Decode(HttpContext.Current.Request.Form["computerId"],
                                                               "computerId");
            var logContents = StringManipulationServices.Decode(HttpContext.Current.Request.Form["logContents"],
                                                                "logContents");
            var subType     = StringManipulationServices.Decode(HttpContext.Current.Request.Form["subType"], "subType");
            var computerMac = StringManipulationServices.Decode(HttpContext.Current.Request.Form["mac"], "mac");

            new ClientImagingServices().UploadLog(computerId, logContents, subType, computerMac);
        }
        public HttpResponseMessage ConsoleLogin()
        {
            var ip       = StringManipulationServices.Decode(HttpContext.Current.Request.Form["clientIP"], "clientIP");
            var username = StringManipulationServices.Decode(HttpContext.Current.Request.Form["username"], "username");
            var password = StringManipulationServices.Decode(HttpContext.Current.Request.Form["password"], "password");
            var task     = StringManipulationServices.Decode(HttpContext.Current.Request.Form["task"], "task");

            _response.Content =
                new StringContent(new AuthenticationServices().ConsoleLogin(username, password, task, ip), Encoding.UTF8,
                                  "text/plain");
            return(_response);
        }
示例#7
0
        public HttpResponseMessage GetStandardEfiBcd()
        {
            var diskGuid    = StringManipulationServices.Decode(HttpContext.Current.Request.Form["diskGuid"], "diskGuid");
            var windowsGuid = StringManipulationServices.Decode(HttpContext.Current.Request.Form["windowsGuid"],
                                                                "windowsGuid");
            var recoveryGuid = StringManipulationServices.Decode(HttpContext.Current.Request.Form["recoveryGuid"],
                                                                 "recoveryGuid");

            _response.Content = new StringContent(new BcdServices().GetStandardEfi(diskGuid, recoveryGuid, windowsGuid),
                                                  Encoding.UTF8, "text/plain");
            return(_response);
        }