Allow parsing of JOSE headers with enc="" as JWS header

Issue #242 wontfix
Connect2id OSS created an issue

Reported by email to support:

We are testing your open source library (nimbusds) JOSE and JWT libraries. We have find two errors that w'd like to be added to the solution

How is detected JWE/JWS (new code)

              } else if ( ( json.getAsString("enc")!= null) && (json.getAsString("enc").length() > 0) ) {
                     // JWE
                     return JWEAlgorithm.parse(algName);
              } else {
                     // JWS
                     return JWSAlgorithm.parse(algName);
              }

VISA that use this protocol send the header field enc="", and is detected as JWE and should be detected as JWS because the field exists but without value.

Comments (1)

  1. Log in to comment