[java-idp-plugin-totp] branch master updated: IDP-1595 Update to new update info format
Rod Widdowson
rdw at steadingsoftware.com
Thu Jul 23 07:09:14 UTC 2020
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-idp-plugin-totp.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-totp.git;a=commit;h=6e3163e035aa0c83d5ae8c9e9142f52be9c39cf2
The following commit(s) were added to refs/heads/master by this push:
new 6e3163e IDP-1595 Update to new update info format
6e3163e is described below
commit 6e3163e035aa0c83d5ae8c9e9142f52be9c39cf2
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Jul 22 16:56:35 2020 +0100
IDP-1595 Update to new update info format
https://issues.shibboleth.net/jira/browse/IDP-1595
---
.../net/shibboleth/idp/plugin/totp/TOTPDescription.java | 2 +-
.../0.0.1/version.details.properties | 3 ---
.../net.shibboleth.idp.plugin.totp/versions.properties | 1 -
.../src/main/resources/META-INF/plugins/plugin.props | 8 ++++++++
.../java/net/shibboleth/idp/plugin/totp/PluginTest.java | 16 ++++++++++------
5 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/totp-impl/src/main/java/net/shibboleth/idp/plugin/totp/TOTPDescription.java b/totp-impl/src/main/java/net/shibboleth/idp/plugin/totp/TOTPDescription.java
index 1a70358..cdea15b 100644
--- a/totp-impl/src/main/java/net/shibboleth/idp/plugin/totp/TOTPDescription.java
+++ b/totp-impl/src/main/java/net/shibboleth/idp/plugin/totp/TOTPDescription.java
@@ -46,7 +46,7 @@ public class TOTPDescription extends AbstractPluginDescription {
/** {@inheritDoc} */
@Override
@Nonnull @NonnullElements public List<URL> getUpdateURLs() throws IOException {
- return Collections.singletonList(new ClassPathResource("META-INF/plugins/").getURL());
+ return Collections.singletonList(new ClassPathResource("META-INF/plugins/plugin.props").getURL());
}
/** {@inheritDoc} */
diff --git a/totp-impl/src/main/resources/META-INF/plugins/net.shibboleth.idp.plugin.totp/0.0.1/version.details.properties b/totp-impl/src/main/resources/META-INF/plugins/net.shibboleth.idp.plugin.totp/0.0.1/version.details.properties
deleted file mode 100644
index ccce079..0000000
--- a/totp-impl/src/main/resources/META-INF/plugins/net.shibboleth.idp.plugin.totp/0.0.1/version.details.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-idp.version.max=5.0.0
-idp.version.min=4.1.0
-support.level = 2
diff --git a/totp-impl/src/main/resources/META-INF/plugins/net.shibboleth.idp.plugin.totp/versions.properties b/totp-impl/src/main/resources/META-INF/plugins/net.shibboleth.idp.plugin.totp/versions.properties
deleted file mode 100644
index 65fbb9d..0000000
--- a/totp-impl/src/main/resources/META-INF/plugins/net.shibboleth.idp.plugin.totp/versions.properties
+++ /dev/null
@@ -1 +0,0 @@
-net.shibboleth.idp.plugin.totp.versions=0.0.1
\ No newline at end of file
diff --git a/totp-impl/src/main/resources/META-INF/plugins/plugin.props b/totp-impl/src/main/resources/META-INF/plugins/plugin.props
new file mode 100644
index 0000000..6742c98
--- /dev/null
+++ b/totp-impl/src/main/resources/META-INF/plugins/plugin.props
@@ -0,0 +1,8 @@
+net.shibboleth.idp.plugin.totp.versions=0.0.1
+#
+# RHINO
+# 0.0.1
+#
+net.shibboleth.idp.plugin.totp.idpVersionMax.0.0.1=5.0.0
+net.shibboleth.idp.plugin.totp.idpVersionMin.0.0.1=4.1.0
+net.shibboleth.idp.plugin.totp.supportLevel.0.0.1 = Current
diff --git a/totp-impl/src/test/java/net/shibboleth/idp/plugin/totp/PluginTest.java b/totp-impl/src/test/java/net/shibboleth/idp/plugin/totp/PluginTest.java
index dfde84c..cd04f2c 100644
--- a/totp-impl/src/test/java/net/shibboleth/idp/plugin/totp/PluginTest.java
+++ b/totp-impl/src/test/java/net/shibboleth/idp/plugin/totp/PluginTest.java
@@ -17,7 +17,10 @@
package net.shibboleth.idp.plugin.totp;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
import java.util.ServiceLoader;
@@ -25,6 +28,8 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import net.shibboleth.idp.plugin.PluginDescription;
+import net.shibboleth.idp.plugin.PluginVersion;
+import net.shibboleth.idp.plugin.PluginSupport.SupportLevel;
import net.shibboleth.idp.plugin.impl.PluginState;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
@@ -51,11 +56,10 @@ public class PluginTest {
final PluginState state = new PluginState(totp);
state.initialize();
-
- }
-
- @Test
- public void testDownload() throws Exception {
- // TODO
+ assertTrue(state.getAvailableVersions().contains(
+ new PluginVersion(totp.getMajorVersion(), totp.getMinorVersion(), totp.getPatchVersion())));
+ assertEquals(state.getSupportLevel(), SupportLevel.Current);
+ assertTrue(state.isSupportedWithIdPVersion("4.1.0"));
+ assertFalse(state.isSupportedWithIdPVersion("5.0.0"));
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list