title: ASP.NET Core 1.0 OAuth Server using Openiddict
body: <p>I would like to use Openiddict OAuth to protect api endpoints in my ASP.NET Core 1.0 Web Application. The <code>api</code> endpoints will be called by a phone app and users must login with username and password.</p>
  
  <p>The flow goes like this:</p>
  
  <ul>
  <li>User can register and login via web application: <code>https://www.domain.com</code></li>
  <li>User install phone app, and they can login and register using the phone app. Login, registration and data access is done via <code>api</code> endpoints: Example: <code>https://www.domain.com/api/service/getsomedata</code></li>
  </ul>
  
  <p>How can I configure Openiddict OAuth so I can protect the API endpoints using OAuth?</p>