Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

100
Visualizações
JWT Authentication, Encoding a LocationToken

I'm working an external API in which there is a locationToken. With this, I use it to create encoded data which I will use within my Bearer.

I am creating the data as such:

var data = {
  "locationToken": postman.getEnvironmentVariable("LocationToken"),
  "timestamp": Math.floor(new Date().getTime() / 1000)
};


data = addIAT(data);

With this data, i'm then encoding it using stringify then Cyrpto:

var stringifiedData = CryptoJS.enc.Utf8.parse(JSON.stringify(data));
var encodedData = base64url(stringifiedData);

postman.setEnvironmentVariable("locationTokenData", encodedData);

Strangely, within this it will always come out as, please note the NhdGlvblRva

eyJsb2NhdGlvblRva2VuIjoiZXlKMGVYQWlPaUpLV ----- etc

However, if I run it through their automatic documentation sample it comes with:

eyJpYXQiOjE2NjE2OTQyNzksInRpbWVzdGFtcCI ------ etc

I can confirm it is linked to the same account, same area, same details etc, however there appears to be an issue with how i'm passing this data. Can anyone let me know what's incorrect? Why is this string always occuring: NhdGlvblRva

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda