title: OAuth Authorization Service in ASP.NET Core
body: <p>In Web API 2, you used to be able to create an endpoint to issue a token by setting up an OAuth Authorization Server via middleware like below:</p>
  
  <pre><code>//Set up our auth server options.
  var OAuthServerOptions = new OAuthAuthorizationServerOptions()
              {
                  AllowInsecureHttp = true,
                  TokenEndpointPath = new PathString("/token"),
                  AccessTokenExpireTimeSpan = TimeSpan.FromDays(1),
                  Provider = new SimpleAuthorizationServerProvider()
              };
  
   // Sets up the token issue endpoint using the options above
   app.UseOAuthAuthorizationServer(OAuthServerOptions);
  </code></pre>
  
  <p>Perhaps I'm missing it, but I'm trying to figure out how to do this in ASP.NET Core.  I've looked through the source (<a href="https://github.com/aspnet/Security" rel="noreferrer">https://github.com/aspnet/Security</a>) but I don't really see anything analogous.  Is there a new way to accomplish this?  Do I need to just create a controller and do it myself?</p>
  
  <p>I see how OAuth Authentication can be set up via Middleware, but this regards the authorization portion where I issue claims from my API.</p>