title: Service Registration Options
body: <p>I have this class which gets Authorization Header value from Header and store it into variable like this:</p>
  
  <pre><code>public class AuthenticationHeader
  {
     private static  IHttpContextAccessor _httpContextAccessor;
     public AuthenticationHeader(IHttpContextAccessor httpContextAccessor)
     {
        _httpContextAccessor = httpContextAccessor;
     }
     public string AuthHeader =&gt; _httpContextAccessor.HttpContext?.Request.Headers["Authorization"]
  }
  </code></pre>
  
  <p>And I have registered this class for DI like this in my <code>Startup.cs</code></p>
  
  <pre><code>services.AddScoped&lt;AuthenticationHeader&gt;();
  </code></pre>
  
  <p>And then this class is used in my NetworkClient using Constructor Injection.</p>
  
  <pre><code>public ClubMatasClient(HttpClient client, ILogger&lt;ClubMatasClient&gt; logger, AuthenticationHeader authHeader)
  {
     _client = client;
     client.BaseAddress = new Uri("url");
     client.DefaultRequestHeaders.Add("Accept", "application/json");
     _logger = logger;
     AuthToken = authHeader.AuthHeader;
  }
  </code></pre>
  
  <p>I have read life cycle of <code>Scoped</code> and <code>Transient</code> in here <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-2.2#service-lifetimes" rel="nofollow noreferrer">docs</a> and I am confused which one should I use. I don't want to mix my Authentication Headers that are coming in my Request headers. </p>