[java-idp-plugin-oidc-op-oidfed] branch main updated: Harmonised explicit registration and resolve entity API response messages
Henri Mikkonen
henri.mikkonen at iki.fi
Fri Nov 7 14:37:17 UTC 2025
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-idp-plugin-oidc-op-oidfed.
View the commit online:
https://git.shibboleth.net/view/?p=java-idp-plugin-oidc-op-oidfed.git;a=commit;h=be796b972e248a4eb51ffcd9dfbe6836f64d8c87
The following commit(s) were added to refs/heads/main by this push:
new be796b9 Harmonised explicit registration and resolve entity API response messages
be796b9 is described below
commit be796b972e248a4eb51ffcd9dfbe6836f64d8c87
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Fri Nov 7 16:37:06 2025 +0200
Harmonised explicit registration and resolve entity API response messages
- Base on a new abstract class
- Enforce the HTTP response content-type and JWT type-header
- explicit-registration-response+jwt and resolve-response+jwt
- Improved flow tests
---
...esponse.java => AbstractSignedJWTResponse.java} | 58 +++++++++-------------
.../impl/ExplicitClientRegistrationResponse.java | 52 ++++++++-----------
.../messaging/impl/ResolveEntityResponse.java | 44 ++++++----------
...ultResolveEntityTrustChainFetchingStrategy.java | 19 +++----
.../impl/FormExplicitRegistrationResponse.java | 2 +-
.../idp/flows/oidfed/register/register-beans.xml | 2 +-
.../flow/oidfed/AbstractFederationFlowTest.java | 10 ++--
.../profile/flow/oidfed/RegistrationFlowTest.java | 6 ++-
8 files changed, 82 insertions(+), 111 deletions(-)
diff --git a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ResolveEntityResponse.java b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/AbstractSignedJWTResponse.java
similarity index 50%
copy from idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ResolveEntityResponse.java
copy to idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/AbstractSignedJWTResponse.java
index 7372859..fd5c123 100644
--- a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ResolveEntityResponse.java
+++ b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/AbstractSignedJWTResponse.java
@@ -17,21 +17,18 @@ package net.shibboleth.idp.plugin.oidc.op.oidfed.messaging.impl;
import javax.annotation.Nonnull;
import com.nimbusds.common.contenttype.ContentType;
+import com.nimbusds.jose.JOSEObjectType;
import com.nimbusds.jwt.SignedJWT;
-import com.nimbusds.oauth2.sdk.ParseException;
import com.nimbusds.oauth2.sdk.Response;
import com.nimbusds.oauth2.sdk.http.HTTPResponse;
import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.primitive.StringSupport;
+import net.shibboleth.shared.logic.ConstraintViolationException;
/**
- * Response message to the OpenID federation resolve entity endpoint.
+ * An abstract class for the responses containing a signed JWT / entity statement.
*/
-public class ResolveEntityResponse implements Response {
-
- /** The content type. */
- @Nonnull public static final ContentType CONTENT_TYPE = new ContentType("application", "resolve-response+jwt");
+public abstract class AbstractSignedJWTResponse implements Response {
/** The JWT included in the response. */
@Nonnull private final SignedJWT jwt;
@@ -41,8 +38,13 @@ public class ResolveEntityResponse implements Response {
*
* @param statement JWT
*/
- public ResolveEntityResponse(@Nonnull final SignedJWT statement) {
+ public AbstractSignedJWTResponse(@Nonnull final SignedJWT statement) {
jwt = Constraint.isNotNull(statement, "Entity statement cannot be null");
+ final JOSEObjectType type = jwt.getHeader().getType();
+ if (!getJWTTypeHeader().equals(type)) {
+ throw new ConstraintViolationException("Unexcepted type header (" + type + "), expected "
+ + getJWTTypeHeader());
+ }
}
/**
@@ -64,36 +66,22 @@ public class ResolveEntityResponse implements Response {
@Override
public HTTPResponse toHTTPResponse() {
final HTTPResponse httpResponse = new HTTPResponse(HTTPResponse.SC_OK);
- httpResponse.setEntityContentType(CONTENT_TYPE);
- httpResponse.setContent(jwt.serialize());
+ httpResponse.setEntityContentType(getHttpResponseContentType());
+ httpResponse.setContent(getJWT().serialize());
return httpResponse;
}
/**
- * Parses a federation resolve entity success response from the given HTTP response.
- *
- * @param httpResponse the HTTP response
- * @return resolve entity success response
- * @throws ParseException if HTTP response could not be parsed into resolve entity response
+ * Get the content type of the response.
+ *
+ * @return content type
*/
- @Nonnull
- public static ResolveEntityResponse parse(@Nonnull final HTTPResponse httpResponse)
- throws ParseException {
-
- httpResponse.ensureStatusCode(HTTPResponse.SC_OK);
- httpResponse.ensureEntityContentType(CONTENT_TYPE);
- final String content = httpResponse.getContent();
-
- if (StringSupport.trimOrNull(content) == null) {
- throw new ParseException("Message body is empty");
- }
+ @Nonnull protected abstract ContentType getHttpResponseContentType();
- try {
- final SignedJWT jwt = SignedJWT.parse(httpResponse.getContent());
- assert jwt != null;
- return new ResolveEntityResponse(jwt);
- } catch (final java.text.ParseException e) {
- throw new ParseException(e.getMessage(), e);
- }
- }
-}
\ No newline at end of file
+ /**
+ * Get the JWT type header.
+ *
+ * @return JWT type header
+ */
+ @Nonnull protected abstract JOSEObjectType getJWTTypeHeader();
+}
diff --git a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java
index 827e6d5..6909e59 100644
--- a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java
+++ b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ExplicitClientRegistrationResponse.java
@@ -16,22 +16,27 @@ package net.shibboleth.idp.plugin.oidc.op.oidfed.messaging.impl;
import javax.annotation.Nonnull;
+import com.nimbusds.common.contenttype.ContentType;
+import com.nimbusds.jose.JOSEObjectType;
import com.nimbusds.jwt.SignedJWT;
import com.nimbusds.oauth2.sdk.ParseException;
-import com.nimbusds.oauth2.sdk.Response;
import com.nimbusds.oauth2.sdk.http.HTTPResponse;
-import com.nimbusds.openid.connect.sdk.federation.entities.EntityStatement;
-import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.logic.ConstraintViolationException;
import net.shibboleth.shared.primitive.StringSupport;
/**
* Response message to the OpenID federation explicit registration endpoint.
*/
-public class ExplicitClientRegistrationResponse implements Response {
+public class ExplicitClientRegistrationResponse extends AbstractSignedJWTResponse {
- /** The entity statement included in the response. */
- @Nonnull private final EntityStatement entityStatement;
+ /** The JWT type header. */
+ @Nonnull
+ public static final JOSEObjectType JWT_TYPE_HEADER = new JOSEObjectType("explicit-registration-response+jwt");
+
+ /** The content type. */
+ @Nonnull public static final ContentType HTTP_RESPONSE_CONTENT_TYPE =
+ new ContentType("application", JWT_TYPE_HEADER.toString());
/**
*
@@ -39,32 +44,18 @@ public class ExplicitClientRegistrationResponse implements Response {
*
* @param statement entity statement
*/
- public ExplicitClientRegistrationResponse(@Nonnull final EntityStatement statement) {
- entityStatement = Constraint.isNotNull(statement, "Entity statement cannot be null");
- }
-
- /**
- * Get the entity statement included in the response.
- *
- * @return entity statement
- */
- @Nonnull public EntityStatement getEntityStatement() {
- return entityStatement;
+ public ExplicitClientRegistrationResponse(@Nonnull final SignedJWT statement) {
+ super(statement);
}
/** {@inheritDoc} */
- @Override
- public boolean indicatesSuccess() {
- return true;
+ protected ContentType getHttpResponseContentType() {
+ return HTTP_RESPONSE_CONTENT_TYPE;
}
/** {@inheritDoc} */
- @Override
- public HTTPResponse toHTTPResponse() {
- final HTTPResponse httpResponse = new HTTPResponse(HTTPResponse.SC_OK);
- httpResponse.setEntityContentType(EntityStatement.CONTENT_TYPE);
- httpResponse.setContent(entityStatement.getSignedStatement().serialize());
- return httpResponse;
+ protected JOSEObjectType getJWTTypeHeader() {
+ return JWT_TYPE_HEADER;
}
/**
@@ -79,7 +70,7 @@ public class ExplicitClientRegistrationResponse implements Response {
throws ParseException {
httpResponse.ensureStatusCode(HTTPResponse.SC_OK);
- httpResponse.ensureEntityContentType(EntityStatement.CONTENT_TYPE);
+ httpResponse.ensureEntityContentType(HTTP_RESPONSE_CONTENT_TYPE);
final String content = httpResponse.getContent();
if (StringSupport.trimOrNull(content) == null) {
@@ -87,10 +78,9 @@ public class ExplicitClientRegistrationResponse implements Response {
}
try {
- final EntityStatement entityStatement = EntityStatement.parse(SignedJWT.parse(httpResponse.getContent()));
- assert entityStatement != null;
- return new ExplicitClientRegistrationResponse(entityStatement);
- } catch (final java.text.ParseException e) {
+ final SignedJWT jwt = SignedJWT.parse(httpResponse.getContent());
+ return new ExplicitClientRegistrationResponse(jwt);
+ } catch (final java.text.ParseException | ConstraintViolationException e) {
throw new ParseException(e.getMessage(), e);
}
}
diff --git a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ResolveEntityResponse.java b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ResolveEntityResponse.java
index 7372859..483d4e4 100644
--- a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ResolveEntityResponse.java
+++ b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/messaging/impl/ResolveEntityResponse.java
@@ -17,24 +17,26 @@ package net.shibboleth.idp.plugin.oidc.op.oidfed.messaging.impl;
import javax.annotation.Nonnull;
import com.nimbusds.common.contenttype.ContentType;
+import com.nimbusds.jose.JOSEObjectType;
import com.nimbusds.jwt.SignedJWT;
import com.nimbusds.oauth2.sdk.ParseException;
-import com.nimbusds.oauth2.sdk.Response;
import com.nimbusds.oauth2.sdk.http.HTTPResponse;
-import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.logic.ConstraintViolationException;
import net.shibboleth.shared.primitive.StringSupport;
/**
* Response message to the OpenID federation resolve entity endpoint.
*/
-public class ResolveEntityResponse implements Response {
+public class ResolveEntityResponse extends AbstractSignedJWTResponse {
- /** The content type. */
- @Nonnull public static final ContentType CONTENT_TYPE = new ContentType("application", "resolve-response+jwt");
+ /** The JWT type header. */
+ @Nonnull
+ public static final JOSEObjectType JWT_TYPE_HEADER = new JOSEObjectType("resolve-response+jwt");
- /** The JWT included in the response. */
- @Nonnull private final SignedJWT jwt;
+ /** The content type. */
+ @Nonnull public static final ContentType HTTP_RESPONSE_CONTENT_TYPE =
+ new ContentType("application", JWT_TYPE_HEADER.toString());
/**
* Constructor.
@@ -42,31 +44,17 @@ public class ResolveEntityResponse implements Response {
* @param statement JWT
*/
public ResolveEntityResponse(@Nonnull final SignedJWT statement) {
- jwt = Constraint.isNotNull(statement, "Entity statement cannot be null");
- }
-
- /**
- * Get the JWT included in the response.
- *
- * @return JWT
- */
- @Nonnull public SignedJWT getJWT() {
- return jwt;
+ super(statement);
}
/** {@inheritDoc} */
- @Override
- public boolean indicatesSuccess() {
- return true;
+ protected ContentType getHttpResponseContentType() {
+ return HTTP_RESPONSE_CONTENT_TYPE;
}
/** {@inheritDoc} */
- @Override
- public HTTPResponse toHTTPResponse() {
- final HTTPResponse httpResponse = new HTTPResponse(HTTPResponse.SC_OK);
- httpResponse.setEntityContentType(CONTENT_TYPE);
- httpResponse.setContent(jwt.serialize());
- return httpResponse;
+ protected JOSEObjectType getJWTTypeHeader() {
+ return JWT_TYPE_HEADER;
}
/**
@@ -81,7 +69,7 @@ public class ResolveEntityResponse implements Response {
throws ParseException {
httpResponse.ensureStatusCode(HTTPResponse.SC_OK);
- httpResponse.ensureEntityContentType(CONTENT_TYPE);
+ httpResponse.ensureEntityContentType(HTTP_RESPONSE_CONTENT_TYPE);
final String content = httpResponse.getContent();
if (StringSupport.trimOrNull(content) == null) {
@@ -92,7 +80,7 @@ public class ResolveEntityResponse implements Response {
final SignedJWT jwt = SignedJWT.parse(httpResponse.getContent());
assert jwt != null;
return new ResolveEntityResponse(jwt);
- } catch (final java.text.ParseException e) {
+ } catch (final java.text.ParseException | ConstraintViolationException e) {
throw new ParseException(e.getMessage(), e);
}
}
diff --git a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/metadata/DefaultResolveEntityTrustChainFetchingStrategy.java b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/metadata/DefaultResolveEntityTrustChainFetchingStrategy.java
index 03bfa2d..9cb323c 100644
--- a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/metadata/DefaultResolveEntityTrustChainFetchingStrategy.java
+++ b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/metadata/DefaultResolveEntityTrustChainFetchingStrategy.java
@@ -33,9 +33,8 @@ import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpHeaders;
-import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.NameValuePair;
-import org.apache.hc.core5.http.ParseException;
+import org.apache.hc.core5.http.ProtocolException;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.http.message.BasicNameValuePair;
import org.apache.hc.core5.net.URIBuilder;
@@ -44,7 +43,8 @@ import org.opensaml.security.httpclient.HttpClientSecuritySupport;
import org.slf4j.Logger;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.nimbusds.jwt.SignedJWT;
+import com.nimbusds.oauth2.sdk.ParseException;
+import com.nimbusds.oauth2.sdk.http.HTTPResponse;
import net.shibboleth.idp.plugin.oidc.op.oidfed.messaging.impl.ResolveEntityRequest;
import net.shibboleth.idp.plugin.oidc.op.oidfed.messaging.impl.ResolveEntityResponse;
@@ -181,18 +181,19 @@ public class DefaultResolveEntityTrustChainFetchingStrategy extends AbstractIden
final String scheme = httpRequest.getUri().getScheme();
assert scheme != null;
HttpClientSecuritySupport.checkTLSCredentialEvaluated(httpContext, scheme);
- if (response != null && response.getCode() == HttpStatus.SC_OK) {
- final SignedJWT responseJwt = SignedJWT.parse(EntityUtils.toString(response.getEntity()));
- final ResolveEntityResponse resolveResponse = new ResolveEntityResponse(responseJwt);
+ if (response != null) {
+ final HTTPResponse nimbusResponse = new HTTPResponse(response.getCode());
+ nimbusResponse.setContent(EntityUtils.toString(response.getEntity()));
+ nimbusResponse.setContentType(response.getEntity().getContentType());
+ final ResolveEntityResponse resolveResponse = ResolveEntityResponse.parse(nimbusResponse);
final Instant expirationTime = expirationCriterion.getExpirationInstant();
return new ResolveEntityResponseContainer(resolveResponse, resolveRequest, expirationTime);
} else {
- log.debug("Unable to fetch resolve entity response from URI: {} (HTTP status {})", uri,
- response == null ? null : response.getCode());
+ log.debug("Unable to fetch resolve entity response from URI: {} (null response)", uri);
//TODO: cache non-success results?
return null;
}
- } catch (final ParseException | URISyntaxException | IOException | java.text.ParseException e) {
+ } catch (final ProtocolException | URISyntaxException | IOException | ParseException e) {
log.debug("Unable to fetch resolve entity response from URI: {}", uri, e);
}
diff --git a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/profile/impl/FormExplicitRegistrationResponse.java b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/profile/impl/FormExplicitRegistrationResponse.java
index 35b4130..d8c5c77 100644
--- a/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/profile/impl/FormExplicitRegistrationResponse.java
+++ b/idp-oidfed-op-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/oidfed/profile/impl/FormExplicitRegistrationResponse.java
@@ -109,7 +109,7 @@ public class FormExplicitRegistrationResponse extends AbstractProfileAction {
return;
}
assert entityStatement != null;
- final ExplicitClientRegistrationResponse response = new ExplicitClientRegistrationResponse(entityStatement);
+ final ExplicitClientRegistrationResponse response = new ExplicitClientRegistrationResponse(jwt);
log.debug("{} Response message set to the outbound message context", getLogPrefix());
profileRequestContext.ensureOutboundMessageContext().setMessage(response);
}
diff --git a/idp-oidfed-op-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidfed/register/register-beans.xml b/idp-oidfed-op-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidfed/register/register-beans.xml
index 831a06a..0d156df 100644
--- a/idp-oidfed-op-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidfed/register/register-beans.xml
+++ b/idp-oidfed-op-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidfed/register/register-beans.xml
@@ -373,7 +373,7 @@
<bean id="SignEntityStatementHandler"
class="net.shibboleth.oidc.security.impl.SignJWTHandler" scope="prototype" p:logName="Entity Statement"
p:securityParametersLookupStrategy-ref="EntityStatementSecurityParametersCreationViaMessageContextStrategy"
- p:typeHeader="entity-statement+jwt">
+ p:typeHeader="explicit-registration-response+jwt">
<property name="claimsToSignLookupStrategy">
<bean
class="net.shibboleth.idp.plugin.oidc.op.oidfed.profile.impl.JWTClaimsSetFromEntityStatementLookupFunction" />
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java
index 68b83a4..75555b4 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AbstractFederationFlowTest.java
@@ -77,6 +77,7 @@ import com.nimbusds.openid.connect.sdk.rp.OIDCClientMetadata;
import net.minidev.json.JSONObject;
import net.shibboleth.idp.plugin.oidc.op.oidfed.TrustChainTestUtil;
+import net.shibboleth.idp.plugin.oidc.op.oidfed.messaging.impl.ResolveEntityResponse;
import net.shibboleth.idp.plugin.oidc.op.profile.flow.AbstractOidcFlowTest;
import net.shibboleth.oidc.security.credential.BasicJWKCredential;
import net.shibboleth.shared.collection.CollectionSupport;
@@ -440,8 +441,8 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
.claim("metadata", metadata)
.claim("trust_marks", trustMarks)
.build();
- return TrustChainTestUtil.signedJwt(JWSAlgorithm.RS256, trustedAnchorKey, "application/resolve-response+jwt",
- claimsSet).serialize();
+ return TrustChainTestUtil.signedJwt(JWSAlgorithm.RS256, trustedAnchorKey,
+ ResolveEntityResponse.JWT_TYPE_HEADER.toString(), claimsSet).serialize();
}
protected String uniqueClientId() {
return String.format(clientIdPattern, clientIndex.getAndIncrement());
@@ -545,8 +546,9 @@ public class AbstractFederationFlowTest extends AbstractOidcFlowTest {
try {
mapResponse(entityConfigurationUrl(anchorId), mockResponse(trustedAnchorConfiguration()));
mapResponse(resolveEntityUrl(anchorResolveEndpoint, clientId, anchorId),
- mockResponse(rpResolveEntityResponse(clientId, Map.of("openid_relying_party",
- metadata.toJSONObject()), trustMarks)));
+ mockResponse(200, ResolveEntityResponse.HTTP_RESPONSE_CONTENT_TYPE.toString(),
+ rpResolveEntityResponse(clientId, Map.of("openid_relying_party",
+ metadata.toJSONObject()), trustMarks)));
} catch (UnsupportedOperationException | IOException e) {
Assert.fail("Could not initialize mock HTTP client", e);
}
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java
index cac0f41..711c1e0 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/RegistrationFlowTest.java
@@ -452,9 +452,11 @@ public class RegistrationFlowTest extends AbstractFederationFlowTest {
}
}
- protected OIDCClientInformation assertResponseStatement(final ExplicitClientRegistrationResponse response,
+ protected OIDCClientInformation assertResponseStatement(final ExplicitClientRegistrationResponse regResponse,
final String expectedClientId) throws IOException, ParseException, net.minidev.json.parser.ParseException {
- final EntityStatement entityStatement = response.getEntityStatement();
+ Assert.assertEquals(response.getHeader("Content-Type"),
+ ExplicitClientRegistrationResponse.HTTP_RESPONSE_CONTENT_TYPE.toString());
+ final EntityStatement entityStatement = EntityStatement.parse(regResponse.getJWT());
final EntityStatementClaimsSet statementClaims = entityStatement.getClaimsSet();
Assert.assertNotNull(statementClaims.getIssuer());
Assert.assertEquals(statementClaims.getIssuer().getValue(), issuer);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list