56 lines
1.2 KiB
C#
56 lines
1.2 KiB
C#
|
namespace MobileApp1.Services
|
|||
|
{
|
|||
|
public class CorporationService : ICorporationService
|
|||
|
{
|
|||
|
public CorporationService()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public string DisplayName { get; set; } = "";
|
|||
|
|
|||
|
public bool IsLoggedIn { get; set; } = false;
|
|||
|
|
|||
|
public string AuthToken { get; set; } = "";
|
|||
|
|
|||
|
|
|||
|
public ServiceResult Login(string username, string password)
|
|||
|
{
|
|||
|
this.DisplayName = username;
|
|||
|
this.IsLoggedIn = true;
|
|||
|
|
|||
|
return new ServiceResult()
|
|||
|
{
|
|||
|
IsSuccess = true,
|
|||
|
Message = "Logged In"
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
public ServiceResult Logout()
|
|||
|
{
|
|||
|
this.DisplayName = string.Empty;
|
|||
|
this.IsLoggedIn = false;
|
|||
|
|
|||
|
return new ServiceResult()
|
|||
|
{
|
|||
|
IsSuccess = true,
|
|||
|
Message = "Logged Out"
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
public ServiceResult RequestPasswordReset(string username)
|
|||
|
{
|
|||
|
this.DisplayName = string.Empty;
|
|||
|
this.IsLoggedIn = false;
|
|||
|
|
|||
|
return new ServiceResult()
|
|||
|
{
|
|||
|
IsSuccess = true,
|
|||
|
Message = "Password Reset Requested"
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|