Sign and verify a digital signature

Hi, I am a bit lost on how to implement the following in Mendix: Party A has a published webservice available and party B (me) wants to make use of the webservice. Party B must add a signature to every message so Party A can verify my identity with a provided public key of Party B. Party B must also verify the signature in the response with the provided public key of Party A. The JWT module in the marketplace provides the means to generate a private/public keypair, but the part I where I am lost is how to add signature a message with my private key and how to verify the signature in a response. Anyone can help me with this? 
1 answers

Have you tried Custom authentication for the rest service?

With this, it should be possible to get the HTTP header and process the authentication for REST services the way you need.