title: Secure my WebApi1 application using oauth2
body: <p>I have an <strong>MVC4 application</strong> and Im using <strong>WebAPI 1</strong> to expose it to other applications. I want to secure it using oauth2. Please anyone provide me sufficient tutorials to use <strong>oauth2</strong>.</p>
  
  <p>My requirement is that I need to provide some authentication header to my client application when it request(after a login or something) and when it request any data I need to check and verify the authentication header and only based upon the result my application can provide the data as response.</p>
  
  <p>Anybody please show me a detailed example that help me to make my MVC application secure using oauth2.</p>
  
  <p><strong>EDIT</strong> : I have the resource server (my MVC4 webApi1 application). Actually what I need is that I have to make my application as an <strong>identity provider</strong> (<strong>service provider</strong>) (which one provides authorization token and verify it when the client application tries to access it) using <strong><em>oauth2</em></strong>.</p>