public string GetAuntheticationToken(string phoneNumber, string password) { User getUserByPhoneNumber = TipezeNyumbaServiceUnitOfWork.Repository <User>().Get(u => u.phoneNumber == phoneNumber); if (getUserByPhoneNumber == null) { return("ERROR:User Phone number is not registered in the system."); } else { bool checkUserPasswordIsCorrect = HashPasswordObject.isPasswordCorrect(getUserByPhoneNumber, password); if (checkUserPasswordIsCorrect == true) { /*Include additional code for authenticating user subscription and state of account number*/ return(tokenManagement.GenerateToken(getUserByPhoneNumber)); } else { return("ERROR:Wrong Credentials given"); } } }