2.0.2 (2023-01-11)
This patch release does not contain any functional changes, but is being released using an updated signing key for verification as part of our commitment to best security practices. Please review the README note for additional details.
2.0.1 (2021-11-08)
Security
2.0.0 (2020-03-05)
This major stops using Support Library and migrates to AndroidX dependencies. Full Changelog
Changed
- Update dependencies and use AndroidX #44 (SUPERCILEX)
1.4.0 (2019-10-28)
Added
- Add asObject(Class tClazz) to convert claims to object of type "T" #41 (sabinbajracharya)
1.3.0 (2019-04-17)
Added
- Add Claim asLong support. #35 (chenjiancan)
1.2.0 (2018-11-21)
Added
- Allow to obtain the Map of Claims #31 (lbalmaceda)
Changed
- Target SDK 28. Update Wrapper and OSS plugin #30 (lbalmaceda)
Fixed
- Allow JWT with empty Signatures #15 (oliverspryn)
1.1.1 (2017-04-27)
Fixed
- Change getClaim annotation to nonNull #9 (lbalmaceda)
1.1.0 (2016-12-05)
Changed
- Keep public claims instead of removing them #7 (lbalmaceda)
- Return BaseClaim if custom Claim not found #4 (lbalmaceda)
1.0.0 (2016-10-25)
Java library with focus on Android that provides Json Web Token (JWT) decoding.
The library is be available both in Maven Central and JCenter. To start using it add this line to your build.gradle
dependencies file:
compile 'com.auth0.android:jwtdecode:1.0.0'
Decode a JWT token
String token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ";
JWT jwt = new JWT(token);
A DecodeException
will raise with a detailed message if the token has:
- An invalid part count.
- A part not encoded as Base64 + UTF-8.
- A Header or Payload without a valid JSON format.