We are considering the adoption of a library to generate and use JSON Web Tokens. Jose4j seems a good choice but library "Dependencies" state that "...Jose4j is compiled with/for Java 7 and will also run on Java 8..." and our current instalation run on Java 6 version (migration to higher versions is out of our reach), so our question is simple.
Is there any chance to integrate Jose4j with Java 6? (not at all, with some limitations, can be achieved in any way by adding some specific libraries, etc.)
Thanks in advance
Getting jose4j to run on Java 6 is (probably) possible but will require recompilation and some code changes.
There have been a couple forks of somewhat older versions that I believe have back-ported to compile and run with Java 6 - https://bitbucket.org/yosef_kitrossky/jose4j-jdk1.6/commits/all is the most recent that I know about and there's also https://bitbucket.org/ijazfx/jose4j/commits/all
You could probably do a back-port of the latest too without too much trouble. The code base uses some multi-catch, diamond, and try-with-resources syntax that will need to be converted to the pre Java 7 equivalents. Somewhat tedious perhaps but not rocket surgery. There are also some algorithms that won't work. Some might just not be available at runtime and some, like all the AES-GCM related bits, will need to be removed from the code to get it to compile.
You'll also want to have the JCE Unlimited Strength Jurisdiction Policy File(s) in place as some of the unit tests use AES keys that are larger than 128 bits http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
I hope this helps. Unfortunately, I just don't have bandwidth to maintain a Java 6 compatible version myself.