title: Setting Cookie values in HttpAuthenticationContext for IAuthenticationFilter
body: <p>I have a need to read/write cookies during the authentication step of a WebAPI pipeline.  I have created a custom filter for this.</p>
  
  <p>In an attempt to comply with self-hosting concepts, what would be a safe way to access and write cookies out to the client?  <a href="http://weblog.west-wind.com/posts/2013/Apr/15/WebAPI-Getting-Headers-QueryString-and-Cookie-Values" rel="nofollow">Rick Strahl</a> commented that if we use <code>HttpContext.Current.Response.Cookies.Add()</code>, and my application is self-hosted, the context may/will not exist.</p>
  
  <p>So how would I write a cookie out to the client using <code>HttpAuthenticationContext</code> and still be self-host safe?</p>