Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Unable to decode Example from http://jwt.io/ #11

Open
francisdb opened this issue Jun 15, 2015 · 3 comments
Open

Unable to decode Example from http://jwt.io/ #11

francisdb opened this issue Jun 15, 2015 · 3 comments

Comments

@francisdb
Copy link

Tried to use the library but it fails to decode our tokens. I tried the example from http://jwt.io/ and that one also fails to decode. What am I doing wrong?

println(
  JWT.decode(
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ",
    Some("secret")
  )
)

Always prints InvalidSignature

@damianbl
Copy link

Do you properly fill in the field VERIFY SIGNATURE on jwt.io?

@francisdb
Copy link
Author

I literally copied the example shown on the homepage of jwt.io, including their secret.

@ekote
Copy link

ekote commented Nov 8, 2017

I also tried to implement this library, but all the time I received InvalidSignature. I validated my token via online tool on jwt.io and it was successful. The conclusion is that your library doesn't work properly. Because of this I switched to https://github.com/pauldijou/jwt-scala

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants