cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How can I validate a JSON message with a public key?

StefanBode
10-Marble

How can I validate a JSON message with a public key?

During the device on boarding the device generates a asymmetric key pair and send the public key to ThingWorx. The key is stored in a property. The message form the client will be signed with the private key and added to the JSON string. 
the incoming JSON string just needs to be “truncated” by the hash value and now I need a method where I can check with the public key and the JSON string if this matches to the hash. How?

 

the signing will give the ThingWorx server the confidence that the message was send by this specific device that previously shared the public key.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@StefanBode ,

 

You could probably write it in a Java extension using something like this:

 

https://github.com/auth0/java-jwt#verify-a-token

View solution in original post

3 REPLIES 3

@StefanBode ,

 

You could probably write it in a Java extension using something like this:

 

https://github.com/auth0/java-jwt#verify-a-token

Yes, an extension is always an option.

 

I just hoped that there is already something in the 100+ included libraries that already has this capability to use. We have all these AppKeys and password hashes, but none of them matches 100% to the problem. Maybe someone else has an idea.

 

Stefan

slangley
23-Emerald II
(To:StefanBode)

Hi @StefanBode.

 

If you feel that your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags