This is a webapi project written in visual studio and we will secure endpoint using JWT.
There is pre-requiste to implement OAUTH. you can learn about OAUTH here OAuth 2.0: The Definitive Guide
Basically, a JWT token look like:
<base64-encoded header>.<base64-encoded claims>.<base64-encoded signature>
JWT token has three sections:
- Header: JSON format which is encoded as a base64
- Claims: JSON format which is encoded as a base64.
- Signature: Created and signed based on Header and Claims which is encoded as a base64.
- I have used Restlet Client
- Updated to use Latest version of System.IdentityModel.Tokens.Jwt Version 6.8.0
- Clone or download the repository
- You can find more details at my blog SECURING WEBAPI USING JSON WEB TOKEN(JWT) IN C#