title: Passing authorization token to Odata client
body: <p>I've been trying to consume an authorized ASP.NET Odata Web API by using an Odata client. I do know how to set the header with the token for the client, but <strong>where should the token be kept for re-use?</strong>. Because the Authorization header has to be set with each request, not just once. To be more precise, this is what I am down to:</p>
  
  <ol>
  <li>Get user's credentials, pass them back to the API.</li>
  <li>Get token.</li>
  <li>Set the header for the Odata client with the token value.</li>
  </ol>
  
  <p>I am struggling with the actions to be taken between 2nd and 3rd step: Where should the token be kept, so you could keep setting the Odata client Header with it? </p>
  
  <p><a href="https://stackoverflow.com/questions/27798538/how-to-integrate-oauth2-0-with-odata-client-code-generator">This is how I set the authorization header value.</a></p>
  
  <p>EDIT: In regards to the comment, I might've not clearly specified the issue. The problem arises, because controllers will be created for every request and will be garbage collected "sometime after" the request has completed. So, the token value will be gone.</p>