Пример #1
0
 public IHttpActionResult ValidateToken(string userId, string token)
 {
     try
     {
         User user = userValidator.ValidateToken(userId, token);
         return(Ok(user));
     }
     catch (NotExistException exception)
     {
         return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.BadRequest, exception.Mymessage)));
     }
     catch (Exception exception)
     {
         return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exception.Message)));
     }
 }