title: RestSharp: Saving the expires_in and using it to determine whether to refresh token
body: <p>I'm creating an MVC Web Page which makes use of RestSharp to authenticate and give back a token.</p>
  
  <p>When a token is requested, a successful response brings back the following content:</p>
  
  <pre><code> HTTP/1.1 200 OK
   Content-Type: application/json;charset=UTF-8
   Cache-Control: no-store
   Pragma: no-cache
  
   {
     "access_token":"2YotnFZFEjr1zCsicMWpAA",
     "token_type":"example",
     "expires_in":3600,
     "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA",
     "example_parameter":"example_value"
   }
  </code></pre>
  
  <p>How can the 'expires_in' content be stored in C# so that it can be used every time the call and check is made? As, there needs to be a refresh_token call only when the time runs out</p>
  
  <p>I know it can be stored in a model class but then would this always be saved as the set value? I believe the values reset every time this class is called?</p>
  
  <pre><code>public class TokenResponse
  {
      public string access_token { get; set; }
      public string token_type { get; set; }
      public string expires_in { get; set; }
      public string refresh_token { get; set; }
      public string example_parameter { get; set; }
  }
  </code></pre>