08.05.2023, 12:24
Try this for the signature calculation. You might need to swap message and secret arguments if it does not work.
Use log() instead of self:debug. There are no callbacks for HTTP requests anyway, just the return values. Search the forums, there are many similar HTTP request examples available.
Code:
function oauth2_signature(message, secret)
local encdec = require('encdec')
local hashed = encdec.hmacsha1(secret, message, true)
return encdec.base64enc(hashed)
end
Use log() instead of self:debug. There are no callbacks for HTTP requests anyway, just the return values. Search the forums, there are many similar HTTP request examples available.