Beispiel #1
0
 public async Task <ActionResult <string> > Post([FromBody] LoginUser loginUser)
 {
     if (Validation.CheckValidationUserLogin(loginUser.Username, loginUser.Password))
     {
         List <bool> validationResults = loginUser.CheckUser();
         if (validationResults[0] == false || validationResults[1] == false)
         {
             return(new NotFoundObjectResult("Invalid username or password"));
         }
         string userRole = loginUser.GetUserPermissionandOrgID();
         return(new OkObjectResult(userRole));
     }
     else
     {
         return(new BadRequestResult());
     }
 }