dyne / restroom-mw

đź›  Easy REST API builder executing Zencode
https://restroom.dyne.org
GNU Affero General Public License v3.0
3 stars 11 forks source link

Issue with http post, http package #47

Closed andrea-dintino closed 3 years ago

andrea-dintino commented 3 years ago

IMPORTANT: before executing, open the link https://beeceptor.com/console/dyneorg to create the endpoint on beeceptor.com.

The zencode:

Rule unknown ignore
# rule check version 1.0.0 
Scenario 'ecdh': Bob verifies the signature from Alice 

Given that I have an endpoint named 'outputEndpoint'  
Given I have a 'public key' from 'FairBnB' 

Given I have a 'string dictionary' named 'listingInfo' 
Given I have a 'signature' named 'listingInfo.signature' 

When I verify the 'listingInfo' has a signature in 'listingInfo.signature' by 'FairBnB' 

Then print the string 'the follwing listing is verified' 
Then print 'listingInfo'

Then pass the output to 'outputEndpoint'

The "keys":

{
    "FairBnB": {
        "public_key": "BM1uOdTzhuOTPmjkGMG1dmc/5ekX+0hUprddvD9/rENYn4OmLJfo4GVhZasrpA33h3IyxGioT8C/x8eVFE42X8E="
    },
    "outputEndpoint": "https://dyneorg.free.beeceptor.com",
    "listingInfo": {
        "listingCity": "Pescara",
        "listingCountry": "Italy",
        "listingID": "123456",
        "listingNotes": "Central, clean, sunny",
        "listingOwner": "ab12345jk"
    },
    "listingInfo.signature": {
        "r": "ZrgQjvl5zaB+O4W8SRcb7HBAOawPwZNONQpgy0YTkB4=",
        "s": "IBbR+xrnX4jbJ63rDJksHp+p4oBpJbYzU8zAJD5WRxI="
    }
}