The array contains two hashes which represent the payload and the header.
You can access them by using the following code:
payload, header = JWT.decode token, mySecret
# display the content puts payload.inspect puts header.inspect
Carlton Smith III
unread,
Oct 27, 2015, 11:00:09 AM10/27/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ruby-jwt
Thanks for the input. I actually was able to figure out why I was having so much difficulty,. I was using the variable "response" to store what JWT returned, and it turns out that is a keyword in Rails. It was displaying an object that had nothing to do with JWT and I couldn't figure out for the life of me how to get to the data. After changing the variable name I had a simple array to deal with.
excpt
unread,
Oct 27, 2015, 11:03:42 AM10/27/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message