[java-idp-plugin-totp] branch main updated: Update dependency versions and tests for new release.

Scott Cantor cantor.2 at osu.edu
Mon Feb 28 20:31:13 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-plugin-totp.

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

The following commit(s) were added to refs/heads/main by this push:
     new ef16ef8  Update dependency versions and tests for new release.
ef16ef8 is described below

commit ef16ef8308b8a4b0fa63458ab81503e233369c21
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Feb 28 15:31:10 2022 -0500

    Update dependency versions and tests for new release.
---
 pom.xml                                                |  8 ++++----
 totp-impl/pom.xml                                      |  6 ++++++
 .../totp/impl/ExtractTOTPFromFormRequestTest.java      |  3 ++-
 .../authn/totp/impl/ExtractTOTPFromHeaderTest.java     | 15 ++++++++-------
 .../authn/totp/impl/GoogleTOTPAuthenticatorTest.java   | 18 ++++++++++--------
 5 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/pom.xml b/pom.xml
index f9f3925..cff3fb7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,11 +19,11 @@
 
     <properties>
         <idp.groupId>net.shibboleth.idp</idp.groupId>
-        <idp.version>4.1.0</idp.version>
+        <idp.version>4.2.0-SNAPSHOT</idp.version>
         <opensaml.groupId>org.opensaml</opensaml.groupId>
-        <opensaml.version>4.1.0</opensaml.version>
-        <java-support.version>8.2.0</java-support.version>
-        <spring-extensions.version>6.1.0</spring-extensions.version>
+        <opensaml.version>4.2.0-SNAPSHOT</opensaml.version>
+        <java-support.version>8.3.0-SNAPSHOT</java-support.version>
+        <spring-extensions.version>6.2.0-SNAPSHOT</spring-extensions.version>
         <checkstyle.configLocation>${project.basedir}/checkstyle.xml</checkstyle.configLocation>
     </properties>
     
diff --git a/totp-impl/pom.xml b/totp-impl/pom.xml
index c097baf..88ad005 100644
--- a/totp-impl/pom.xml
+++ b/totp-impl/pom.xml
@@ -99,6 +99,12 @@
             <scope>provided</scope>
         </dependency>
         
+        <dependency>
+            <groupId>com.beust</groupId>
+            <artifactId>jcommander</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
         <dependency>
             <groupId>com.google.code.findbugs</groupId>
             <artifactId>jsr305</artifactId>
diff --git a/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromFormRequestTest.java b/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromFormRequestTest.java
index cef2b1f..65b5fd1 100644
--- a/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromFormRequestTest.java
+++ b/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromFormRequestTest.java
@@ -29,6 +29,7 @@ import net.shibboleth.idp.authn.context.AuthenticationContext;
 import net.shibboleth.idp.authn.impl.testing.BaseAuthenticationContextTest;
 import net.shibboleth.idp.plugin.authn.totp.context.TOTPContext;
 import net.shibboleth.idp.profile.testing.ActionTestingSupport;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.logic.FunctionSupport;
 
 /** {@link ExtractTOTPFromFormRequest} unit test. */
@@ -36,7 +37,7 @@ public class ExtractTOTPFromFormRequestTest extends BaseAuthenticationContextTes
     
     private ExtractTOTPFromFormRequest action; 
     
