I came accross to work with WCF restful API's with security tokens Json Web Token (JWT). I've created registration and login (created jwt here) service for user. Now I'm unsure about how to authenticate JWT on each request of user while accessing data. Here is the link that I followed for creating JWT.
https://www.c-sharpcorner.com/article/wcf-service-with-jwt-token/
here is the response object with user info and JWT
{
"response": "true",
"UData": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoibWxpYXFhdDQxNUBnbWFpbC5jb20iLCJwYXNzIjoiMzMzIiwiaWF0IjoiMTU5MzYwNTY0MCJ9.JAeBj0VAJJtCVwbTMrgz_F6ZQWdjYcZFUsif5qLHPGo",
"authenticated": true,
"UserID": "4",
"FullName": "Hellen Waock",
"UNo": null,
"Email": "hellenwaockofficial@gmail.com",
"timestamp": "2020-07-01T17:14:00.355758+05:00"
}
}
Now I'm creating a service for get_AllUsers, but I want to consume JWT, while accessing get_AllUsers. Another point to ask, In the above link I followed, I found a line of code to paste in webconfig, I pasted that in various tag but got some error, anybody could help about where to paste that line. Thanks in advance