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

Phil Smart philip.smart at jisc.ac.uk
Fri Jan 26 17:52:03 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=80be37ca0f2757b38a9992cf7d4e6d96e0e056c5

The following commit(s) were added to refs/heads/main by this push:
     new 80be37c  Fix Javadoc errors
80be37c is described below

commit 80be37ca0f2757b38a9992cf7d4e6d96e0e056c5
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Jan 26 17:52:00 2024 +0000

    Fix Javadoc errors
---
 .../admin/CredentialCreationOptionsParameters.java | 62 ++++++++++++++++++----
 .../authn/CredentialRequestOptionsParameters.java  | 23 ++++++--
 .../client/WebAuthnAuthenticationClient.java       |  8 +--
 .../webauthn/context/BaseWebAuthnContext.java      | 13 +++++
 .../context/WebAuthnAuthenticationContext.java     | 18 +++++--
 .../context/WebAuthnPublicKeyCredentialRecord.java | 49 -----------------
 .../context/WebAuthnRegistrationContext.java       | 31 ++++++++---
 .../impl/AbstractWebAuthnRegistrationAction.java   |  2 +-
 .../webauthn/admin/impl/GenerateUserHandle.java    |  2 +-
 .../client/impl/YubicoWebauthnClientFactory.java   |  2 +-
 .../impl/AbstractWebAuthnAuthenticationAction.java |  2 +-
 .../webauthn/impl/AbstractWebAuthnBaseAction.java  |  2 +-
 .../PopulateWebAuthnAuthenticationContext.java     |  4 +-
 .../webauthn/impl/ValidateWebAuthnAssertion.java   |  4 +-
 .../IdPStorageServiceCredentialRespository.java    |  4 +-
 ...bauthnPublicKeyCredentialStorageSerializer.java | 59 --------------------
 16 files changed, 139 insertions(+), 146 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 8029a59..0e1a7ae 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
@@ -123,7 +123,11 @@ public class CredentialCreationOptionsParameters extends BaseOptionsParameters {
     }
 
 
-    /** Get a new builder.*/
+    /**
+     * Get a new builder.
+     * 
+     * @return the builder
+     */
     public static IUserVerificationRequirementStage builder() {
         return new Builder();
     }
