You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to generate a JWT token in .net 8 using c#. I have a payload with me in the form of JSON array. Is it possible to give this payload as it is instead of converting to your Dictionary<string,object> claims data type in System.IdentityModel.Tokens.Jwt nuget package(which is not possible as it will throw exception).
This is my sample JSON:-
[{
"id": 1,
"first_name": "Cristionna",
"last_name": "Lerigo",
"email": "clerigo0@omniture.com",
"gender": "Agender",
"ip_address": "248.29.27.249"
}, {
"id": 2,
"first_name": "Dee",
"last_name": "Leaney",
"email": "dleaney1@amazon.com",
"gender": "Polygender",
"ip_address": "102.181.150.82"
}, {
"id": 3,
"first_name": "Roda",
"last_name": "Biswell",
"email": "rbiswell2@ehow.com",
"gender": "Female",
"ip_address": "20.149.99.253"
}, {
"id": 4,
"first_name": "Maura",
"last_name": "Renackowna",
"email": "mrenackowna3@nydailynews.com",
"gender": "Female",
"ip_address": "175.109.32.110"
}, {
"id": 5,
"first_name": "Birch",
"last_name": "Exposito",
"email": "bexposito4@gnu.org",
"gender": "Bigender",
"ip_address": "133.33.159.143"
}]. Also I dont want to create any additional key value pairs.
Kindly please help me out in this regards.
Thank you
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi GoodAfternoon,
I am trying to generate a JWT token in .net 8 using c#. I have a payload with me in the form of JSON array. Is it possible to give this payload as it is instead of converting to your Dictionary<string,object> claims data type in System.IdentityModel.Tokens.Jwt nuget package(which is not possible as it will throw exception).
This is my sample JSON:-
[{
"id": 1,
"first_name": "Cristionna",
"last_name": "Lerigo",
"email": "clerigo0@omniture.com",
"gender": "Agender",
"ip_address": "248.29.27.249"
}, {
"id": 2,
"first_name": "Dee",
"last_name": "Leaney",
"email": "dleaney1@amazon.com",
"gender": "Polygender",
"ip_address": "102.181.150.82"
}, {
"id": 3,
"first_name": "Roda",
"last_name": "Biswell",
"email": "rbiswell2@ehow.com",
"gender": "Female",
"ip_address": "20.149.99.253"
}, {
"id": 4,
"first_name": "Maura",
"last_name": "Renackowna",
"email": "mrenackowna3@nydailynews.com",
"gender": "Female",
"ip_address": "175.109.32.110"
}, {
"id": 5,
"first_name": "Birch",
"last_name": "Exposito",
"email": "bexposito4@gnu.org",
"gender": "Bigender",
"ip_address": "133.33.159.143"
}]. Also I dont want to create any additional key value pairs.
Kindly please help me out in this regards.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions