Ver código fonte

Update com.nimbusds dependencies to latest.release

Issue gh-113
Joe Grandja 5 anos atrás
pai
commit
ae20f73676

+ 2 - 2
gradle/dependency-management.gradle

@@ -24,8 +24,8 @@ dependencyManagement {
 	}
 
 	dependencies {
-		dependency "com.nimbusds:oauth2-oidc-sdk:8.+"
-		dependency "com.nimbusds:nimbus-jose-jwt:8.+"
+		dependency "com.nimbusds:oauth2-oidc-sdk:latest.release"
+		dependency "com.nimbusds:nimbus-jose-jwt:latest.release"
 		dependency "com.fasterxml.jackson.core:jackson-databind:2.+"
 		dependency "javax.servlet:javax.servlet-api:4.+"
 		dependency 'junit:junit:latest.release'

+ 1 - 2
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/jose/jws/NimbusJwsEncoder.java

@@ -28,7 +28,6 @@ import com.nimbusds.jose.util.Base64;
 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.security.crypto.keys.KeyManager;
 import org.springframework.security.crypto.keys.ManagedKey;
@@ -213,7 +212,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,

+ 1 - 1
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/JwkSetEndpointFilter.java

@@ -95,7 +95,7 @@ public class JwkSetEndpointFilter extends OncePerRequestFilter {
 
 		response.setContentType(MediaType.APPLICATION_JSON_VALUE);
 		try (Writer writer = response.getWriter()) {
-			writer.write(jwkSet.toJSONObject().toString());
+			writer.write(jwkSet.toString());
 		}
 	}