need an example of jwt + jwe
Hi Vladimir! Could you, please, give some example how to use nimbus-jose-jwt for creating jwt with jwe ? For example for the header like {"alg":"RSA1_5","enc":"A128CBC+HS256"} and claim like {"exp":1359619528,"aud":"demo","iss":"com.test","prn":"person"}
Thank you.
Comments (8)
-
-
Account Deactivated reporter Yes, I have, but low level experience - can try to help you...
I've seen some "CryptoUtils" class in your old repo. Why won't you use it?
-
For the 1.0 release of the library I used JOSE crypto code from the OpenInfoCard project. Last summer, however, the JOSE+JWT specs went through significant changes, so the alg implementation I had was no longer up to date. That was the reason why I dropped all JWE algs from the 2.0 release. At present only JWS is fully supported.
Axel Nennker, who is a co-author of OpenInfoCard and is also on the JOSE list, started a new project to (re)implement the new algorithms. So we could potentially use that as a starting point. He suggested to look at this particular class:
https://code.google.com/p/jsoncrypto/source/browse/trunk/src/org/jsoncrypto/JcBase.java
Right now I'm busy working on completing our OpenID Connect server, and once that's done I might be able to have a look at the JWE and put the missing algs back in. But for now that's still very much open.
-
Account Deactivated reporter Ok, thank you for answers. I will look at Axel Nennker suggestions...
-
- changed status to open
-
- changed status to resolved
Just added an example to the wiki, based on the JUnit test from commit 2540025, as we now have full RSA encryption support.
Enjoy! :)
-
Account Deactivated reporter Hi Vladimir! Thank you - we will try to use it ... Will let you know about problems, if it happens ;)
-
Good, we have another new release coming up, should be in maven central by tomorrow :)
- Log in to comment
Do you have any experience with crypto development in Java?
We have all scaffolding in place to represent JWE objects but still no concrete implementations of the standard JWE algorithms. For several months now I have been looking for a contributor to join us on that, to do at least the basic RSA encryption.