[java-idp-plugin-duo] branch main updated: Checkstyle improvements

Codeberg noreply at shibboleth.net
Thu Jul 16 10:51:32 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-idp-plugin-duo.

View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-duo/commit/1a7747892f69022c8db9d354e90cdb7b58e6d764

The following commit(s) were added to refs/heads/main by this push:
     new 1a774789 Checkstyle improvements
1a774789 is described below

commit 1a7747892f69022c8db9d354e90cdb7b58e6d764
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Thu Jul 16 11:51:22 2026 +0100

    Checkstyle improvements
---
 .../idp/plugin/authn/duo/SimpleDuoOIDCIntegration.java   | 11 ++++++++++-
 .../idp/plugin/authn/duo/audit/AuditFields.java          | 14 +++++++-------
 .../idp/plugin/authn/duo/audit/package-info.java         | 16 ++++++++++++++++
 .../AttemptedAuthenticationFlowIdAuditExtractor.java     | 14 ++++++++++++++
 .../AuthnMethodReferenceToPrincipalMappingStrategy.java  |  2 ++
 5 files changed, 49 insertions(+), 8 deletions(-)

diff --git a/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/SimpleDuoOIDCIntegration.java b/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/SimpleDuoOIDCIntegration.java
index c6d80a8a..3f706a72 100644
--- a/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/SimpleDuoOIDCIntegration.java
+++ b/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/SimpleDuoOIDCIntegration.java
@@ -93,12 +93,14 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     }
     
     /** {@inheritDoc} */
+    @Override
     public synchronized boolean isPasswordless() {
         checkComponentActive();
         return passwordless;
     }
     
     /** {@inheritDoc} */
+    @Override
     @Nonnull @NotEmpty public synchronized String getAPIHost() {
         checkComponentActive();
         assert apiHost != null;
@@ -117,6 +119,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     }
     
     /** {@inheritDoc} */
+    @Override
     @Nonnull @NotEmpty public synchronized String getHealthCheckEndpoint() {
         checkComponentActive();
         assert healthEndpoint != null;
@@ -136,6 +139,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     }
 
     /** {@inheritDoc} */
+    @Override
     @Nonnull @NotEmpty public synchronized String getAuthorizeEndpoint() {
         checkComponentActive();
         assert authorizeEndpoint != null;
@@ -155,6 +159,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     }
 
     /** {@inheritDoc} */
+    @Override
     @Nonnull @NotEmpty public synchronized String getTokenEndpoint() {
         checkComponentActive();
         assert tokenEndpoint != null;
@@ -174,6 +179,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     }
     
     /** {@inheritDoc} */
+    @Override
     @Nullable public synchronized String getRedirectURI() {
         return redirectURI;
     }
@@ -186,7 +192,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     public synchronized void setRedirectURI(@Nonnull final String url) {
         checkSetterPreconditions();
         
-        redirectURI = Constraint.isNotNull(StringSupport.trimOrNull(url), "Redirect URI cannot be null or empty");;
+        redirectURI = Constraint.isNotNull(StringSupport.trimOrNull(url), "Redirect URI cannot be null or empty");
     }
     
    
@@ -202,6 +208,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     }
     
     /** {@inheritDoc} */
+    @Override
     @Nonnull @NotEmpty public synchronized String getClientId() {
         checkComponentActive();
         assert clientId != null;
@@ -220,6 +227,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     }
     
     /** {@inheritDoc} */
+    @Override
     @Nonnull @NotEmpty public synchronized String getSecretKey() {
         checkComponentActive();
         assert secretKey != null;
@@ -228,6 +236,7 @@ public final class SimpleDuoOIDCIntegration extends AbstractInitializableCompone
     
 
     /** {@inheritDoc} */
+    @Override
     @SuppressWarnings("null")
     @Nonnull @NonnullElements @Unmodifiable
     public synchronized <T extends Principal> Set<T> getSupportedPrincipals(@Nonnull final Class<T> c) {
diff --git a/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/AuditFields.java b/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/AuditFields.java
index 70ccb72b..e17a2351 100644
--- a/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/AuditFields.java
+++ b/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/AuditFields.java
@@ -23,13 +23,6 @@ import net.shibboleth.shared.annotation.constraint.NotEmpty;
 /** Constants to use for Duo audit logging fields stored in an {@link AuditContext}. */
 public final class AuditFields {
     
-    /**
-     * Constructor.
-     */
-    private AuditFields() {
-        // no op
-    }
-    
     /** The id of the currently attempted flow. */
     @Nonnull @NotEmpty public static final String ATTEMPTED_AUTHN_FLOW_ID = "AAF";
     
@@ -72,4 +65,11 @@ public final class AuditFields {
     
     /** The Duo client ID. */
     @Nonnull @NotEmpty public static final String CLIENT_ID = "DuoCID";
+    
+    /**
+     * Constructor.
+     */
+    private AuditFields() {
+        // no op
+    }
 }
diff --git a/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/package-info.java b/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/package-info.java
new file mode 100644
index 00000000..1307522e
--- /dev/null
+++ b/idp-duo-api/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/package-info.java
@@ -0,0 +1,16 @@
+/*
+ * Licensed 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 audit classes. */
+package net.shibboleth.idp.plugin.authn.duo.audit;
diff --git a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/impl/AttemptedAuthenticationFlowIdAuditExtractor.java b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/impl/AttemptedAuthenticationFlowIdAuditExtractor.java
index 53b6f904..fd31bee6 100644
--- a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/impl/AttemptedAuthenticationFlowIdAuditExtractor.java
+++ b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/audit/impl/AttemptedAuthenticationFlowIdAuditExtractor.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed 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.audit.impl;
 
 import java.util.function.Function;
diff --git a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/AuthnMethodReferenceToPrincipalMappingStrategy.java b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/AuthnMethodReferenceToPrincipalMappingStrategy.java
index e94f8af1..415a391f 100644
--- a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/AuthnMethodReferenceToPrincipalMappingStrategy.java
+++ b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/AuthnMethodReferenceToPrincipalMappingStrategy.java
@@ -81,6 +81,7 @@ public class AuthnMethodReferenceToPrincipalMappingStrategy
         }
     }
 
+ // Checkstyle: CyclomaticComplexity OFF
     /** {@inheritDoc} */
     @Override @Nonnull @NotLive @Unmodifiable
     public Collection<Principal> apply(@Nullable final ProfileRequestContext profileRequestContext) {
@@ -134,5 +135,6 @@ public class AuthnMethodReferenceToPrincipalMappingStrategy
         }        
         return CollectionSupport.emptyList();
     }
+ // Checkstyle: CyclomaticComplexity ON
 
 }

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


More information about the commits mailing list