Ejemplo n.º 1
0
 public IHttpActionResult GetToken(User user)
 {
     try
     {
         return(Ok(logInService.GenerateToken(user.UserName, user.Password)));
     }
     catch (NotFoundException ex)
     {
         return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message)));
     }
 }