-    @BeforeMethod public void setUp() throws Exception {
+    @BeforeMethod public void setUp() throws ComponentInitializationException {
         super.setUp();
         
         action = new ExtractTOTPFromFormRequest();
diff --git a/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromHeaderTest.java b/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromHeaderTest.java
index 2cf988e..2f7c9a9 100644
--- a/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromHeaderTest.java
+++ b/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/ExtractTOTPFromHeaderTest.java
@@ -29,6 +29,7 @@ import net.shibboleth.idp.authn.context.AuthenticationContext;
 import net.shibboleth.idp.authn.impl.testing.BaseAuthenticationContextTest;
 import net.shibboleth.idp.plugin.authn.totp.context.TOTPContext;
 import net.shibboleth.idp.profile.testing.ActionTestingSupport;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.logic.FunctionSupport;
 
 /** {@link ExtractTOTPFromHeader} unit test. */
@@ -36,7 +37,7 @@ public class ExtractTOTPFromHeaderTest extends BaseAuthenticationContextTest {
     
     private ExtractTOTPFromHeader action; 
     
-    @BeforeMethod public void setUp() throws Exception {
+    @BeforeMethod public void setUp() throws ComponentInitializationException {
         super.setUp();
         
         action = new ExtractTOTPFromHeader();
@@ -46,7 +47,7 @@ public class ExtractTOTPFromHeaderTest extends BaseAuthenticationContextTest {
         action.initialize();
     }
     
-    @Test public void testNoServlet() throws Exception {
+    @Test public void testNoServlet() throws ComponentInitializationException {
         action = new ExtractTOTPFromHeader();
         action.setUsernameLookupStrategy(FunctionSupport.constant("jdoe"));
         action.initialize();
@@ -55,7 +56,7 @@ public class ExtractTOTPFromHeaderTest extends BaseAuthenticationContextTest {
         ActionTestingSupport.assertEvent(event, AuthnEventIds.NO_CREDENTIALS);
     }
 
-    @Test public void testNoUsername() throws Exception {
+    @Test public void testNoUsername() throws ComponentInitializationException {
         action = new ExtractTOTPFromHeader();
         action.setUsernameLookupStrategy(FunctionSupport.constant(null));
         action.initialize();
@@ -64,26 +65,26 @@ public class ExtractTOTPFromHeaderTest extends BaseAuthenticationContextTest {
         ActionTestingSupport.assertEvent(event, AuthnEventIds.UNKNOWN_USERNAME);
     }
 
-    @Test public void testMissingHeader() throws Exception {
+    @Test public void testMissingHeader() {
         final Event event = action.execute(src);
         ActionTestingSupport.assertEvent(event, AuthnEventIds.NO_CREDENTIALS);
     }
 
-    @Test public void testWrongHeader() throws Exception {
+    @Test public void testWrongHeader() {
         ((MockHttpServletRequest) action.getHttpServletRequest()).addHeader("Foo", "123456");
         
         final Event event = action.execute(src);
         ActionTestingSupport.assertEvent(event, AuthnEventIds.NO_CREDENTIALS);
     }
 
-    @Test public void testInvalidFormat() throws Exception {
+    @Test public void testInvalidFormat() {
         ((MockHttpServletRequest) action.getHttpServletRequest()).addHeader("X-Foo", "A123456");
         
         final Event event = action.execute(src);
         ActionTestingSupport.assertEvent(event, AuthnEventIds.INVALID_CREDENTIALS);
     }
 
-    @Test public void testValid() throws Exception {
+    @Test public void testValid() {
         ((MockHttpServletRequest) action.getHttpServletRequest()).addHeader("X-Foo", "123456");
         
         final Event event = action.execute(src);
diff --git a/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/GoogleTOTPAuthenticatorTest.java b/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/GoogleTOTPAuthenticatorTest.java
index aa35e6e..d2b6f4e 100644
--- a/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/GoogleTOTPAuthenticatorTest.java
+++ b/totp-impl/src/test/java/net/shibboleth/idp/plugin/authn/totp/impl/GoogleTOTPAuthenticatorTest.java
@@ -34,6 +34,8 @@ import net.shibboleth.idp.authn.principal.TOTPPrincipal;
 import net.shibboleth.idp.plugin.authn.totp.context.TOTPContext;
 import net.shibboleth.idp.profile.testing.ActionTestingSupport;
 import net.shibboleth.utilities.java.support.codec.Base32Support;
+import net.shibboleth.utilities.java.support.codec.DecodingException;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 
 import org.springframework.webflow.execution.Event;
 import org.testng.Assert;
@@ -52,7 +54,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
     
     private ValidateCredentials action;
 
-    @BeforeMethod public void setUp() throws Exception {
+    @BeforeMethod public void setUp() throws ComponentInitializationException {
         super.setUp();
 
         // We pre-populate the seeds for testing, but this is required for componnent init.
@@ -76,7 +78,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
         action.setClassifiedMessages(mappings);
     }
 
-    @Test public void testMissingContext() throws Exception {
+    @Test public void testMissingContext() throws ComponentInitializationException {
         prc.getSubcontext(AuthenticationContext.class).setAttemptedFlow(authenticationFlows.get(0));
         
         validator.initialize();
@@ -86,7 +88,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
         ActionTestingSupport.assertEvent(event, AuthnEventIds.NO_CREDENTIALS);
     }
 
-    @Test public void testMissingUser() throws Exception {
+    @Test public void testMissingUser() throws ComponentInitializationException {
         final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class);
         ac.setAttemptedFlow(authenticationFlows.get(0));
         ac.getSubcontext(TOTPContext.class, true);
@@ -99,7 +101,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
     }
 
 
-    @Test public void testMissingCode() throws Exception {
+    @Test public void testMissingCode() throws ComponentInitializationException {
         final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class);
         ac.setAttemptedFlow(authenticationFlows.get(0));
         ac.getSubcontext(TOTPContext.class, true).setUsername("foo").getTokenSeeds().add("foo".getBytes());
@@ -111,7 +113,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
         ActionTestingSupport.assertEvent(event, AuthnEventIds.NO_CREDENTIALS);
     }
 
-    @Test public void testMissingSeeds() throws Exception {
+    @Test public void testMissingSeeds() throws ComponentInitializationException {
         final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class);
         ac.setAttemptedFlow(authenticationFlows.get(0));
         ac.getSubcontext(TOTPContext.class, true).setUsername("foo").setTokenCode(123456);
@@ -138,7 +140,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
         ActionTestingSupport.assertEvent(event, AuthnEventIds.REQUEST_UNSUPPORTED);
     }
 
-    @Test public void testInvalidSeed() throws Exception {
+    @Test public void testInvalidSeed() throws ComponentInitializationException {
         final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class);
         ac.setAttemptedFlow(authenticationFlows.get(0));
         ac.getSubcontext(TOTPContext.class, true).setUsername("foo").setTokenCode(123456).getTokenSeeds().add("foo".getBytes());
@@ -152,7 +154,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
         Assert.assertTrue(errorCtx.getExceptions().get(0) instanceof LoginException);
     }
 
-    @Test public void testInvalidCode() throws Exception {
+    @Test public void testInvalidCode() throws ComponentInitializationException, DecodingException {
         final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class);
         ac.setAttemptedFlow(authenticationFlows.get(0));
         ac.getSubcontext(TOTPContext.class, true).setUsername("foo").setTokenCode(123456).getTokenSeeds().add(
@@ -167,7 +169,7 @@ public class GoogleTOTPAuthenticatorTest extends BaseAuthenticationContextTest {
         Assert.assertTrue(errorCtx.getExceptions().get(0) instanceof LoginException);
     }
 
-    @Test public void testSuccess() throws Exception {
+    @Test public void testSuccess() throws ComponentInitializationException, DecodingException {
         final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class);
         ac.setAttemptedFlow(authenticationFlows.get(0));
 

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


More information about the commits mailing list