2
votes

I have read the tutorial http://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server and realized that this is what I really want to secure my web APIs. so I downloaded the project code and added to my API's MVC project. Actually my project is divided into 2 parts, the MVC_application (for displaying data from web API's) and the MVC_API where my API's are configured. so now I have three projects (MVC_application, MVC_API and AuthorizationServer)

My question is: Howcan I link the AuthorizationServer to my project?

In other words: how do I tell the application to call AuthorizationServer before calling the MVC_API project to read the data?

1

1 Answers

0
votes

You need to secure your web api project, and handle in your mvc project , unauthorized responses from your web api service. For call your web api, you need to call first to your authorization server, get the bearer token and include the header in your subsequent requests to your web api service.