[java-idp-plugin-duo] branch main updated: Fix test imports and Javadoc
Phil Smart
philip.smart at jisc.ac.uk
Wed Feb 10 16:06:00 UTC 2021
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch main
in repository java-idp-plugin-duo.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-duo.git;a=commit;h=01b379965795f26c3c62cb68a572ac623f1624ec
The following commit(s) were added to refs/heads/main by this push:
new 01b3799 Fix test imports and Javadoc
01b3799 is described below
commit 01b379965795f26c3c62cb68a572ac623f1624ec
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Feb 10 16:05:58 2021 +0000
Fix test imports and Javadoc
---
.../duo/impl/AbstractAuthnXmlFlowExecutionTests.java | 2 --
.../duo/impl/DefaultDuoOIDCClientRegistryTest.java | 6 ++----
.../duo/impl/DuoIssuerClaimLookupStrategyTest.java | 18 +++++++++++++++++-
.../duo/impl/DuoNonceClaimLookupStrategyTest.java | 16 ++++++++++++++++
.../authn/duo/impl/DuoOIDCAuthnControllerTest.java | 2 --
.../idp/plugin/authn/duo/impl/DuoSupportTest.java | 17 +++++++++++++++++
.../duo/impl/DuoUsernameClaimLookupStrategyTest.java | 16 ++++++++++++++++
.../authn/duo/impl/ExchangeCodeForDuoTokenTest.java | 2 --
.../authn/duo/impl/HealthCheckDuoOIDCAuthAPITest.java | 2 --
.../authn/duo/impl/InMemoryCredentialValidator.java | 3 ++-
.../authn/duo/impl/ValidateTokenClaimsTest.java | 2 +-
.../authn/duo/impl/ValidateTokenSignatureTest.java | 3 ---
.../idp/plugin/authn/mock/MockDuoOIDCClient_FAIL.java | 4 ----
.../idp/plugin/authn/mock/MockDuoOIDCClient_OK.java | 4 ----
.../mock/MockDuoOIDCClient_OK_OLD_AUTH_TIME.java | 13 +++++--------
.../authn/spring/CustomFlowModelFlowBuilder.java | 4 +++-
.../plugin/authn/util/mock/IdPPropertyConfigurer.java | 19 ++++++++++++++++++-
.../idp/plugin/authn/util/mock/package-info.java | 19 +++++++++++++++++++
.../duo/nimbus/impl/NimbusClientFactoryTest.java | 1 -
.../duo/nimbus/impl/NimbusClientSupportTest.java | 1 -
.../authn/duo/nimbus/impl/NimbusClientTest.java | 1 -
.../authn/duo/sdk/impl/DuoSDKClientAdaptor.java | 1 +
22 files changed, 117 insertions(+), 39 deletions(-)
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/AbstractAuthnXmlFlowExecutionTests.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/AbstractAuthnXmlFlowExecutionTests.java
index bf6ae9c..0de0f8e 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/AbstractAuthnXmlFlowExecutionTests.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/AbstractAuthnXmlFlowExecutionTests.java
@@ -57,7 +57,6 @@ import org.springframework.webflow.test.execution.AbstractExternalizedFlowExecut
import com.google.common.net.HttpHeaders;
-import net.shibboleth.ext.spring.config.StringToDurationConverter;
import net.shibboleth.idp.authn.AuthenticationFlowDescriptor;
import net.shibboleth.idp.authn.context.AuthenticationContext;
import net.shibboleth.idp.authn.context.SubjectCanonicalizationContext;
@@ -69,7 +68,6 @@ import net.shibboleth.idp.session.context.SessionContext;
import net.shibboleth.idp.ui.context.RelyingPartyUIContext;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.security.impl.SecureRandomIdentifierGenerationStrategy;
import net.shibboleth.utilities.java.support.xml.DOMTypeSupport;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java
index 536c6a2..5e82dd6 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java
@@ -88,10 +88,8 @@ public class DefaultDuoOIDCClientRegistryTest {
assertNotSame(client, clientThree);
}
- /* Manually step debugging of the registry thread safety, works fine.*/
- //@Test
- public final void testThreadSafetyCaching() throws DuoRegistryException,
- ComponentInitializationException, InterruptedException, ExecutionException {
+ //@test is not useful as an automated test
+ public final void testThreadSafetyCaching() throws Exception {
// needs a real mock to test proper caching.
final MockDuoOIDCClientFactory_OK_Client factory = new MockDuoOIDCClientFactory_OK_Client();
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoIssuerClaimLookupStrategyTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoIssuerClaimLookupStrategyTest.java
index d18b53d..fa7d7ed 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoIssuerClaimLookupStrategyTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoIssuerClaimLookupStrategyTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package net.shibboleth.idp.plugin.authn.duo.impl;
@@ -14,7 +30,7 @@ import javax.annotation.Nonnull;
import org.testng.annotations.BeforeMethod;
/**
- * Test for the {@link DuoIssuerLookupStrategy}.
+ * Test for the {@link DuoIssuerClaimLookupStrategy}.
*/
public class DuoIssuerClaimLookupStrategyTest extends AbstractDuoActionTest{
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoNonceClaimLookupStrategyTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoNonceClaimLookupStrategyTest.java
index d8c2fd0..6f9eec8 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoNonceClaimLookupStrategyTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoNonceClaimLookupStrategyTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package net.shibboleth.idp.plugin.authn.duo.impl;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoOIDCAuthnControllerTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoOIDCAuthnControllerTest.java
index 9f1dc13..0076366 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoOIDCAuthnControllerTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoOIDCAuthnControllerTest.java
@@ -34,7 +34,6 @@ import org.opensaml.profile.context.ProfileRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.mock.web.MockHttpSession;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
@@ -64,7 +63,6 @@ import net.shibboleth.idp.authn.impl.ExternalAuthenticationImpl;
import net.shibboleth.idp.plugin.authn.duo.DefaultDuoOIDCIntegration;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
import net.shibboleth.idp.plugin.authn.duo.context.DuoOIDCAuthenticationContext;
-import net.shibboleth.idp.plugin.authn.mock.MockDuoOIDCClientFactory_OK_Client;
import net.shibboleth.idp.plugin.authn.mock.MockDuoOIDCClient_OK;
import net.shibboleth.idp.plugin.authn.util.mock.IdPPropertyConfigurer;
import net.shibboleth.idp.session.IdPSession;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoSupportTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoSupportTest.java
index c814a99..a00081f 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoSupportTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoSupportTest.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.plugin.authn.duo.impl;
import static org.junit.Assert.assertEquals;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoUsernameClaimLookupStrategyTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoUsernameClaimLookupStrategyTest.java
index cab2e77..8e59fbb 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoUsernameClaimLookupStrategyTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DuoUsernameClaimLookupStrategyTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package net.shibboleth.idp.plugin.authn.duo.impl;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ExchangeCodeForDuoTokenTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ExchangeCodeForDuoTokenTest.java
index c3b2b89..9c3b00e 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ExchangeCodeForDuoTokenTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ExchangeCodeForDuoTokenTest.java
@@ -21,12 +21,10 @@ import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.testng.AssertJUnit;
-import org.mockito.Mockito;
import org.springframework.webflow.execution.Event;
import net.shibboleth.idp.authn.AuthnEventIds;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
-import net.shibboleth.idp.plugin.authn.duo.DuoOIDCClientRegistry;
import net.shibboleth.idp.plugin.authn.duo.DuoRegistryException;
import net.shibboleth.idp.plugin.authn.mock.MockDuoOIDCClient_OK;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/HealthCheckDuoOIDCAuthAPITest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/HealthCheckDuoOIDCAuthAPITest.java
index 85f5029..755cd8b 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/HealthCheckDuoOIDCAuthAPITest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/HealthCheckDuoOIDCAuthAPITest.java
@@ -36,14 +36,12 @@ package net.shibboleth.idp.plugin.authn.duo.impl;
import static org.testng.Assert.assertNull;
-import org.mockito.Mockito;
import org.springframework.webflow.execution.Event;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import net.shibboleth.idp.authn.AuthnEventIds;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
-import net.shibboleth.idp.plugin.authn.duo.DuoOIDCClientRegistry;
import net.shibboleth.idp.plugin.authn.duo.DuoRegistryException;
import net.shibboleth.idp.plugin.authn.mock.MockDuoOIDCClient_FAIL;
import net.shibboleth.idp.plugin.authn.mock.MockDuoOIDCClient_OK;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/InMemoryCredentialValidator.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/InMemoryCredentialValidator.java
index 37930ef..d2a70f5 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/InMemoryCredentialValidator.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/InMemoryCredentialValidator.java
@@ -50,7 +50,8 @@ public class InMemoryCredentialValidator extends AbstractUsernamePasswordCredent
/** The configured password.*/
@Nonnull private final String password;
- public InMemoryCredentialValidator(@Nonnull @NotEmpty final String uname, @Nonnull @NotEmpty final String pssword) {
+ public InMemoryCredentialValidator(@Nonnull @NotEmpty final String uname,
+ @Nonnull @NotEmpty final String pssword) {
username = Constraint.isNotEmpty(uname, "Username can not be null or empty");
password = Constraint.isNotEmpty(pssword, "Password can not be null or empty");
}
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenClaimsTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenClaimsTest.java
index 2f39349..1fc5080 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenClaimsTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenClaimsTest.java
@@ -98,7 +98,7 @@ public class ValidateTokenClaimsTest extends AbstractDuoActionTest {
* irrespective of the input.
*
* @throws ComponentInitializationException on error.
- * @throws BadJWTException on error.
+ * @throws JWTValidationException on error.
*/
@Test
public final void testInValidToken() throws ComponentInitializationException, JWTValidationException {
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenSignatureTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenSignatureTest.java
index 45e3004..4dd1287 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenSignatureTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateTokenSignatureTest.java
@@ -186,9 +186,6 @@ public class ValidateTokenSignatureTest extends AbstractDuoActionTest {
/**
* Test setting an unsupported Signature Algorithm.
- *
- * @throws ComponentInitializationException on error.
- * @throws EncodingException on error.
*/
@Test(expectedExceptions = ConstraintViolationException.class)
public final void testSetUnsupportedSignatureAlgorithm() {
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_FAIL.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_FAIL.java
index 893191a..3b143cc 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_FAIL.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_FAIL.java
@@ -27,12 +27,8 @@ import javax.annotation.Nonnull;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.JWSAlgorithm;
-import com.nimbusds.jose.JWSHeader;
-import com.nimbusds.jose.JWSSigner;
-import com.nimbusds.jose.crypto.MACSigner;
import com.nimbusds.jwt.JWT;
import com.nimbusds.jwt.JWTClaimsSet;
-import com.nimbusds.jwt.SignedJWT;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
import net.shibboleth.idp.plugin.authn.duo.DuoOIDCClient;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK.java
index c14b64f..27670e7 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK.java
@@ -27,12 +27,8 @@ import javax.annotation.Nonnull;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.JWSAlgorithm;
-import com.nimbusds.jose.JWSHeader;
-import com.nimbusds.jose.JWSSigner;
-import com.nimbusds.jose.crypto.MACSigner;
import com.nimbusds.jwt.JWT;
import com.nimbusds.jwt.JWTClaimsSet;
-import com.nimbusds.jwt.SignedJWT;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
import net.shibboleth.idp.plugin.authn.duo.DuoOIDCClient;
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK_OLD_AUTH_TIME.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK_OLD_AUTH_TIME.java
index c7571e6..aeb6f20 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK_OLD_AUTH_TIME.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/mock/MockDuoOIDCClient_OK_OLD_AUTH_TIME.java
@@ -27,12 +27,8 @@ import javax.annotation.Nonnull;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.JWSAlgorithm;
-import com.nimbusds.jose.JWSHeader;
-import com.nimbusds.jose.JWSSigner;
-import com.nimbusds.jose.crypto.MACSigner;
import com.nimbusds.jwt.JWT;
import com.nimbusds.jwt.JWTClaimsSet;
-import com.nimbusds.jwt.SignedJWT;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
import net.shibboleth.idp.plugin.authn.duo.DuoOIDCClient;
@@ -50,14 +46,14 @@ import net.shibboleth.utilities.java.support.codec.EncodingException;
*/
public class MockDuoOIDCClient_OK_OLD_AUTH_TIME implements DuoOIDCClient{
- @Nonnull private static final String STATUS = "OK";
-
+ @Nonnull private static final String STATUS = "OK";
@Nonnull private static final String SUB = "jdoe";
@NonnullAfterInit private DuoOIDCIntegration integration;
- public MockDuoOIDCClient_OK_OLD_AUTH_TIME(final @Nonnull DuoOIDCIntegration integ) throws DuoClientException {
+ public MockDuoOIDCClient_OK_OLD_AUTH_TIME(
+ final @Nonnull DuoOIDCIntegration integ) throws DuoClientException {
integration = integ;
}
@@ -68,7 +64,8 @@ public class MockDuoOIDCClient_OK_OLD_AUTH_TIME implements DuoOIDCClient{
}
@Override
- public String createAuthUrl(final String username, final String state,final String nonce) throws DuoClientException {
+ public String createAuthUrl(
+ final String username, final String state,final String nonce) throws DuoClientException {
return format("https://%s%s?scope=openid&response_type=code&redirect_uri=%s&client_id=%s&request=%s",
integration.getAPIHost(),"/oauth/v1/authorize", integration.getRedirectURI(),
integration.getClientId(), "JWT");
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/spring/CustomFlowModelFlowBuilder.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/spring/CustomFlowModelFlowBuilder.java
index 6b91918..9590c69 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/spring/CustomFlowModelFlowBuilder.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/spring/CustomFlowModelFlowBuilder.java
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package net.shibboleth.idp.plugin.authn.spring;
import java.io.IOException;
@@ -125,7 +126,8 @@ public class CustomFlowModelFlowBuilder extends AbstractFlowBuilder {
private static final boolean IS_SPRING_FACES_PRESENT = ClassUtils.isPresent(
"org.springframework.faces.webflow.FlowActionListener", FlowModelFlowBuilder.class.getClassLoader());
- public static final String VALIDATOR_FLOW_ATTR = FlowModelFlowBuilder.class.getSimpleName() + ".validator";
+ public static final String VALIDATOR_FLOW_ATTR =
+ FlowModelFlowBuilder.class.getSimpleName() + ".validator";
public static final String VALIDATION_HINT_RESOLVER_FLOW_ATTR =
FlowModelFlowBuilder.class.getSimpleName() + ".validationHintResolver";
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/util/mock/IdPPropertyConfigurer.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/util/mock/IdPPropertyConfigurer.java
index 6131b2e..d4c19fe 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/util/mock/IdPPropertyConfigurer.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/util/mock/IdPPropertyConfigurer.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.plugin.authn.util.mock;
import org.springframework.context.annotation.Bean;
@@ -6,7 +23,7 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
/**
- * Configure the property sources placeholder to use the correct placeholder prefix of {@literal %}
+ * Configure the property sources placeholder to use the correct placeholder prefix of {@literal %}.
*/
@Configuration
public class IdPPropertyConfigurer {
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/util/mock/package-info.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/util/mock/package-info.java
new file mode 100644
index 0000000..793b304
--- /dev/null
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/util/mock/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** Duo OIDC 2FA login flow mock test classes. */
+package net.shibboleth.idp.plugin.authn.util.mock;
diff --git a/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientFactoryTest.java b/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientFactoryTest.java
index 1a3c1eb..725f5e7 100644
--- a/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientFactoryTest.java
+++ b/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientFactoryTest.java
@@ -15,7 +15,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import net.shibboleth.idp.plugin.authn.duo.DefaultDuoOIDCIntegration;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
import net.shibboleth.idp.plugin.authn.duo.DuoOIDCClient;
-import net.shibboleth.idp.plugin.authn.duo.nimbus.impl.NimbusClientFactory;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
diff --git a/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientSupportTest.java b/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientSupportTest.java
index b4f6ef5..1b3dac4 100644
--- a/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientSupportTest.java
+++ b/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientSupportTest.java
@@ -30,7 +30,6 @@ import org.testng.annotations.Test;
import net.shibboleth.idp.plugin.authn.duo.DefaultDuoOIDCIntegration;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
-import net.shibboleth.idp.plugin.authn.duo.nimbus.impl.NimbusClientSupport;
/** Tests for the NimbusClientSupport class.*/
public class NimbusClientSupportTest {
diff --git a/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientTest.java b/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientTest.java
index 5b5d448..6d0ac07 100644
--- a/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientTest.java
+++ b/idp-duo-nimbus-client-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/nimbus/impl/NimbusClientTest.java
@@ -62,7 +62,6 @@ import com.nimbusds.jwt.JWT;
import net.shibboleth.idp.plugin.authn.duo.DefaultDuoOIDCIntegration;
import net.shibboleth.idp.plugin.authn.duo.DuoClientException;
import net.shibboleth.idp.plugin.authn.duo.model.DuoHealthCheck;
-import net.shibboleth.idp.plugin.authn.duo.nimbus.impl.NimbusClient;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
/** Tests for the NimbusClient class.*/
diff --git a/idp-duo-sdk-client-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/sdk/impl/DuoSDKClientAdaptor.java b/idp-duo-sdk-client-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/sdk/impl/DuoSDKClientAdaptor.java
index e19f05f..8add2ba 100644
--- a/idp-duo-sdk-client-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/sdk/impl/DuoSDKClientAdaptor.java
+++ b/idp-duo-sdk-client-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/sdk/impl/DuoSDKClientAdaptor.java
@@ -97,6 +97,7 @@ final class DuoSDKClientAdaptor extends AbstractDuoOIDCClient{
try {
if (caCerts == null) {
+ //will use the default certs in the Client if the caCerts are null
client = new Client(integration.getClientId(), integration.getSecretKey(),
integration.getAPIHost(), integration.getRedirectURI());
} else {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list