need an example of jwt + jwe

Issue #10 resolved
Andrey Bogatyrev created an issue

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)

  1. Vladimir Dzhuvinov

    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.

  2. Andrey Bogatyrev 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?

  3. Vladimir Dzhuvinov

    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.

  4. Andrey Bogatyrev Account Deactivated reporter

    Ok, thank you for answers. I will look at Axel Nennker suggestions...

  5. Andrey Bogatyrev Account Deactivated reporter

    Hi Vladimir! Thank you - we will try to use it ... Will let you know about problems, if it happens ;)

  6. Log in to comment