[java-plugin-shibd] branch main updated: Add agent authn tests.
Scott Cantor
cantor.2 at osu.edu
Tue Jul 2 23:53:11 UTC 2024
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-plugin-shibd.
View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd.git;a=commit;h=44a837d1b55a789710dd0b54d50102a6ceba4a86
The following commit(s) were added to refs/heads/main by this push:
new 44a837d Add agent authn tests.
44a837d is described below
commit 44a837d1b55a789710dd0b54d50102a6ceba4a86
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 2 19:53:05 2024 -0400
Add agent authn tests.
---
.../java/net/shibboleth/sp/flows/PingFlowTest.java | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/PingFlowTest.java b/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/PingFlowTest.java
index bb654bf..a06314d 100644
--- a/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/PingFlowTest.java
+++ b/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/PingFlowTest.java
@@ -49,6 +49,34 @@ public class PingFlowTest extends AbstractSPFlowTest {
assertOutputMessageEvent(result, AuthnEventIds.NO_CREDENTIALS);
}
+ /**
+ * Test flow with invalid agent ID.
+ *
+ * @throws IOException
+ */
+ @Test
+ public void testInvalidAgent() throws IOException {
+ setBasicAuth("foo", "foo");
+ final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
+ assertFlowExecutionResult(result, FLOW_ID);
+ assertFlowExecutionOutcome(result.getOutcome());
+ assertOutputMessageEvent(result, AuthnEventIds.UNKNOWN_USERNAME);
+ }
+
+ /**
+ * Test flow with invalid agent secret.
+ *
+ * @throws IOException
+ */
+ @Test
+ public void testInvalidSecret() throws IOException {
+ setBasicAuth("testsp.example.org", "bar");
+ final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
+ assertFlowExecutionResult(result, FLOW_ID);
+ assertFlowExecutionOutcome(result.getOutcome());
+ assertOutputMessageEvent(result, AuthnEventIds.INVALID_CREDENTIALS);
+ }
+
/**
* Test flow success.
*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list