2

How to tell my MVC application to use JWT for validating the User.

I want to make my MVC application to validate the user using JWT whenever the user tries to access the method with authorize attribute. Since, I will use ajax calls in many pages to access method present in mvc controller, I don't think its good way to pass token on every ajax request. I need an help to accomplish authentication and authorization in efficient way using asp.net identity in MVC applicaton.

Currently , I don't know how to use this JWT token for authentication and authorization in mvc application. Any help is appreciated Thanks.

public class UserController : BaseHRAppController
{
// How to use JWT to access this Action
[Authorize]
public ActionResult Index()
{          
return View();
}
}
Moe Ash
  • 21
  • 1
  • See if this helps you: http://stackoverflow.com/questions/29791499/how-to-use-jwt-in-mvc-application-for-authentication-and-authorization – scotru Dec 11 '16 at 10:37

0 Answers0