Update nimbus-jose-jwt to 9.8.1

Issue gh-344
This commit is contained in:
Joe Grandja
2021-07-07 10:25:16 -04:00
parent 1d94ac85a4
commit 059880f51a
2 changed files with 2 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ dependencyManagement {
}
dependencies {
dependency "com.nimbusds:nimbus-jose-jwt:9.8.1"
dependency "javax.servlet:javax.servlet-api:4.0.1"
dependency 'junit:junit:4.13.2'
dependency 'org.assertj:assertj-core:3.19.0'

View File

@@ -43,7 +43,6 @@ import com.nimbusds.jose.util.Base64URL;
import com.nimbusds.jwt.JWTClaimsSet;
import com.nimbusds.jwt.SignedJWT;
import net.minidev.json.JSONObject;
import org.springframework.core.convert.converter.Converter;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
@@ -198,7 +197,7 @@ public final class NimbusJwsEncoder implements JwtEncoder {
Map<String, Object> jwk = headers.getJwk();
if (!CollectionUtils.isEmpty(jwk)) {
try {
builder.jwk(JWK.parse(new JSONObject(jwk)));
builder.jwk(JWK.parse(jwk));
}
catch (Exception ex) {
throw new JwtEncodingException(String.format(ENCODING_ERROR_MESSAGE_TEMPLATE,