title: How could i use jwt from authorization service in asp.net core?
body: <p>I'm trying to create authorization service.
  I have an API service that uses JWT bearer authentication</p>
  
  <pre class="lang-cs prettyprint-override"><code>public void ConfigureServices(IServiceCollection services)
  {
      services.Configure&lt;JwtIssuerOptions&gt;(options =&gt;
      {
          options.Issuer = jwtAppSettingOptions[nameof(JwtIssuerOptions.Issuer)];
          options.Audience = jwtAppSettingOptions[nameof(JwtIssuerOptions.Audience)];
          options.SigningCredentials = new SigningCredentials(_signingKey, SecurityAlgorithms.HmacSha256);
      });
  }
  
  public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
      //...
  
      app.UseJwtBearerAuthentication(new JwtBearerOptions
      {
          AutomaticAuthenticate = true,
          AutomaticChallenge = true,
          TokenValidationParameters = tokenValidationParameters
      });
  
      //...
  }
  </code></pre>
  
  <p>with action that returns a token. I want to use this token for authentication in main application. Now it uses cookies and: </p>
  
  <pre><code>HttpContext.Authentication.SignInAsync("Cookies", new ClaimsPrincipal(claimsIdentity)). 
  </code></pre>
  
  <p>How could I inject this token to my app and what configuration it required?</p>