[java-idp-oidc] branch main updated: Adjust failing tests.

Scott Cantor cantor.2 at osu.edu
Mon Feb 14 20:45:14 UTC 2022


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-idp-oidc.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=ad0d7855db0caa0a8d04e3d17d2a41b95218fdfd

The following commit(s) were added to refs/heads/main by this push:
     new ad0d7855 Adjust failing tests.
ad0d7855 is described below

commit ad0d7855db0caa0a8d04e3d17d2a41b95218fdfd
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Feb 14 15:45:12 2022 -0500

    Adjust failing tests.
---
 .../idp/plugin/oidc/op/profile/flow/IntrospectionFlowTest.java    | 2 +-
 .../idp/plugin/oidc/op/profile/flow/RevocationFlowTest.java       | 2 +-
 .../shibboleth/idp/plugin/oidc/op/profile/flow/TokenFlowTest.java | 2 +-
 .../idp/plugin/oidc/op/profile/impl/ValidateRedirectURITest.java  | 8 +++-----
 idp-oidc-extension-impl/src/test/resources/conf/relying-party.xml | 4 +++-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/IntrospectionFlowTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/IntrospectionFlowTest.java
index 43b78d28..96425b4e 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/IntrospectionFlowTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/IntrospectionFlowTest.java
@@ -93,7 +93,7 @@ public class IntrospectionFlowTest extends AbstractOidcClientAuthenticationFlowT
         setHttpFormRequest("POST", Collections.singletonMap("token",
                 buildToken(clientId, "sub", Scope.parse("openid")).toJSONObject().getAsString("access_token")));
         final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
-        assertErrorCode(result, OAuth2Error.UNAUTHORIZED_CLIENT_CODE);
+        assertErrorCode(result, OAuth2Error.INVALID_CLIENT_CODE);
     }
     
     @Test
diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RevocationFlowTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RevocationFlowTest.java
index a8326f85..b52bb476 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RevocationFlowTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/RevocationFlowTest.java
@@ -90,7 +90,7 @@ public class RevocationFlowTest extends AbstractOidcClientAuthenticationFlowTest
         setHttpFormRequest("POST", Collections.singletonMap("token", super.buildToken(clientId, "sub", 
                 Scope.parse("openid")).toJSONObject().getAsString("access_token")));
         final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
-        assertErrorCode(result, OAuth2Error.UNAUTHORIZED_CLIENT_CODE);
+        assertErrorCode(result, OAuth2Error.INVALID_CLIENT_CODE);
     }
 
     @Test
diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/TokenFlowTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/TokenFlowTest.java
index 812a4f3d..04f9be26 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/TokenFlowTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/TokenFlowTest.java
@@ -108,7 +108,7 @@ public class TokenFlowTest extends AbstractOidcClientAuthenticationFlowTest {
     public void testUntrustedClient() throws IOException, ParseException {
         setHttpFormRequest("POST", createRequestParameters(null, "authorization_code", "mockCode", clientId + "2"));
         final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
-        assertErrorCode(result, OAuth2Error.UNAUTHORIZED_CLIENT_CODE);
+        assertErrorCode(result, OAuth2Error.INVALID_CLIENT_CODE);
     }
     
     @Test
diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateRedirectURITest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateRedirectURITest.java
index 540e32eb..6815da20 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateRedirectURITest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateRedirectURITest.java
@@ -21,12 +21,10 @@ import java.net.URI;
 import java.net.URISyntaxException;
 
 import net.shibboleth.idp.plugin.oidc.op.messaging.context.OIDCMetadataContext;
-import net.shibboleth.idp.plugin.oidc.op.profile.OidcEventIds;
-import net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidateRedirectURI;
 import net.shibboleth.idp.profile.testing.ActionTestingSupport;
+import net.shibboleth.oidc.profile.core.OidcEventIds;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 
-import org.opensaml.profile.action.EventIds;
 import org.springframework.webflow.execution.Event;
 import org.testng.Assert;
 import org.testng.annotations.Test;
@@ -45,7 +43,7 @@ public class ValidateRedirectURITest extends BaseOIDCResponseActionTest {
     }
 
     /**
-     * Test that action copes with no oidc metadata contextcontext.
+     * Test that action copes with no OIDC metadata context.
      * 
      * @throws ComponentInitializationException
      */
@@ -54,7 +52,7 @@ public class ValidateRedirectURITest extends BaseOIDCResponseActionTest {
         init();
         profileRequestCtx.getInboundMessageContext().removeSubcontext(OIDCMetadataContext.class);
         final Event event = action.execute(requestCtx);
-        ActionTestingSupport.assertEvent(event, EventIds.INVALID_MSG_CTX);
+        ActionTestingSupport.assertEvent(event, OidcEventIds.INVALID_REDIRECT_URI);
     }
 
     /**
diff --git a/idp-oidc-extension-impl/src/test/resources/conf/relying-party.xml b/idp-oidc-extension-impl/src/test/resources/conf/relying-party.xml
index 35a78db0..8c4942c8 100644
--- a/idp-oidc-extension-impl/src/test/resources/conf/relying-party.xml
+++ b/idp-oidc-extension-impl/src/test/resources/conf/relying-party.xml
@@ -28,6 +28,8 @@
                 <ref bean="OIDC.Configuration" />
                 <ref bean="OIDC.Token" />
                 <ref bean="OAUTH2.TokenAudience" /> 
+                <ref bean="OAUTH2.Introspection" />
+                <ref bean="OAUTH2.Revocation" />
             </list>
         </property>
     </bean>
@@ -49,8 +51,8 @@
                 <ref bean="OIDC.Token.MDDriven" />
                 <ref bean="OIDC.UserInfo.MDDriven" />
                 <ref bean="OIDC.Registration.MDDriven" />
-                <ref bean="OAUTH2.Revocation.MDDriven" />
                 <ref bean="OAUTH2.Introspection.MDDriven" />
+                <ref bean="OAUTH2.Revocation.MDDriven" />
             </list>
         </property>
     </bean>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list