0

The ember-cli-simple-auth-token documentation specifies that the jwt is decoded and read upon successful authentication with the backend. However I don't understand how it will decode the token, the jwt is originally created with a private key but I could not find any information in the docs about providing the required data for the jwt decryption process.

What am I missing? How does the library decodes the jwt? Am I encoding it in a non-standard way? Is there a configuration property in the library to specify where to find the corresponding public key or something?

Thanks a lot to whoever reads this and can help.

gcasanova
  • 43
  • 6

1 Answers1

1

Ok I went ahead and checked the library's code and revised the jwt specification For anyone wondering the same in the future, the token is base64 coded and decoded.

Im such a noob.

gcasanova
  • 43
  • 6
  • The only part that is encoded using the secret is the third chunk of the token, which is the signature of the jwt and which is not needed in order to decode / read the payload. Here is a neat article about the jwt specification https://scotch.io/tutorials/the-anatomy-of-a-json-web-token – gcasanova Jun 25 '15 at 19:01