1
votes

I have a ASP.NET WEB API(project 1) that uses Asp.Net Identity 2.0 to authenticate users. This API is just for authentication and authorisation purpose.

I have two more projects

  1. ASP.NET MVC 5 project(project 2)
  2. ASP.NET WEB API (project 3) - this includes services related to business.

all the three projects use https.

MVC project collects username, password and sends it to the API project(project 1). Api Project(project 1) authenticates the user and sends back a bearer token. An authentication cookie is set in the mvc project(project 2). It works well upto this.

Now I want to pass the bearer token from MVC project(project 2) to the Second API(project 3) and get it(project 3) authenticated. I can't find a method in UserManager to Validate a bearer token.

Any Ideas?

1

1 Answers

0
votes

Have you tried using [Authorize] attribute on the api function that is being called ?