Hi everyone,
I have tried to generate the JWT token for my addon using the following node.js script
var jwt = require('jsonwebtoken');
var issuedAt = Math.floor(Date.now() / 1000);
var payload = {
iss: 'user:5617820:496',
jti: Math.random().toString(),
iat: issuedAt,
exp: issuedAt + 60,
};
var secret = '.mysecret.'
// store this securely.
var token = jwt.sign(payload, secret, {algorithm: 'HS256',// HMAC-SHA256 signing algorithm
});
console.log(token);
Then I use this token to issue the command:
C:\curl>curl.exe https://addons.mozilla.org/api/v3/addons/EasyFa@EasyFa.txt/vers
ions/1.0.1-signed -g -XPUT --form ‘upload=build/easyfa-1.0-fx.xpi’ -H ‘Authoriz
ation: JWT eyJ0…HI’
but there is an error of:
curl: (6) Could not resolve host: JWT
curl: (6) Could not resolve host: eyJ0…
Any ideas what I am missing here?
Thanks