AIMS_BD_IATI.WebAPI.Controllers.AuthenticationController.Authenticate C# (CSharp) Method

Authenticate() private method

private Authenticate ( AuthenticateViewModel viewModel ) : IHttpActionResult
viewModel AIMS_BD_IATI.WebAPI.Models.Authentication.AuthenticateViewModel
return IHttpActionResult
        public IHttpActionResult Authenticate(AuthenticateViewModel viewModel)
        {
            //Check Security Service
            MembershipService = new AccountMembershipService();
            if (MembershipService.ValidateUser(viewModel.Username, viewModel.Password))
            {
                Sessions.UserId = viewModel.Username;

                return Ok(new { success = true });
            }

            return Ok(new { success = false, message = "User Id or password is incorrect" });
        }
AuthenticationController