[java-idp-plugin-webauthn] branch main updated: Fix javadoc

Phil Smart philip.smart at jisc.ac.uk
Mon Aug 12 14:49:33 UTC 2024


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

philsmart pushed a commit to branch main
in repository java-idp-plugin-webauthn.

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

The following commit(s) were added to refs/heads/main by this push:
     new ef2114e  Fix javadoc
ef2114e is described below

commit ef2114e1eb6dddddd381b1d167ed55e0c774ebb1
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Mon Aug 12 15:49:30 2024 +0100

    Fix javadoc
---
 .../admin/CredentialCreationOptionsParameters.java      |  2 +-
 .../plugin/authn/webauthn/admin/RegistrationResult.java | 11 ++++++++---
 .../plugin/authn/webauthn/authn/AssertionResult.java    |  5 ++++-
 .../authn/CredentialRequestOptionsParameters.java       | 17 +++++++++++++++--
 .../webauthn/context/WebAuthnRegistrationContext.java   |  2 ++
 .../authn/webauthn/storage/CredentialRegistration.java  | 14 +++++++++++++-
 .../webauthn/storage/WebAuthnCredentialRepository.java  |  2 +-
 .../ExtractKeyRemovalInformationFromFormRequest.java    |  1 +
 .../impl/ExtractUsernameSearchFromFormRequest.java      |  2 +-
 .../audit/impl/AbstractWebAuthnAuditingAction.java      |  7 ++++++-
 .../client/impl/YubicoWebauthnClientFactory.java        |  2 +-
 .../authn/webauthn/impl/AbstractWebAuthnAction.java     | 14 ++++++++------
 .../webauthn/impl/LookupRegisteredCredentials.java      |  6 +++---
 .../impl/LookupRegisteredCredentialsFromUserHandle.java |  6 +++---
 .../webauthn/metadata/FidoMetadataServiceFactory.java   |  2 +-
 15 files changed, 68 insertions(+), 25 deletions(-)

diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/CredentialCreationOptionsParameters.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/CredentialCreationOptionsParameters.java
index b84b9de..80beb8d 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/CredentialCreationOptionsParameters.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/CredentialCreationOptionsParameters.java
@@ -263,7 +263,7 @@ public class CredentialCreationOptionsParameters extends BaseOptionsParameters {
         /**
          * The user.id supplied to the authenticator during registration. As generated by the IdP.
          * 
-         * @param userHauserIdndle the user.id
+         * @param userId the user.id
          * @return the next stage
          */
         public IAttestationConveyancePreferenceStage withUserId(@Nonnull final byte[] userId);
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/RegistrationResult.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/RegistrationResult.java
index b4f5d88..397e2c9 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/RegistrationResult.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/RegistrationResult.java
@@ -218,8 +218,15 @@ public class RegistrationResult {
                 PublicKeyCredential<AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs> credential);
     }
 
-    
+    /**
+     * Builder stage
+     */
     public interface IBuildStage {
+        /**
+         * Build a registration result.
+         * 
+         * @return the result
+         */
         public RegistrationResult build();
     }
 
