title: How to implement oauth2 server in ASP.NET MVC 5 and WEB API 2
body: <p>First I'll sketch my project:</p>
  
  <p>For my internship I need to add functionality to an existing system. A 3rd party client must be able to access data from AX Webservices once he is authorised by the user via OAuth2. I understand that I need to make a 'proxy web service' whereto the client can make its calls and that calls the AX services but I am a bit unsure about the OAuth2 part. Most tutorials and guides are about using ASP.NET's Identity for Facebook or Google-logins. I do not need that, I need to use existing credentials so I need to make my own OAuth2 service. </p>
  
  <p>I find it hard to find tutorials, guides or explanations on this. I understand OAuth2 and what needs to be done, but I have never done such a thing before and find it hard to start. The closest thing to what I need that I found is this <a href="https://github.com/ErikSchierboom/basicoauth2server.persistent" rel="noreferrer">github repo link</a>, but the solution does not build.</p>
  
  <p>What I had in mind is making an ASP.NET MVC Website where clients (3rd parties) can register themselves and acquire their Client ID's. With ASP.NET API I wanted to create the API that take the required tokens and parameters, and then access the Dyn AX services.</p>
  
  <p>Is this correct or am I entirely wrong? Any help or links regarding building your own oauth2 server/service would be nice.</p>