using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WebAPI_FormsAuth.Services
{
    public class LoginService
    {

        public async Task<LoginResponse> LoginAsync(string userName, string password)
        {
            LoginResponse responseLoginAsync = new LoginResponse();

            if (userName == "saurabh@admin.com" && password == "password")
            {
                responseLoginAsync.Success = true;
                responseLoginAsync.Token = userName;
            }
            else
            {
                responseLoginAsync.Success = false;
                responseLoginAsync.Token = string.Empty;               
            }

            return responseLoginAsync;
        }
        
    }
}
