[java-idp-plugin-duo] branch main updated: Minor JavaDoc and properties fixes
Phil Smart
philip.smart at jisc.ac.uk
Thu Aug 20 14:57:16 UTC 2020
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=00f14e8dc69cc31554acc86f2330b87580da5d83
The following commit(s) were added to refs/heads/main by this push:
new 00f14e8 Minor JavaDoc and properties fixes
00f14e8 is described below
commit 00f14e8dc69cc31554acc86f2330b87580da5d83
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Thu Aug 20 15:57:10 2020 +0100
Minor JavaDoc and properties fixes
---
.../idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java | 9 ++++++---
.../idp/plugin/authn/duo/impl/ValidateDuoTokenIssuer.java | 5 +++--
idp-duo-impl/src/main/resources/META-INF/plugins/plugin.props | 2 ++
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java
index a9e3213..942946d 100644
--- a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java
+++ b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java
@@ -36,6 +36,7 @@ import net.shbboleth.idp.plugin.authn.duo.DuoOIDCClientFactory;
import net.shbboleth.idp.plugin.authn.duo.DuoOIDCClientRegistry;
import net.shbboleth.idp.plugin.authn.duo.DuoOIDCIntegration;
import net.shbboleth.idp.plugin.authn.duo.DuoRegistryException;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
@@ -50,7 +51,7 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
* re-used for the lifetime of the IdP. The {@link DuoOIDCIntegration} should decide it's own business key (using the
* equals and hashcode method appropriately), the {@link DefaultDuoOIDCIntegration} key is the clientID.</p>
*
- * <p>Support lazy intilization of clients when they are first requested. A configurable client factory
+ * <p>Supports lazy intilization of clients when they are first requested. A single, configurable, client factory
* is called to initilize new clients.</p>
*
*/
@@ -62,7 +63,7 @@ public class DefaultDuoOIDCClientRegistry extends AbstractIdentifiableInitializa
@Nonnull private final Logger log = LoggerFactory.getLogger(DefaultDuoOIDCClientRegistry.class);
/** Factory to produce Duo clients.*/
- @Nonnull private DuoOIDCClientFactory clientFactory;
+ @NonnullAfterInit private DuoOIDCClientFactory clientFactory;
/** Registry of Duo client to Duo integration.*/
@Nonnull @NonnullElements private final ConcurrentMap<DuoOIDCIntegration, DuoOIDCClient> clientRegistry;
@@ -96,7 +97,9 @@ public class DefaultDuoOIDCClientRegistry extends AbstractIdentifiableInitializa
try {
//this is an atomic call, avoiding the need to synchronise here e.g. two clients should never
//be created for the same integration.
- return clientRegistry.computeIfAbsent(integration,clientRegistryMappingFunction);
+ final DuoOIDCClient client = clientRegistry.computeIfAbsent(integration,clientRegistryMappingFunction);
+ log.trace("Duo registry returning DuoClient of type '{}'",client.getClass().getCanonicalName());
+ return client;
} catch (final DuoClientInitializationException e) {
throw new DuoRegistryException("DuoClient could not be found or created in the registry",e);
}
diff --git a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateDuoTokenIssuer.java b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateDuoTokenIssuer.java
index 4797eb5..9a3b728 100644
--- a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateDuoTokenIssuer.java
+++ b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/ValidateDuoTokenIssuer.java
@@ -30,6 +30,7 @@ import net.shbboleth.idp.plugin.authn.duo.context.DuoOIDCAuthenticationContext;
import net.shbboleth.idp.plugin.authn.duo.model.DuoAuthToken;
import net.shibboleth.idp.authn.AuthnEventIds;
import net.shibboleth.idp.authn.context.AuthenticationContext;
+import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
@@ -73,7 +74,7 @@ public class ValidateDuoTokenIssuer extends AbstractDuoAuthenticationAction {
@Nullable private DuoAuthToken token;
/** The URL path component of the issuer.*/
- @Nonnull private String issuerPath;
+ @Nonnull @NotEmpty private String issuerPath;
/** Constructor.*/
public ValidateDuoTokenIssuer() {
@@ -136,7 +137,7 @@ public class ValidateDuoTokenIssuer extends AbstractDuoAuthenticationAction {
ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.AUTHN_EXCEPTION);
return;
}
- //isuer is fine.
+ //issuer is fine.
}
diff --git a/idp-duo-impl/src/main/resources/META-INF/plugins/plugin.props b/idp-duo-impl/src/main/resources/META-INF/plugins/plugin.props
index d4b5140..9cdf9ab 100644
--- a/idp-duo-impl/src/main/resources/META-INF/plugins/plugin.props
+++ b/idp-duo-impl/src/main/resources/META-INF/plugins/plugin.props
@@ -6,3 +6,5 @@ net.shibboleth.idp.plugin.authn.duo.versions=0.0.1
net.shibboleth.idp.plugin.authn.duo.idpVersionMax.0.0.1=5.0.0
net.shibboleth.idp.plugin.authn.duo.idpVersionMin.0.0.1=4.1.0
net.shibboleth.idp.plugin.authn.duo.supportLevel.0.0.1 = Current
+net.shibboleth.idp.plugin.authn.duo.downloadURL.0.0.1 = https://build.shibboleth.net/nexus/service/local/repositories/releases/<FINISH>
+net.shibboleth.idp.plugin.authn.duo.baseName.0.0.1 = idp-plugin-duo-0.1.0
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list