[java-oidfed-common] 02/02: Fix deprecation warnings from Nimbus
Codeberg
noreply at shibboleth.net
Wed Sep 16 11:51:44 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-oidfed-common.
View the commit online:
https://codeberg.org/Shibboleth/java-oidfed-common/commit/9cdd86257cd1f8daa8e4dbd95f097b0e4df32fd5
commit 9cdd86257cd1f8daa8e4dbd95f097b0e4df32fd5
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Wed Sep 16 14:50:56 2026 +0300
Fix deprecation warnings from Nimbus
- get/setContent -> get/setBody
---
.../net/shibboleth/oidfed/flow/EntityConfigurationFlowTest.java | 6 +++---
.../shibboleth/oidfed/messaging/impl/AbstractSignedJWTResponse.java | 2 +-
.../oidfed/messaging/impl/ExplicitClientRegistrationResponse.java | 4 ++--
.../net/shibboleth/oidfed/messaging/impl/ResolveEntityResponse.java | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/oidfed-common-conf-impl/src/test/java/net/shibboleth/oidfed/flow/EntityConfigurationFlowTest.java b/oidfed-common-conf-impl/src/test/java/net/shibboleth/oidfed/flow/EntityConfigurationFlowTest.java
index 2e769ab..06f063a 100644
--- a/oidfed-common-conf-impl/src/test/java/net/shibboleth/oidfed/flow/EntityConfigurationFlowTest.java
+++ b/oidfed-common-conf-impl/src/test/java/net/shibboleth/oidfed/flow/EntityConfigurationFlowTest.java
@@ -95,20 +95,20 @@ public class EntityConfigurationFlowTest extends AbstractFederationFlowTest {
final FlowExecutionResult result2 = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
final Response response2 = parseResponse(result2);
- Assert.assertEquals(response2.toHTTPResponse().getContent(), response.toHTTPResponse().getContent());
+ Assert.assertEquals(response2.toHTTPResponse().getBody(), response.toHTTPResponse().getBody());
Thread.sleep(2000);
final FlowExecutionResult result3 = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
final Response response3 = parseResponse(result3);
assertEntityStatement(response3);
- Assert.assertNotEquals(response3.toHTTPResponse().getContent(), response.toHTTPResponse().getContent());
+ Assert.assertNotEquals(response3.toHTTPResponse().getBody(), response.toHTTPResponse().getBody());
}
protected void assertEntityStatement(final Response response) throws ParseException {
final EntityConfiguration entityStatement;
try {
entityStatement = EntityConfigurationImpl.parse(
- SignedJWT.parse(response.toHTTPResponse().getContent()), payloadObjectMapper);
+ SignedJWT.parse(response.toHTTPResponse().getBody()), payloadObjectMapper);
} catch (JsonProcessingException | java.text.ParseException e) {
Assert.fail("Could not parse the response contents", e);
return;
diff --git a/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/AbstractSignedJWTResponse.java b/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/AbstractSignedJWTResponse.java
index 4a424f4..7c22a9b 100644
--- a/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/AbstractSignedJWTResponse.java
+++ b/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/AbstractSignedJWTResponse.java
@@ -67,7 +67,7 @@ public abstract class AbstractSignedJWTResponse implements Response {
public HTTPResponse toHTTPResponse() {
final HTTPResponse httpResponse = new HTTPResponse(HTTPResponse.SC_OK);
httpResponse.setEntityContentType(getHttpResponseContentType());
- httpResponse.setContent(getJWT().serialize());
+ httpResponse.setBody(getJWT().serialize());
return httpResponse;
}
diff --git a/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java b/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java
index 8ec3cf3..65db484 100644
--- a/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java
+++ b/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java
@@ -71,14 +71,14 @@ public class ExplicitClientRegistrationResponse extends AbstractSignedJWTRespons
httpResponse.ensureStatusCode(HTTPResponse.SC_OK);
httpResponse.ensureEntityContentType(HTTP_RESPONSE_CONTENT_TYPE);
- final String content = httpResponse.getContent();
+ final String content = httpResponse.getBody();
if (StringSupport.trimOrNull(content) == null) {
throw new ParseException("Message body is empty");
}
try {
- final SignedJWT jwt = SignedJWT.parse(httpResponse.getContent());
+ final SignedJWT jwt = SignedJWT.parse(httpResponse.getBody());
assert jwt != null;
return new ExplicitClientRegistrationResponse(jwt);
} catch (final java.text.ParseException | ConstraintViolationException e) {
diff --git a/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ResolveEntityResponse.java b/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ResolveEntityResponse.java
index ea0dbee..60b243e 100644
--- a/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ResolveEntityResponse.java
+++ b/oidfed-common-impl/src/main/java/net/shibboleth/oidfed/messaging/impl/ResolveEntityResponse.java
@@ -70,14 +70,14 @@ public class ResolveEntityResponse extends AbstractSignedJWTResponse {
httpResponse.ensureStatusCode(HTTPResponse.SC_OK);
httpResponse.ensureEntityContentType(HTTP_RESPONSE_CONTENT_TYPE);
- final String content = httpResponse.getContent();
+ final String content = httpResponse.getBody();
if (StringSupport.trimOrNull(content) == null) {
throw new ParseException("Message body is empty");
}
try {
- final SignedJWT jwt = SignedJWT.parse(httpResponse.getContent());
+ final SignedJWT jwt = SignedJWT.parse(httpResponse.getBody());
assert jwt != null;
return new ResolveEntityResponse(jwt);
} catch (final java.text.ParseException | ConstraintViolationException e) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list