-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing fails on android platform #31
Milestone
Comments
Thanks for the report! This should be relatively easy to fix. |
lhazlewood
added a commit
that referenced
this issue
Jun 26, 2015
The PR for this was successful and merged to master. The fix will be in the 0.5.1 release. |
lhazlewood
added a commit
that referenced
this issue
Jun 26, 2015
lhazlewood
added a commit
that referenced
this issue
Jun 26, 2015
This has been released as 0.5.1. Please allow 1 to 2 hours for the release artifact to appear in Maven Central. Cheers! |
@lhazlewood Great! Thanks for a quick response and fix. 🙇 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Parsin JWT string using jjwt-0.5 fails on android platform.
jjwt library is added to android project as gradle dependency.
Following code
works correctly on desktop JDK producing following output
However when the same code is run on android (Nexus-5 device running android 5.1.1) if fails with exception thrown from
parseClaimsJwt
method:It looks to me that
android.util.Base64.decode()
method (that is used internally by jjwt) requires input to contain padding characters (=
) (or it just needs to be configured/called different way).If I modify JWT string passed to
parseClaimsJwt
method by adding missing padding character (=
) then it works correctly on android. Following code (with=
added in proper place inside JWT string)... produces expected result:
I glimpsed quickly through the jjwt code and line https://github.com/mikosik/jjwt/blob/master/src/main/java/io/jsonwebtoken/impl/Base64UrlCodec.java#L85 looks fishy to me.
It is:
but I guess it should be
The text was updated successfully, but these errors were encountered: