How to use bearer token with two asp.net web api
<p>i have two project both of them are asp.net web api </p>

<p>with one of the web api i have the functionality to create bearer token</p>

<p>Web api 1 : </p>

<p>Startup.Auth.cs file : </p>

<pre><code>    public void ConfigureAuth(IAppBuilder app)
    {
        OAuthOptions = new OAuthAuthorizationServerOptions();

        // Enable the application to use bearer tokens to authenticate users
        app.UseOAuthBearerTokens(OAuthOptions);
    }
</code></pre>

<p>and to create a new token i am using this function :</p>

<pre><code>      public static string CreateTokenForAuthUser(string username ,string role)
      {

        AuthList authlist = new AuthList();
        var identity = new ClaimsIdentity(Startup.OAuthOptions.AuthenticationType);
        identity.AddClaim(new Claim(ClaimTypes.Name, username));
        identity.AddClaim(new Claim(ClaimTypes.Role, "SomeRule"));

        var ticket = new AuthenticationTicket(identity, new AuthenticationProperties());
        var currentUtc = new SystemClock().UtcNow;
        ticket.Properties.IssuedUtc = currentUtc;
        ticket.Properties.ExpiresUtc = currentUtc.Add(TimeSpan.FromMinutes(30));

        string token = Startup.OAuthOptions.AccessTokenFormat.Protect(ticket);

        return token;

      }
</code></pre>

<p>all working fine to create bearer token and use it on this web api</p>

<p>i would like to know how can i use the same bearer token that was created on the web api 1 with another asp.net web api that i have for using the same authorization rules on controllers (assuming they have the same functionality )</p>

<p>Thanks !</p>