title: Use existing Asp Net Framework machine key in a Asp Net Core app
body: <p>I have few working ASP NET apps built with Net.Framework sharing same <code>machineKey</code> in Web.config, so when a user authenticated in one app, other apps consider him authenticated as well.</p>
  
  <p>Now I have to wire up a new app to this club that uses asp net Core 2.0. Is there a quick solution on how to convert the existing "legacy" </p>
  
  <pre><code>&lt;system.web&gt;
  ...
  &lt;machineKey decryption="AES" decryptionKey="blablabla" validation="SHA1" validationKey="blablabla" /&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>to be used in the Core app?</p>
  
  <p><strong>Edit:</strong> The actual Net.Framework api is using token-based authentication:</p>
  
  <pre><code>using Microsoft.Owin;
  using Microsoft.Owin.Security.OAuth;
  private void ConfigureOAuth(IAppBuilder app)
  {
      OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
      //Token consumption from header "Authentication Bearer"
      app.UseOAuthBearerAuthentication(OAuthBearerOptions);
  }
  </code></pre>
  
  <p>Then on <code>[Authorize]</code> the framework decodes the token using machine key. The correct question i guess would be how to implement the same in Core 2.0+ using the manually provided machine key to decrypt the auth token sent in header.</p>