rest - eve framework and HMAC auth -


I'm calculating the HMAC of the HTM body request like this:

  payload = "" "": "MyWM", "os": "gentoo", "resource": {"vCPU": "4", "RAM": "512", "disk": "1000"}, "verb Msg = Json.dumps (payload, sort_keys = tru) message = bytes (msg, encoding = 'utf-') = "(" start ") key =" supersecretkey "secret = bytes (key, encoding = 'utf-8' 8 ') print (hmac.new (suspense, message, sha1) .hexdigest ())  

After that I change hexdigest encode with B64 and Dr. Says shipped with curls like S Authority Paulo: $ hmac_base64_encoded
problem is that I get the usual 500 error
am I wrong?

Since you are using Python 3x, make sure that your custom HMACETH converts you to bytes (The code snippet from the official document is for Python 2x).


Comments