I'm trying to create a web token using the jjwt library, but I can't figure out how to send an object as one of the claims. If I parse the object or manually create the string the entire string is coming through as the value instead of a separate JSON object. For instance, I want to send something that looks like this:
{
"iss": "NQoFK1NLVelFWOBQtQ8A",
"iat": 1511963669,
"user": {
"id": "exampleuser",
"email": "example@mail.com",
"name": "A User",
}
}
But all I've been able to create is:
{
"iss": "NQoFK1NLVelFWOBQtQ8A",
"iat": 1511963669,
"user": "{\"id\": \"example@mail.com\",\"email\": \"example@mail.com\",\"name\": \"A User\"}"
}