@@ -236,8 +243,6 @@ public class RegistrationResult {
         /**
          * The attestation type that was used for this credential. This only applies to attestation statements 
          * iff requested.
-         * 
-         * @return the attestation type.
          */
         @Nonnull private AttestationType attestationType;
         
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/AssertionResult.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/AssertionResult.java
index b743e82..c184192 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/AssertionResult.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/AssertionResult.java
@@ -156,7 +156,10 @@ public class AssertionResult {
      * Builder stage.
      */
     public interface IBuildStage {
-        /** Build the result.*/
+        /**
+         * Build the result
+         * @return an assertion result
+         */
         public AssertionResult build();
     }
 
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/CredentialRequestOptionsParameters.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/CredentialRequestOptionsParameters.java
index fbb9d5b..75a88c2 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/CredentialRequestOptionsParameters.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/authn/CredentialRequestOptionsParameters.java
@@ -38,7 +38,12 @@ public class CredentialRequestOptionsParameters extends BaseOptionsParameters {
      */
     @Nonnull @NonnullElements private final List<PublicKeyCredentialDescriptor> allowCredentials;
 
-    
+    /**
+     * 
+     * Constructor.
+     *
+     * @param builder the builder to use for the construction
+     */
     private CredentialRequestOptionsParameters(final Builder builder) {
         super(builder.userVerificationRequirement, builder.challenge);
         Constraint.isNotNull(builder.allowCredentials, "AllowCredentials can not be null");
@@ -58,7 +63,10 @@ public class CredentialRequestOptionsParameters extends BaseOptionsParameters {
         return allowCredentials;
     }
 
-    /** Create a new builder. */
+    /**
+     * Create a new builder
+     * @return a builder
+     */
     public static IUserVerificationRequirementStage builder() {
         return new Builder();
     }
@@ -101,6 +109,11 @@ public class CredentialRequestOptionsParameters extends BaseOptionsParameters {
 
     /** Build the options.*/
     public interface IBuildStage {
+        /**
+         * Build the request options parameters
+         * 
+         * @return the parameters
+         */
         public CredentialRequestOptionsParameters build();
     }
 
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnRegistrationContext.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnRegistrationContext.java
index 36934bf..d2dc554 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnRegistrationContext.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnRegistrationContext.java
@@ -247,6 +247,8 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
      * Set the human-palatable name for the user account.
      * 
      * @param name The display name to set.
+     * 
+     * @return this
      */
     @Nonnull public BaseWebAuthnContext setDisplayName(@Nullable final String name) {
         displayName = name;
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRegistration.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRegistration.java
index 546ee0b..84e9d40 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRegistration.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRegistration.java
@@ -308,7 +308,10 @@ public class CredentialRegistration {
                 .withUserVerified(userVerified).build();
     }
 
-    /** Builder stage.*/
+    /**
+     * Builder stage
+     * @return the next stage
+     */
     public static IUserIdentityStage builder() {
         return new Builder();
     }
@@ -394,6 +397,7 @@ public class CredentialRegistration {
 
         /**
          * Build this credential registration
+         * @return a credential registration
          */
         @Nonnull public CredentialRegistration build();
     }
@@ -402,13 +406,21 @@ public class CredentialRegistration {
     @JsonPOJOBuilder(buildMethodName = "build", withPrefix = "with")
     public static final class Builder
             implements IUserIdentityStage, ITransportsStage, IRegistrationTimeStage, ICredentialStage, IBuildStage {
+        /** The users identity.*/
         @Nonnull private UserIdentity userIdentity;
+        /** The transports.*/
         @Nonnull private SortedSet<AuthenticatorTransport> transports;
+        /** The credential registration time .*/
         @Nonnull private Instant registrationTime;
+        /** The registered credential.*/
         @Nonnull private RegisteredCredential credential;
+        /** The credential's nickname.*/
         @Nullable private String credentialNickname;
+        /** Is the credential a discoverable type.*/
         @Nonnull private Optional<Boolean> discoverable;
+        /** Attestation metadata.*/
         @Nonnull private Set<MetadataBLOBPayloadEntry> attestationMetadata;
+        /** has the user been verified.*/
         private boolean userVerified;
 
         /** Constructor.*/
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/WebAuthnCredentialRepository.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/WebAuthnCredentialRepository.java
index 61f1bf8..9d36b49 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/WebAuthnCredentialRepository.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/WebAuthnCredentialRepository.java
@@ -73,7 +73,7 @@ public interface WebAuthnCredentialRepository extends CredentialRepository {
      * Get the credential belonging to the user by its credential identifier.
      * 
      * @param username the username to find the credential for
-     * @param id the identifier of the credential to find
+     * @param credentialId the identifier of the credential to find
      * 
      * @return the credential if found, otherwise an empty {@link Optional}.
      */
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractKeyRemovalInformationFromFormRequest.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractKeyRemovalInformationFromFormRequest.java
index d2db154..7c49937 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractKeyRemovalInformationFromFormRequest.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractKeyRemovalInformationFromFormRequest.java
@@ -58,6 +58,7 @@ public class ExtractKeyRemovalInformationFromFormRequest extends AbstractProfile
     /** Name of credential Id parameter. */
     @Nonnull @NotEmpty private String credentialIdParameterName;
     
+    /** A consumer for setting the credential ID back to the context.*/
     @NonnullAfterInit private BiConsumer<ProfileRequestContext, byte[]> contextSettingConsumer;
 
     /** Constructor. */
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractUsernameSearchFromFormRequest.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractUsernameSearchFromFormRequest.java
index 83d5ce4..02de66a 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractUsernameSearchFromFormRequest.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractUsernameSearchFromFormRequest.java
@@ -64,7 +64,7 @@ public class ExtractUsernameSearchFromFormRequest extends AbstractWebAuthnAction
     /**
      * Set the name of the request parameter to extract the value from.
      * 
-     * @param field field name
+     * @param parameter field name
      */
     public void setRequestParameterName(@Nonnull @NotEmpty final String parameter) {
         checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/audit/impl/AbstractWebAuthnAuditingAction.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/audit/impl/AbstractWebAuthnAuditingAction.java
index 6756a22..e494954 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/audit/impl/AbstractWebAuthnAuditingAction.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/audit/impl/AbstractWebAuthnAuditingAction.java
@@ -53,7 +53,12 @@ public abstract class AbstractWebAuthnAuditingAction<T> extends AbstractWebAuthn
     /** The Spring RequestContext to operate on. */
     @Nullable private RequestContext requestContext;
     
-    /** Constructor. */
+    /**
+     * 
+     * Constructor.
+     *
+     * @param defaultStrategy the default audit context lookup strategy
+     */
     protected AbstractWebAuthnAuditingAction(@Nonnull final Function<ProfileRequestContext,T> defaultStrategy) {
         super(defaultStrategy);
         auditContextCreationStrategy =
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebauthnClientFactory.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebauthnClientFactory.java
index c1af8be..f62a769 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebauthnClientFactory.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebauthnClientFactory.java
@@ -243,7 +243,7 @@ public class YubicoWebauthnClientFactory extends AbstractInitializableComponent
     /**
      * Set the allowable origins for this Relying Party. Overrides the origin derived from the relyingPartyId if used
      * 
-     * @param origins the origins to use
+     * @param allowedOrigins the origins to use
      */
     public synchronized void setOrigins(@Nullable final Set<String> allowedOrigins) {
         checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAction.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAction.java
index 7e19e29..42efe84 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAction.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAction.java
@@ -28,7 +28,6 @@ import com.yubico.fido.metadata.FidoMetadataService;
 
 import net.shibboleth.idp.authn.AuthnEventIds;
 import net.shibboleth.idp.plugin.authn.webauthn.client.WebAuthnAuthenticationClient;
-import net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnAuthenticationContext;
 import net.shibboleth.idp.plugin.authn.webauthn.storage.WebAuthnCredentialRepository;
 import net.shibboleth.idp.profile.AbstractProfileAction;
 import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
@@ -43,14 +42,13 @@ import net.shibboleth.shared.primitive.LoggerFactory;
  * metadata service</p>
  * 
  * <p>In addition to the work performed by {@link AbstractProfileAction}, this action also looks up
- * and makes available a WebAuthn context <T>.</p>
+ * and makes available a WebAuthn context.</p>
  * 
  * <p>WebAuthn implementations should override the {@link #doExecute(ProfileRequestContext, T)} method.</p>
  * 
  * @event {@link EventIds#INVALID_PROFILE_CTX}
  * @pre <pre>ProfileRequestContext.getSubcontext(ProfileRequestContext.class) != null</pre>
  * 
- * @param <T> the WebAuthn context to lookup
  */
 public class AbstractWebAuthnAction<T> extends AbstractProfileAction {
     
@@ -72,7 +70,12 @@ public class AbstractWebAuthnAction<T> extends AbstractProfileAction {
     /** Optional FIDO metadata service resolver.*/ 
     @Nullable private FidoMetadataService fidoMetadataService;  
     
-    /** Constructor.*/
+    /**
+     * 
+     * Constructor.
+     *
+     * @param defaultStrategy the default WebAuthn context lookup strategy to use
+     */
     protected AbstractWebAuthnAction(@Nonnull final Function<ProfileRequestContext,T> defaultStrategy) {
         webauthnContextLookupStrategy = 
                 Constraint.isNotNull(defaultStrategy, "Default WebAuthn lookup strategy can not be null");
@@ -180,11 +183,10 @@ public class AbstractWebAuthnAction<T> extends AbstractProfileAction {
     }
     
     /**
-     * Delegates to {@link #doExecute(ProfileRequestContext, WebAuthnAuthenticationContext)}. Implementations can not 
+     * Delegates to {@link #doExecute(ProfileRequestContext, Object)}. Implementations can not 
      * override this method.
      * 
      * @param profileRequestContext the current IdP profile request context
-     * @param authenticationContext the current authentication context
      */
     @Override
     protected final void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentials.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentials.java
index d721874..b7b5b0a 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentials.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentials.java
@@ -62,7 +62,7 @@ public class LookupRegisteredCredentials extends AbstractWebAuthnAction<BaseWebA
     
     /** 
      * The EventID of the event to build if no credentials are found and 
-     * <code>triggerEventOnNoCredentialsPredicate<code> evaluates to true.
+     * {@code triggerEventOnNoCredentialsPredicate} evaluates to true.
      */
     @Nonnull @NotEmpty private String noCredentialsEventId;
     
@@ -100,7 +100,7 @@ public class LookupRegisteredCredentials extends AbstractWebAuthnAction<BaseWebA
     /**
      * Set a predicate which triggers a custom event to be built if no credentials are found.
      * 
-     * @param trigger the flag to set
+     * @param predicate the flag to set
      */
     public void setTriggerEventOnNoCredentialsPredicate(@Nonnull final Predicate<ProfileRequestContext> predicate) {
         checkSetterPreconditions();
@@ -109,7 +109,7 @@ public class LookupRegisteredCredentials extends AbstractWebAuthnAction<BaseWebA
     }
     
     /**
-     * Set the EventID of the event to build if no credentials are foud and <code>triggerEventOnNoCredentials<code> 
+     * Set the EventID of the event to build if no credentials are found and {@code triggerEventOnNoCredentials} 
      * is set.
      * 
      * @param eventId the eventId to build.
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java
index 7f1242f..e844b3f 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java
@@ -69,7 +69,7 @@ public class LookupRegisteredCredentialsFromUserHandle extends AbstractWebAuthnA
     
     /** 
      * The EventID of the event to build if no credentials are found and 
-     * <code>triggerEventOnNoCredentialsPredicate<code> evaluates to true.
+     * {@code triggerEventOnNoCredentialsPredicate} evaluates to true.
      */
     @Nonnull @NotEmpty private String noCredentialsEventId;
     
@@ -107,7 +107,7 @@ public class LookupRegisteredCredentialsFromUserHandle extends AbstractWebAuthnA
     /**
      * Set a predicate which triggers a custom event to be built if no credentials are found.
      * 
-     * @param trigger the flag to set
+     * @param predicate the flag to set
      */
     public void setTriggerEventOnNoCredentialsPredicate(@Nonnull final Predicate<ProfileRequestContext> predicate) {
         checkSetterPreconditions();
@@ -116,7 +116,7 @@ public class LookupRegisteredCredentialsFromUserHandle extends AbstractWebAuthnA
     }
     
     /**
-     * Set the EventID of the event to build if no credentials are found and <code>triggerEventOnNoCredentials<code> 
+     * Set the EventID of the event to build if no credentials are found and {@code triggerEventOnNoCredentials} 
      * is set.
      * 
      * @param eventId the eventId to build.
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/metadata/FidoMetadataServiceFactory.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/metadata/FidoMetadataServiceFactory.java
index e509f19..ddb56a4 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/metadata/FidoMetadataServiceFactory.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/metadata/FidoMetadataServiceFactory.java
@@ -238,7 +238,7 @@ public class FidoMetadataServiceFactory extends AbstractIdentifiableInitializabl
      * Set the location of the local metadata blob file. If this file is specified, metadata will never be 
      * downloaded over HTTP.
      * 
-     * @param metadataBlobFile The metadataBlobFile to set.
+     * @param file The metadataBlobFile to set.
      */
     public synchronized void setMetadataBlobFile(@Nullable final Resource file) {
         checkSetterPreconditions();

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


More information about the commits mailing list