[java-plugin-shibd-oidc] branch main updated: JSHIBD-26 - Review incrementing of profile metric in various flows
Codeberg
noreply at shibboleth.net
Thu Oct 15 13:19:07 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-plugin-shibd-oidc.
View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd-oidc/commit/a5f22ad3d3b1b6e852b51584173ecc8fac42c95e
The following commit(s) were added to refs/heads/main by this push:
new a5f22ad JSHIBD-26 - Review incrementing of profile metric in various flows
a5f22ad is described below
commit a5f22ad3d3b1b6e852b51584173ecc8fac42c95e
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Thu Oct 15 09:18:54 2026 -0400
JSHIBD-26 - Review incrementing of profile metric in various flows
https://shibboleth.atlassian.net/browse/JSHIBD-26
Add profile/logging ID and counter handling to OIDC flows.
---
.../idp/flows/sp/consumer/oidc/oidc-beans.xml | 4 ++-
.../idp/flows/sp/consumer/oidc/oidc-flow.xml | 7 ++++-
.../idp/flows/sp/initiator/oidc/oidc-beans.xml | 5 +++-
.../idp/flows/sp/initiator/oidc/oidc-flow.xml | 28 ++++++++++++++-----
.../flows/sp/logout/consumer/oidc/oidc-beans.xml | 9 +++++--
.../flows/sp/logout/consumer/oidc/oidc-flow.xml | 6 +++++
.../flows/sp/logout/initiator/oidc/oidc-beans.xml | 7 +++--
.../flows/sp/logout/initiator/oidc/oidc-flow.xml | 24 ++++++++++++++---
.../shibboleth/idp/flows/sp/oidc-common-beans.xml | 2 +-
.../sp/oidc/flows/OIDCLogoutInitiatorFlowTest.java | 15 +++++++----
.../oidc/flows/OIDCSessionInitiatorFlowTest.java | 10 ++++---
.../sp/oidc/flows/OIDCTokenConsumerFlowTest.java | 31 +++++++++++-----------
...DCTokenConsumerFlowUsingStorageServiceTest.java | 2 +-
13 files changed, 105 insertions(+), 45 deletions(-)
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-beans.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-beans.xml
index 951fdf0..9d78e86 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-beans.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-beans.xml
@@ -8,11 +8,13 @@
default-init-method="initialize" default-destroy-method="destroy">
- <util:constant id="shibboleth.sp.oidc.ProfileId"
+ <util:constant id="shibboleth.sp.oidc.profileId"
static-field="net.shibboleth.oidc.profile.config.OIDCSSOProfileConfiguration.PROFILE_ID" />
<bean id="shibboleth.sp.loggingId" class="java.lang.String" c:_0="%{sp.oidc.service.logging.token-consumer:TokenConsumer.OIDC}" />
+ <!-- The constant in the implementation class is IdP-specific. -->
+ <bean id="shibboleth.metrics.ProfileCounter" class="java.lang.String" c:_0="net.shibboleth.sp.profiles.oidc.authorize" />
<import resource="classpath:/META-INF/net/shibboleth/idp/flows/sp/oidc-common-beans.xml" />
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-flow.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-flow.xml
index 274e28f..e128c24 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-flow.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/oidc/oidc-flow.xml
@@ -4,7 +4,12 @@
abstract="true" parent="sp/consumer">
<action-state id="DoProfileWork">
-<!-- <evaluate expression="PopulateMetricContext" />-->
+ <on-entry>
+ <evaluate expression="opensamlProfileRequestContext.setProfileId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.oidc.profileId'))" />
+ <evaluate expression="opensamlProfileRequestContext.setLoggingId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.loggingId'))" />
+ <evaluate expression="T(org.opensaml.core.metrics.MetricsSupport).getMetricRegistry()?.counter(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.metrics.ProfileCounter')).inc()" />
+ </on-entry>
+
<evaluate expression="DecodeMessage" />
<evaluate expression="RecoverStateData" /> <!-- also performs state correlation checking for CSRF protection -->
<evaluate expression="ValidateAuthenticationResponseResult" />
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-beans.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-beans.xml
index 1a2f90e..63eab34 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-beans.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-beans.xml
@@ -11,11 +11,14 @@
<!-- TODO Check we need the thread-local variants of these in the chains we are using them ^^ -->
- <util:constant id="shibboleth.sp.oidc.ProfileId"
+ <util:constant id="shibboleth.sp.oidc.profileId"
static-field="net.shibboleth.oidc.profile.config.OIDCSSOProfileConfiguration.PROFILE_ID" />
<bean id="shibboleth.sp.loggingId" class="java.lang.String" c:_0="%{sp.oidc.service.logging.session-initiator:SessionInitiator.OIDC}" />
+ <!-- The constant in the implementation class is IdP-specific. -->
+ <bean id="shibboleth.metrics.ProfileCounter" class="java.lang.String" c:_0="net.shibboleth.sp.profiles.oidc.authorize" />
+
<bean id="ValidateSessionInitiatorRequest"
class="net.shibboleth.sp.profile.impl.ValidateSessionInitiatorRequest"
scope="prototype"
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-flow.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-flow.xml
index 0c9f8e0..aa77c65 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-flow.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/oidc/oidc-flow.xml
@@ -3,7 +3,14 @@
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
parent="sp/initiator">
- <action-state id="OIDCSessionInitiator">
+ <!-- Stage 1 is "conditional" as it may detect an inability to run, stage 2 is committed. -->
+
+ <action-state id="OIDCSessionInitiatorStage1">
+ <on-entry>
+ <evaluate expression="opensamlProfileRequestContext.setProfileId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.oidc.profileId'))" />
+ <evaluate expression="opensamlProfileRequestContext.setLoggingId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.loggingId'))" />
+ </on-entry>
+
<evaluate expression="ValidateSessionInitiatorRequest" />
<evaluate expression="PrepareInboundMessageContext" />
<evaluate expression="ProviderMetadataLookup" />
@@ -12,16 +19,27 @@
<evaluate expression="SelectRelyingPartyConfiguration" />
<evaluate expression="SelectProfileConfiguration" />
+ <evaluate expression="'proceed'" />
+
+ <transition on="proceed" to="OIDCSessionInitiatorStage2" />
+ <!-- Remap any other events into a fall-through to the next flow. -->
+ <transition to="ReselectFlow" />
+ </action-state>
+
+ <action-state id="OIDCSessionInitiatorStage2">
+ <on-entry>
+ <evaluate expression="T(org.opensaml.core.metrics.MetricsSupport).getMetricRegistry()?.counter(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.metrics.ProfileCounter')).inc()" />
+ </on-entry>
+
<evaluate expression="InitializeOutboundMessageContext" />
<evaluate expression="InitializeOAuth2ClientContext" />
<evaluate expression="InitializeAuthorizationRequest" />
<evaluate expression="BuildAuthenticationRequest"/>
+
<evaluate expression="'proceed'" />
<transition on="proceed" to="RequestObjectRequiredAndSupported" />
- <!-- Remap any other events into a fall-through to the next flow. -->
- <transition to="ReselectFlow" />
</action-state>
<!-- Is a request object required by the configuration, and does the OP support it? -->
@@ -41,8 +59,6 @@
-->
<evaluate expression="'proceed'" />
<transition on="proceed" to="BuildOutboundMessage" />
- <!-- Remap any other events into a fall-through to the next flow. -->
- <transition to="ReselectFlow" />
</action-state>
<action-state id="BuildOutboundMessage">
@@ -56,8 +72,6 @@
<evaluate expression="'proceed'" />
<transition on="proceed" to="proceed" />
- <!-- Remap any other events into a fall-through to the next flow. -->
- <transition to="ReselectFlow" />
</action-state>
<!-- The file really exists in this directory, but it's referenced from extending flow-directories -->
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-beans.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-beans.xml
index ec428c1..6b66ab5 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-beans.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-beans.xml
@@ -7,8 +7,13 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
default-init-method="initialize" default-destroy-method="destroy">
- <util:constant id="shibboleth.sp.oidc.ProfileId"
- static-field="net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration.PROFILE_ID" />
+ <util:constant id="shibboleth.sp.oidc.profileId"
+ static-field="net.shibboleth.oidc.profile.config.OIDCLogoutProfileConfiguration.PROFILE_ID" />
+
+ <bean id="shibboleth.sp.loggingId" class="java.lang.String" c:_0="%{sp.oidc.service.logging.logout-initiator:Logout-Initiator.OIDC}" />
+
+ <!-- The constant in the implementation class is IdP-specific. -->
+ <bean id="shibboleth.metrics.ProfileCounter" class="java.lang.String" c:_0="net.shibboleth.sp.profiles.oidc.logout" />
<util:constant id="shibboleth.EndpointType"
static-field="org.opensaml.saml.saml2.metadata.SingleLogoutService.DEFAULT_ELEMENT_NAME" />
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-flow.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-flow.xml
index 24dfc46..b4255db 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-flow.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/consumer/oidc/oidc-flow.xml
@@ -4,6 +4,12 @@
abstract="true" parent="sp/logout/consumer">
<decision-state id="CheckForToken">
+ <on-entry>
+ <evaluate expression="opensamlProfileRequestContext.setProfileId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.oidc.profileId'))" />
+ <evaluate expression="opensamlProfileRequestContext.setLoggingId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.loggingId'))" />
+ <evaluate expression="T(org.opensaml.core.metrics.MetricsSupport).getMetricRegistry()?.counter(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.metrics.ProfileCounter')).inc()" />
+ </on-entry>
+
<if test="opensamlProfileRequestContext.ensureSubcontext(T(net.shibboleth.sp.context.AgentRequestContext)).getInput().getmember('http').isstruct()"
then="DoMessage"
else="IssueResponse" />
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-beans.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-beans.xml
index 062b0f9..5f8942a 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-beans.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-beans.xml
@@ -7,10 +7,13 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
default-init-method="initialize" default-destroy-method="destroy">
- <util:constant id="shibboleth.sp.oidc.ProfileId"
+ <util:constant id="shibboleth.sp.oidc.profileId"
static-field="net.shibboleth.oidc.profile.config.OIDCLogoutProfileConfiguration.PROFILE_ID" />
- <bean id="shibboleth.sp.loggingId" class="java.lang.String" c:_0="%{sp.oidc.service.logging.token-consumer:LogoutInitiator.OIDC}" />
+ <bean id="shibboleth.sp.loggingId" class="java.lang.String" c:_0="%{sp.oidc.service.logging.logout-initiator:Logout-Initiator.OIDC}" />
+
+ <!-- The constant in the implementation class is IdP-specific. -->
+ <bean id="shibboleth.metrics.ProfileCounter" class="java.lang.String" c:_0="net.shibboleth.sp.profiles.oidc.logout" />
<import resource="classpath:/META-INF/net/shibboleth/idp/flows/sp/oidc-common-beans.xml" />
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-flow.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-flow.xml
index ec27146..1a1053f 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-flow.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/logout/initiator/oidc/oidc-flow.xml
@@ -3,7 +3,14 @@
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
parent="sp/logout/initiator">
- <action-state id="OIDCLogoutInitiator">
+ <!-- Stage 1 is "conditional" as it may detect an inability to run, stage 2 is committed. -->
+
+ <action-state id="OIDCLogoutInitiatorStage1">
+ <on-entry>
+ <evaluate expression="opensamlProfileRequestContext.setProfileId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.oidc.profileId'))" />
+ <evaluate expression="opensamlProfileRequestContext.setLoggingId(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.sp.loggingId'))" />
+ </on-entry>
+
<evaluate expression="ProcessLogoutInitiatorRequest" />
<evaluate expression="PrepareInboundMessageContext" />
<evaluate expression="ProviderMetadataLookup" />
@@ -11,7 +18,17 @@
<evaluate expression="InitializeRelyingPartyContextFromOIDCPeer" /> <!-- Seems a bit redundant in logout as ProcessLogoutInitiatorRequest has already created it, although not quite in the right state -->
<evaluate expression="SelectRelyingPartyConfiguration" />
<evaluate expression="SelectProfileConfiguration" />
-
+ <evaluate expression="'proceed'" />
+
+ <transition on="proceed" to="OIDCLogoutInitiatorStage2" />
+ <!-- Remap any other events into a fall-through to the next flow. -->
+ <transition to="ReselectFlow" />
+ </action-state>
+
+ <action-state id="OIDCLogoutInitiatorStage2">
+ <on-entry>
+ <evaluate expression="T(org.opensaml.core.metrics.MetricsSupport).getMetricRegistry()?.counter(flowRequestContext.getActiveFlow().getApplicationContext().getBean('shibboleth.metrics.ProfileCounter')).inc()" />
+ </on-entry>
<evaluate expression="InitializeOutboundMessageContext" />
<evaluate expression="InitializeLogoutRequest" />
@@ -19,11 +36,10 @@
<evaluate expression="BuildLogoutRequest" />
<evaluate expression="HandleOutboundMessage" />
<evaluate expression="EncodeMessage" />
+
<evaluate expression="'proceed'" />
<transition on="proceed" to="proceed" />
- <!-- Remap any other events into a fall-through to the next flow. -->
- <transition to="ReselectFlow" />
</action-state>
<!-- The file really exists in this directory, but it's referenced from extending flow-directories -->
diff --git a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/oidc-common-beans.xml b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/oidc-common-beans.xml
index c609f4f..399fc7f 100644
--- a/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/oidc-common-beans.xml
+++ b/sp-oidc-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/oidc-common-beans.xml
@@ -251,7 +251,7 @@
<bean id="SelectProfileConfiguration"
class="net.shibboleth.idp.profile.impl.SelectProfileConfiguration" scope="prototype"
- p:profileId-ref="shibboleth.sp.oidc.ProfileId" />
+ p:profileId-ref="shibboleth.sp.oidc.profileId" />
<!--
We do not add self-context to the outbound message here, we construct an OAuth2ClientContext to store that and
diff --git a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCLogoutInitiatorFlowTest.java b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCLogoutInitiatorFlowTest.java
index 7f3b9db..d30454f 100644
--- a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCLogoutInitiatorFlowTest.java
+++ b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCLogoutInitiatorFlowTest.java
@@ -77,6 +77,9 @@ import net.shibboleth.sp.profile.SPConstants;
inheritInitializers = false
)
@WebAppConfiguration
+/**
+ * Unit tests for OIDC logout initiator flow.
+ */
public class OIDCLogoutInitiatorFlowTest extends AbstractSPFlowTest {
/** Flow ID. */
@@ -162,7 +165,11 @@ public class OIDCLogoutInitiatorFlowTest extends AbstractSPFlowTest {
System.out.println("test output: " + output.toString());
}
- /* Test with a Target input, which should form the post_logout_redirect_uri.*/
+ /**
+ * Test with a Target input, which should form the post_logout_redirect_uri.
+ *
+ * @throws Exception
+ */
@Test
public void testRPInitiated_WithTarget() throws Exception {
setDefaultAuth();
@@ -210,12 +217,10 @@ public class OIDCLogoutInitiatorFlowTest extends AbstractSPFlowTest {
/**
* Mock OpenID Provider configuration (metadata) endpoint.
*
- * @param tokenResponse the token response
- * @param userInfoResponse the user info response
+ * @param metadata the OP metadata
*
- * @throws IOException on error.
+ * @throws IOException on error
*/
- @SuppressWarnings("unchecked")
private void mockProviderMetadataEndpoint(final OIDCProviderMetadata metadata) throws IOException {
Mockito.when(httpClient.execute(
diff --git a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCSessionInitiatorFlowTest.java b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCSessionInitiatorFlowTest.java
index 6d2f2ca..5cac87e 100644
--- a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCSessionInitiatorFlowTest.java
+++ b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCSessionInitiatorFlowTest.java
@@ -79,7 +79,10 @@ import net.shibboleth.sp.profile.SPConstants;
inheritInitializers = false
)
@WebAppConfiguration
- at SuppressWarnings({ "unchecked", "null" })
+ at SuppressWarnings({ "null" })
+/**
+ * Unit tests for OIDC session initiator flow.
+ */
public class OIDCSessionInitiatorFlowTest extends AbstractSPFlowTest {
/** Flow ID. */
@@ -131,10 +134,9 @@ public class OIDCSessionInitiatorFlowTest extends AbstractSPFlowTest {
/**
* Mock OpenID Provider configuration (metadata) endpoint.
*
- * @param tokenResponse the token response
- * @param userInfoResponse the user info response
+ * @param metadata the OP metadata
*
- * @throws IOException on error.
+ * @throws IOException on error
*/
private void mockProviderMetadataEndpoint(final OIDCProviderMetadata metadata) throws IOException {
diff --git a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowTest.java b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowTest.java
index d6bb66f..eb7a858 100644
--- a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowTest.java
+++ b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowTest.java
@@ -14,7 +14,6 @@
package net.shibboleth.sp.oidc.flows;
-import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
import java.util.Date;
@@ -56,7 +55,7 @@ import net.shibboleth.sp.oidc.testing.TestHelper;
inheritInitializers = false
)
@WebAppConfiguration
- at SuppressWarnings({ "unchecked", "rawtypes", "null" })
+ at SuppressWarnings({ "null" })
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest {
@@ -82,7 +81,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test successful flow with a signed id_token and a plain user info response.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_SignedIDToken_PlainUserInfo() throws Exception {
@@ -117,7 +116,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test successful flow with response_mode=form_post, a signed id_token, and a plain user info response.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_Post_SignedIDToken_PlainUserInfo() throws Exception {
@@ -153,7 +152,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
* Test successful flow with a signed id_token and a plain user info response. Use private_key_jwt client
* authentication.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_SignedIDToken_PlainUserInfo_PrivateKeyJWT() throws Exception {
@@ -188,7 +187,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test successful flow with a signed id_token and a plain user info response with max_age set.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_SignedIDToken_PlainUserInfo_WithMaxAge() throws Exception {
@@ -222,7 +221,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test a failure when max_age was sent in the authentication request but auth_time is missing in the id_token.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testFail_SignedIDToken_PlainUserInfo_WithMaxAge_ButNoAuthTime() throws Exception {
@@ -255,7 +254,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test successful flow with a signed and encrypted id_token and a plain user info response.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_SignedEncryptedIDToken_PlainUserInfo() throws Exception {
@@ -289,7 +288,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test successful flow with a signed id_token and a JWT user info response.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_SignedIDToken_JWTUserInfo() throws Exception {
@@ -324,7 +323,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
* Test failure flow with a signed id_token and a JWT user info response. The id_token contains ACR values which
* do not match those in the request, and ACR checking is enabled. Request 'loa1' get back 'loa2' in the id_token.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testFail_SignedIDTokenWithACR_JWTUserInfo() throws Exception {
@@ -362,7 +361,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
*
* <p>Also test it appears in the set of outbound attributes.</p>
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_SignedIDTokenWithACR_JWTUserInfo() throws Exception {
@@ -397,7 +396,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test successful flow, where id_token contains an AZP claim.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testSuccess_SignedIDTokenWithAZP_JWTUserInfo() throws Exception {
@@ -431,7 +430,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test a failure if the id_token contains the wrong AZP value (not the client_id).
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testFail_IDToken_AZPMistmatch() throws Exception {
@@ -561,7 +560,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
* Test failure, the OAuth 2.0 state value does match to a state cookie which provides CSRF protection alongside
* the authentication state.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testFail_StateValueMisMatch() throws Exception {
@@ -590,7 +589,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
/**
* Test error response from the OP.
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testFail_ErrorResponse() throws Exception {
@@ -619,7 +618,7 @@ public class OIDCTokenConsumerFlowTest extends AbstractOIDCTokenConsumerFlowTest
* forged success response, it will not be allowed by the SP even if it matches to the one in stored state
* (a cookie for example).
*
- * @throws IOException on error
+ * @throws Exception on error
*/
@Test
public void testFail_ErrorResponse_FollowedByReplayedSuccess() throws Exception {
diff --git a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowUsingStorageServiceTest.java b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowUsingStorageServiceTest.java
index a3a5fd6..12ffcec 100644
--- a/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowUsingStorageServiceTest.java
+++ b/sp-oidc-conf-impl/src/test/java/net/shibboleth/sp/oidc/flows/OIDCTokenConsumerFlowUsingStorageServiceTest.java
@@ -68,7 +68,7 @@ import net.shibboleth.sp.state.impl.StorageServiceStateManager;
inheritInitializers = false
)
@WebAppConfiguration
- at SuppressWarnings({ "unchecked", "rawtypes", "null" })
+ at SuppressWarnings({ "null" })
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
public class OIDCTokenConsumerFlowUsingStorageServiceTest extends AbstractOIDCTokenConsumerFlowTest {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list