Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

106
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda