0

I have an ASP.Net WebAPI app that's working fine with basic userid/password authentication.

However I also have to support authentication via Json Web Tokens.

Apparently the JWT will contain an encrypted userid and a signature that I will need to verify, so I assume I will have keys for that.

I don't need to create new tokens, I just need to validate them before I pass control to the usual webservice methods. It feels like it should be simple enough, but I haven't done this before and I'm having trouble finding examples online that (a) extract the contents and validate them, and (b) do not use out-of-date libraries.

So, how do I do this, or do you know a good example online? Thanks

CompanyDroneFromSector7G
  • 4,291
  • 13
  • 54
  • 97

1 Answers1

1

I am not sure if is against policies to post a link as an answer but it would be easier then to extract the relevant code from it and post here Check this Github repo it has everything you need to setup JWT tokes issue and validate them. Hope this help

npo
  • 1,060
  • 8
  • 9