@@ -131,7 +135,12 @@ public class CredentialCreationOptionsParameters extends BaseOptionsParameters {
 
     /** Stage interface.*/
     public interface IUserVerificationRequirementStage {
-        /** Does the authentication/registration require user verification.*/
+        /** 
+         * Does the authentication/registration require user verification.
+         * 
+         * @param userVerificationRequirement the requirement
+         * @return the next stage
+         */
         public IChallengeStage withUserVerificationRequirement(
                 @Nonnull final UserVerificationRequirement userVerificationRequirement);
     }
@@ -139,14 +148,24 @@ public class CredentialCreationOptionsParameters extends BaseOptionsParameters {
 
     /** Stage interface.*/
     public interface IChallengeStage {
-        /** The challenge sent to the authenticator in registration ceremonies.*/
+        /** 
+         * The challenge sent to the authenticator in registration ceremonies.
+         * 
+         * @param challenge the challenge
+         * @return the next stage
+         */
         public IExcludeCredentialsStage withChallenge(@Nonnull final byte[] challenge);
     }
 
 
     /** Stage interface.*/
     public interface IExcludeCredentialsStage {
-        /** Credentials that have already been registered with the IdP.*/
+        /**
+         * Credentials that have already been registered with the IdP.
+         * 
+         * @param excludeCredentials the credentials to exclude
+         * @return the next stage
+         */
         public IUsernameStage withExcludeCredentials(
                 @Nonnull final Set<PublicKeyCredentialDescriptor> excludeCredentials);
     }
@@ -154,14 +173,24 @@ public class CredentialCreationOptionsParameters extends BaseOptionsParameters {
 
     /** Stage interface.*/
     public interface IUsernameStage {
-        /** The username of the user that is the subject of this authentication.*/
+        /**
+         * The username of the user that is the subject of this authentication.
+         * 
+         * @param username the username
+         * @return the next stage
+         */
         public IResidentKeyRequirementStage withUsername(@Nonnull @NotEmpty final String username);
     }
 
 
     /** Stage interface.*/
     public interface IResidentKeyRequirementStage {
-        /** The requirement on registering a ResidentKey. Also know as a discoverable credential.*/
+        /**
+         * The requirement on registering a ResidentKey. Also know as a discoverable credential.
+         * 
+         * @param residentKeyRequirement the requirement
+         * @return the next stage
+         */
         public IUserHandleStage withResidentKeyRequirement(
                 @Nonnull final ResidentKeyRequirement residentKeyRequirement);
     }
@@ -169,17 +198,32 @@ public class CredentialCreationOptionsParameters extends BaseOptionsParameters {
 
     /** Stage interface.*/
     public interface IUserHandleStage {
-        /** The userhandle supplied to the authenticator during registration. As generated by the IdP.*/
+        /**
+         * The userhandle supplied to the authenticator during registration. As generated by the IdP.
+         * 
+         * @param userHandle the user handle
+         * @return the next stage
+         */
         public IBuildStage withUserHandle(@Nonnull final byte[] userHandle);
     }
 
 
     /** Stage interface.*/
     public interface IBuildStage {
-        /** The AuthenticatorAttachment requirement. {@code null} would represent either possibility.*/
+        /**
+         * The AuthenticatorAttachment requirement. {@code null} would represent either possibility.
+         * 
+         * @param authenticatorAttachment the attachment
+         * 
+         * @return the next stage
+         */
         public IBuildStage withAuthenticatorAttachment(@Nullable AuthenticatorAttachment authenticatorAttachment);
 
-        /** Build the options.*/
+        /**
+         * Build the options.
+         * 
+         * @return the options
+         */
         public CredentialCreationOptionsParameters 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 86972f5..de1ce79 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
@@ -65,20 +65,37 @@ public class CredentialRequestOptionsParameters extends BaseOptionsParameters {
 
     /** Stage interface.*/
     public interface IUserVerificationRequirementStage {
-        /** Does the authentication/registration require user verification.*/
+        /**
+         * Does the authentication/registration require user verification.
+         * 
+         * @param userVerificationRequirement the requirement
+         * 
+         * @return the next stage
+         */
         public IChallengeStage withUserVerificationRequirement(
                 @Nonnull final UserVerificationRequirement userVerificationRequirement);
     }
 
     /** Stage interface.*/
     public interface IChallengeStage {
-        /** The challenge sent to the authenticator in authentication ceremonies.*/
+        /**
+         * The challenge sent to the authenticator in authentication ceremonies.
+         * 
+         * @param challenge the challenge
+         * @return the next stage
+         */
         public IAllowCredentialsStage withChallenge(@Nonnull final byte[] challenge);
     }
 
     /** Stage interface.*/
     public interface IAllowCredentialsStage {
-        /** Credentials that have already been registered with the IdP.**/
+        /**
+         * Credentials that have already been registered with the IdP.
+         * 
+         * @param allowCredentials the credentials to allow
+         * 
+         * @return the next stage
+         */
         public IBuildStage withAllowCredentials(@Nonnull final List<PublicKeyCredentialDescriptor> allowCredentials);
     }
 
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/WebAuthnAuthenticationClient.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/WebAuthnAuthenticationClient.java
index ed95c88..97025d9 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/WebAuthnAuthenticationClient.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/WebAuthnAuthenticationClient.java
@@ -43,8 +43,8 @@ public interface WebAuthnAuthenticationClient {
       *         
       */
      @Nonnull PublicKeyCredentialRequestOptions createAuthenticationRequest(
-             @Nonnull final CredentialRequestOptionsParameters requestParams) 
-                     throws WebAuthnAuthenticationClientException;
+             @Nonnull final CredentialRequestOptionsParameters requestParams)
+                         throws WebAuthnAuthenticationClientException;
      
      /**
       * Create a PublicKeyCredentialCreationOptions for the WebAuthn 'create' call to generate a registration 
@@ -63,14 +63,14 @@ public interface WebAuthnAuthenticationClient {
      /**
       * Validate the Authenticator Assertion Response from an authentication request.
       * 
-      * @param usernmae ....TODO
+      * @param username ....TODO
       * @param userHandle ....TODO
       * @param publicKeyCredentialRequestOptions the options used when generating an assertion for authentication.
       * @param authenticatorAssertionResponse the assertion response.
       * 
       * @return an assertion result if the assertion was valid.
       * 
-      * @throws WebAuthnAuthenticationClientException if the assertion is not valid
+      * @throws AssertionFailureException if the assertion is not valid
       */
      //TODO would need our own AssertionResult to make this usuable beyond Yubico.
      AssertionResult validateAuthenticatorAssertionResponse(@Nullable final String username, 
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/BaseWebAuthnContext.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/BaseWebAuthnContext.java
index fc63106..a85b26f 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/BaseWebAuthnContext.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/BaseWebAuthnContext.java
@@ -83,6 +83,8 @@ public class BaseWebAuthnContext extends BaseContext {
      * Set the credentials that have already been registered with the IdP.
      * 
      * @param credentials the set of credentials
+     * 
+     * @return this context
      */
     @Nonnull public BaseWebAuthnContext setExistingCredentials(
             @Nullable final Collection<CredentialRegistration> credentials) {
@@ -112,6 +114,13 @@ public class BaseWebAuthnContext extends BaseContext {
         return serverChallenge;
     }
     
+    /**
+     * Get the server challenge base64 encoded.
+     * 
+     * @return the challenge base64 encoded
+     * 
+     * @throws EncodingException on error encoding the challenge.
+     */
     //TODO throw in a context, this could be null (which is bad here?)
     @SuppressWarnings("null")
     @Nullable public String getServerChallengeBase64() throws EncodingException {
@@ -137,6 +146,8 @@ public class BaseWebAuthnContext extends BaseContext {
      * Set the user handle used to map public key credentials to user accounts. Maximum 64 bytes 
      * 
      * @param handle The userHandle to set.
+     * 
+     * @return this context
      */
     @Nonnull public BaseWebAuthnContext setUserHandle(@Nonnull final byte[] handle) {
         Constraint.isNotEmpty(handle,"UserHandle can not be null or empty");
@@ -159,6 +170,8 @@ public class BaseWebAuthnContext extends BaseContext {
      * Set the user verification requirement. 
      * 
      * @param requirement The user verification requirement to set.
+     * 
+     * @return this context
      */
     @Nonnull public BaseWebAuthnContext setUserVerificationRequirement(
             @Nullable final UserVerificationRequirement requirement) {
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnAuthenticationContext.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnAuthenticationContext.java
index a6b95a6..e5b026e 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnAuthenticationContext.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnAuthenticationContext.java
@@ -43,6 +43,8 @@ public final class WebAuthnAuthenticationContext extends BaseWebAuthnContext {
      * Set the credential Id.
      * 
      * @param id the credential Id.
+     * 
+     * @return this context
      */
     public WebAuthnAuthenticationContext setCredentialId(@Nonnull final byte[] id) {
         credentialId = Constraint.isNotNull(id, "Credential ID can not be null");
@@ -53,7 +55,9 @@ public final class WebAuthnAuthenticationContext extends BaseWebAuthnContext {
     /**
      * Set the public key credential request options for authentication.
      * 
-     * @param the credential request options to set.
+     * @param options the request options to set.
+     * 
+     * @return this context
      */
     public WebAuthnAuthenticationContext setPublicKeyCredentialRequestOptions(
             @Nullable final PublicKeyCredentialRequestOptions options) {
@@ -74,6 +78,8 @@ public final class WebAuthnAuthenticationContext extends BaseWebAuthnContext {
      * Set the raw authenticator assertion response, returned after the authentication ceremony.
      *  
      * @param assertion The authenticator assertion response to set.
+     * 
+     * @return this context
      */
     public WebAuthnAuthenticationContext setAuthenticatorAssertionResponse(
             @Nullable final PublicKeyCredential<AuthenticatorAssertionResponse, ClientAssertionExtensionOutputs> 
@@ -94,14 +100,20 @@ public final class WebAuthnAuthenticationContext extends BaseWebAuthnContext {
         
     
     /**
-     * @return Returns the publicKeyCredentialRequestOptionsJSON.
+     * Get the public key credential request options to use in JSON format.
+     * 
+     * @return the publicKeyCredentialRequestOptions in JSON format.
      */
     public String getPublicKeyCredentialRequestOptionsJSON() {
         return publicKeyCredentialRequestOptionsJSON;
     }
     
     /**
-     * @param publicKeyCredentialRequestOptionsJSON The publicKeyCredentialRequestOptionsJSON to set.
+     * Set the public key credential request options to use in JSON format.
+     * 
+     * @param requestOptionsJSON The options to set.
+     * 
+     * @return this context
      */
     public WebAuthnAuthenticationContext setPublicKeyCredentialRequestOptionsJSON(
             @Nullable final String requestOptionsJSON) {
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnPublicKeyCredentialRecord.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnPublicKeyCredentialRecord.java
deleted file mode 100644
index 628cac8..0000000
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnPublicKeyCredentialRecord.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package net.shibboleth.idp.plugin.authn.webauthn.context;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-import javax.annotation.concurrent.ThreadSafe;
-
-import net.shibboleth.shared.logic.Constraint;
-
- at Immutable
- at ThreadSafe
-//TODO does this look like a storage record?
-public final class WebAuthnPublicKeyCredentialRecord {
-    
-    /** The  credential public key encoded in COSE_Key format.*/
-    @Nonnull private final byte[] publicKey;
-    
-    /** The credential identifier generated by the authenticator.*/
-    @Nullable private final byte[] credentialId;
-    
-    /** 
-     * Constructor.
-     *
-     * @param key the public key to store.
-     */
-    public WebAuthnPublicKeyCredentialRecord(@Nonnull final byte[] key, @Nonnull final byte[] credId) {
-        publicKey = Constraint.isNotNull(key, "Public key can not be null");
-        credentialId = Constraint.isNotNull(credId, "Credential ID can not be null");
-    }
-    
-    /**
-     * Get the COSE_Key formatted public key.
-     * 
-     * @return the public key in COSE_Key format.
-     */
-    @Nullable public byte[] getPublicKey() {
-        return publicKey;
-    }
-    
-    /**
-     * Get the credential ID.
-     * 
-     * @return the credential ID.
-     */
-    @Nullable public byte[] getCredentialId() {
-        return credentialId;
-    }
-
-}
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 aee6d36..dccbb42 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
@@ -62,9 +62,12 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
     /**
      * Set the AuthenticatorAttachment requirement. {@code null} would represent either possibility.
      * 
-     * @param authenticatorAttachmentRequirement The authenticatorAttachmentRequirement to set.
+     * @param requirement The authenticatorAttachmentRequirement to set.
+     * 
+     * @return this context
      */
-    public WebAuthnRegistrationContext setAuthenticatorAttachmentRequirement(@Nullable final AuthenticatorAttachment requirement) {
+    public WebAuthnRegistrationContext setAuthenticatorAttachmentRequirement(
+            @Nullable final AuthenticatorAttachment requirement) {
         authenticatorAttachmentRequirement = requirement;
         return this;
     }
@@ -93,7 +96,9 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
     /**
      * Set the attestation response as a result of creating a new credential.
      * 
-     * @param authenticatorAttestationResponse The authenticatorAttestationResponse to set.
+     * @param attestation The authenticatorAttestationResponse to set.
+     * 
+     * @return this context
      */
     @Nonnull public WebAuthnRegistrationContext setAuthenticatorAttestationResponse(
             @Nullable final PublicKeyCredential<AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs> 
@@ -106,6 +111,8 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
      * Set the options used to create public key credentials. 
      * 
      * @param options The publicKeyCredentialCreationOptions to set.
+     * 
+     * @return this context
      */
     @Nonnull public WebAuthnRegistrationContext setPublicKeyCredentialCreationOptions(
             @Nullable final PublicKeyCredentialCreationOptions options) {
@@ -116,7 +123,7 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
     /**
      * Get the options used to create public key credentials.
      * 
-     * @return the publicKeyCredentialCreationOptions.
+     * @return the publicKeyCredentialCreationOptions
      */
     @Nullable public PublicKeyCredentialCreationOptions getPublicKeyCredentialCreationOptions() {
         return publicKeyCredentialCreationOptions;
@@ -126,7 +133,9 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
      * Set the registration result which is the result of registration of a new key pair generated
      * by the authenticator.
      * 
-     * @param registrationResult The registrationResult to set.
+     * @param result The registrationResult to set.
+     * 
+     * @return this context
      */
     @Nonnull public WebAuthnRegistrationContext setRegistrationResult(@Nullable final RegistrationResult result) {
         registrationResult = result;
@@ -155,7 +164,9 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
     /**
      * Set the credential public key registration options in JSON format.
      * 
-     * @param publicKeyCredentialCreationOptionsJSON The publicKeyCredentialCreationOptions in JSON to set.
+     * @param optionsJSON The publicKeyCredentialCreationOptions in JSON to set.
+     * 
+     * @return this context
      */
     @Nonnull public WebAuthnRegistrationContext setPublicKeyCredentialCreationOptionsJSON(final String optionsJSON) {
         publicKeyCredentialCreationOptionsJSON = optionsJSON;
@@ -167,6 +178,8 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
      * Set the display friendly nickname for this credential.
      * 
      * @param nickname The credential nickname to set.
+     * 
+     * @return this context
      */
     @Nonnull public WebAuthnRegistrationContext setCredentialNickname(@Nullable final String nickname) {
         credentialNickname = nickname;
@@ -185,7 +198,9 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
     /**
      * Set the ID of the credential that is going to be removed.
      * 
-     * @param credentialId the credential identifier
+     * @param id the credential identifier
+     * 
+     * @return this context
      */
     @Nonnull public WebAuthnRegistrationContext setCredentialIdToRemove(@Nullable final byte[] id) {
         credentialIdToRemove = id;
@@ -205,6 +220,8 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
      * Set the ResidentKey requirement. Also know as a discoverable credential.
      * 
      * @param requirement The resident key requirement to set.
+     * 
+     * @return this context
      */
     @Nonnull public WebAuthnRegistrationContext setResidentKeyRequirement(
             @Nullable final ResidentKeyRequirement requirement) {
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AbstractWebAuthnRegistrationAction.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AbstractWebAuthnRegistrationAction.java
index 0b10ca0..f24441c 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AbstractWebAuthnRegistrationAction.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AbstractWebAuthnRegistrationAction.java
@@ -74,7 +74,7 @@ public abstract class AbstractWebAuthnRegistrationAction extends AbstractProfile
     /**
      * Set the WebAuthn client used to handle registration and authentication ceremonies.
      * 
-     * @param webAuthnClient The webauthnClient to set.
+     * @param client The webauthnClient to set.
      */
     public void setWebAuthnClient(@Nonnull final WebAuthnAuthenticationClient client) {
         checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/GenerateUserHandle.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/GenerateUserHandle.java
index 87de061..8df48a5 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/GenerateUserHandle.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/GenerateUserHandle.java
@@ -86,7 +86,7 @@ public class GenerateUserHandle extends AbstractWebAuthnRegistrationAction {
      * Default User Handle generator that generates a 64 byte randomized UserHandle (must be at least 32 bytes long). 
      * Returns {@code null} iff one can not be generated.
      * 
-     * </p>This could contain some form of state if required, but must not contain retrievable PII.</p>
+     * <p>This could contain some form of state if required, but must not contain retrievable PII.</p>
      */
     private static final class DefaultUserHandleGenerator implements Function<ProfileRequestContext, byte[]>{
         
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 f487255..e7e8859 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
@@ -177,7 +177,7 @@ public class YubicoWebauthnClientFactory extends AbstractInitializableComponent
     /**
      * Set the relying party name.
      * 
-     * @param relyingPartyIdentifier the relying party name.
+     * @param name the relying party name.
      */
     public synchronized void setRelyingPartyName(@Nonnull final String name) {
         checkSetterPreconditions(); 
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAuthenticationAction.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAuthenticationAction.java
index 8c48cdd..61af477 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAuthenticationAction.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnAuthenticationAction.java
@@ -69,7 +69,7 @@ public abstract class AbstractWebAuthnAuthenticationAction extends AbstractAuthe
     /**
      * Set the WebAuthn client used to handle registration and authentication ceremonies.
      * 
-     * @param webAuthnClient The webauthnClient to set.
+     * @param client The webauthnClient to set.
      */
     public void setWebAuthnClient(@Nonnull final WebAuthnAuthenticationClient client) {
         checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnBaseAction.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnBaseAction.java
index 6751de8..884cb34 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnBaseAction.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/AbstractWebAuthnBaseAction.java
@@ -76,7 +76,7 @@ public abstract class AbstractWebAuthnBaseAction extends AbstractProfileAction {
     /**
      * Set the WebAuthn client used to handle registration and authentication ceremonies.
      * 
-     * @param webAuthnClient The webauthnClient to set.
+     * @param client The webauthnClient to set.
      */
     public void setWebAuthnClient(@Nonnull final WebAuthnAuthenticationClient client) {
         checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/PopulateWebAuthnAuthenticationContext.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/PopulateWebAuthnAuthenticationContext.java
index 0544080..d98749e 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/PopulateWebAuthnAuthenticationContext.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/PopulateWebAuthnAuthenticationContext.java
@@ -31,7 +31,7 @@ import net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnAuthenticationCo
 import net.shibboleth.shared.primitive.LoggerFactory;
 
 /**
- * An action to create (or lookup) and populate the {@link WebauthnAuthenticationContext} 
+ * An action to create (or lookup) and populate the {@link WebAuthnAuthenticationContext} 
  * with the ... FIXME appropriate for this request. 
  * 
  * @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
@@ -45,7 +45,7 @@ public class PopulateWebAuthnAuthenticationContext extends AbstractAuthenticatio
     /** Class logger. */
     @Nonnull private final Logger log = LoggerFactory.getLogger(PopulateWebAuthnAuthenticationContext.class);
     
-    /** Strategy used to locate or create the {@link WebauthnAuthenticationContext} to populate. */
+    /** Strategy used to locate or create the {@link WebAuthnAuthenticationContext} to populate. */
     @Nonnull 
     private final Function<ProfileRequestContext,WebAuthnAuthenticationContext> webauthnAuthContextCreationStrategy;
     
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/ValidateWebAuthnAssertion.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/ValidateWebAuthnAssertion.java
index f859c07..2165d30 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/ValidateWebAuthnAssertion.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/ValidateWebAuthnAssertion.java
@@ -31,8 +31,6 @@ import net.shibboleth.shared.primitive.LoggerFactory;
 
 /**
  * An action that validates a WebAuthn Authenticator Assertion that results from a call to 'get' (authentication).
- * 
- * @see https://w3c.github.io/webauthn/#sctn-verifying-assertion
  */
 public class ValidateWebAuthnAssertion extends AbstractValidationAction {
     
@@ -73,7 +71,7 @@ public class ValidateWebAuthnAssertion extends AbstractValidationAction {
     /**
      * Set the WebAuthn client used to handle registration and authentication ceremonies.
      * 
-     * @param webAuthnClient The webauthnClient to set.
+     * @param client The webauthnClient to set.
      */
     public void setWebAuthnClient(@Nonnull final WebAuthnAuthenticationClient client) {
         checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRespository.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRespository.java
index 585b688..4ca7365 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRespository.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRespository.java
@@ -83,7 +83,7 @@ public class IdPStorageServiceCredentialRespository extends AbstractIdentifiable
     /**
      * Set the storage service to store registered credentials. 
      * 
-     * @param storageService the storageService to set.
+     * @param service the storageService to set.
      */
     public void setStorageService(@Nonnull final StorageService service) {
         checkSetterPreconditions();
@@ -105,7 +105,7 @@ public class IdPStorageServiceCredentialRespository extends AbstractIdentifiable
     /**
      * Set the storage service serializer to handle {@link CredentialRegistration}s. 
      * 
-     * @param serializer the serializer to set.
+     * @param storageSerializer the serializer to set.
      */
     public void setSerializer(@Nonnull final StorageSerializer<Set<CredentialRegistration>> storageSerializer) {
         checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/WebauthnPublicKeyCredentialStorageSerializer.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/WebauthnPublicKeyCredentialStorageSerializer.java
deleted file mode 100644
index 238924c..0000000
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/WebauthnPublicKeyCredentialStorageSerializer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.webauthn.storage.impl;
-
-import java.io.IOException;
-
-import javax.annotation.Nonnull;
-
-import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.binary.Hex;
-import org.opensaml.storage.StorageSerializer;
-import org.slf4j.Logger;
-
-import net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnPublicKeyCredentialRecord;
-import net.shibboleth.shared.component.AbstractInitializableComponent;
-import net.shibboleth.shared.primitive.LoggerFactory;
-
-
-/**
- * Serialize the WebauthnPublicKeyCredentialRecord to a string using Hex encoding.
- */
-public class WebauthnPublicKeyCredentialStorageSerializer extends AbstractInitializableComponent 
-    implements StorageSerializer<WebAuthnPublicKeyCredentialRecord> {
-    
-    /** Class logger. */
-    @Nonnull private final Logger log = LoggerFactory.getLogger(CredentialRegistrationSerializer.class);
-
-    @Override
-    public String serialize(final WebAuthnPublicKeyCredentialRecord instance) throws IOException {
-        return Hex.encodeHexString(instance.getPublicKey())+"|"+Hex.encodeHexString(instance.getCredentialId());
-    }
-
-    @Override
-    public WebAuthnPublicKeyCredentialRecord deserialize(final long version, final String context, final String key, final String value,
-            final Long expiration) throws IOException {
-        try {
-            //FIXME what about nulls etc.
-            log.debug("Value {}",value);
-            final String[] components = value.split("\\|");
-            log.debug("Split pk cred {}:{}",components[0],components[1]);
-            return new WebAuthnPublicKeyCredentialRecord(Hex.decodeHex(components[0]),Hex.decodeHex(components[1]));
-        } catch (final DecoderException e) {
-           throw new IOException("Error converting public key hex to bytes",e);
-        }
-    }
-
-}

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


More information about the commits mailing list