1

I'm making a web service by using Asp.net Framework. I'm struggling with jwt authentication.

I wonder if there is any AuthenticationHandler in ASP.NET Framework as ASP.Net core or not - where I can get token from request header, validate and set to HttpContext.

I want to authenticate every single request as header is available. In AuthorizeAttribute, I only get the information from HttpContext.User and validate the availability of account in my system without parsing token there.

Finally, my question is : How can I write AuthenticationHandler to validate every API Request ?

Thank you,

Redplane
  • 2,971
  • 4
  • 30
  • 59
  • [Have you done any research?](https://www.google.com.au/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=jwt%20authentication%20.net%20web%20service) Are any of the linked articles useful? Narrow down your problem as this is to broad for Stack Overflow. – Jon P Nov 15 '16 at 04:06
  • 2
    I did already before asking this question. Thing I'm talking about is create my own authenticationhandler. – Redplane Nov 15 '16 at 04:08
  • This question seems to ask something similar http://stackoverflow.com/questions/36095076/custom-authentication-in-asp-net-core – Beno Nov 15 '16 at 04:14
  • 2
    Not similar :| . I'm asking about ASP.NET Framework, not Core – Redplane Nov 15 '16 at 05:21

0 Answers0