[java-idp-plugin-webauthn] branch main updated: Fix checkstyle
Phil Smart
philip.smart at jisc.ac.uk
Tue Sep 17 08:44: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=ad1556d071d041ea0977c4b9f4c6ac3a2d3ad8e8
The following commit(s) were added to refs/heads/main by this push:
new ad1556d Fix checkstyle
ad1556d is described below
commit ad1556d071d041ea0977c4b9f4c6ac3a2d3ad8e8
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Tue Sep 17 09:44:30 2024 +0100
Fix checkstyle
---
.../webauthn/admin/CredentialCreationOptionsParameters.java | 4 ++--
.../idp/plugin/authn/webauthn/authn/AssertionResult.java | 2 +-
.../authn/webauthn/context/WebAuthnRegistrationContext.java | 12 +++++++-----
.../webauthn/storage/EnhancedCredentialRegistration.java | 2 +-
.../authn/webauthn/admin/impl/StorePublicKeyCredential.java | 4 ++--
.../admin/impl/UpdateAdminContextWithC14nPrincipal.java | 6 +++---
.../client/impl/YubicoWebAuthnAuthenticationClient.java | 2 +-
.../authn/webauthn/impl/ValidateWebAuthnAssertion.java | 4 ++--
8 files changed, 19 insertions(+), 17 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 6ad7887..1533dd0 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
@@ -385,8 +385,8 @@ public final class CredentialCreationOptionsParameters extends BaseOptionsParame
}
@Override
- public IResidentKeyRequirementStage withDisplayName(@Nonnull final String name) {
- displayName = name;
+ public IResidentKeyRequirementStage withDisplayName(@Nonnull final String dispName) {
+ displayName = dispName;
return this;
}
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 663af9a..2258b69 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
@@ -171,7 +171,7 @@ public final class AssertionResult {
*/
public interface IUserVerifiedStage {
/**
- * Set the userVerified flag
+ * Set the userVerified flag.
*
* @param uv the user verified flag
* @return the next stage
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 9e45f2f..ec4d421 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
@@ -85,7 +85,9 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
* Set the WebAuthn user.name of the user to use during credential registration. A human-palatable
* identifier for a user account. It is intended only for display.
*
- * @param username The WebAuthn user.name to set.
+ * @param webAuthnName The WebAuthn user.name to set.
+ *
+ * @return this context
*/
@Nonnull public BaseWebAuthnContext setName(@Nullable final String webAuthnName) {
name = webAuthnName;
@@ -286,12 +288,12 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
/**
* Set the human-palatable name for the user account.
*
- * @param name The display name to set.
+ * @param dispName The display name to set.
*
- * @return this
+ * @return this context
*/
- @Nonnull public BaseWebAuthnContext setDisplayName(@Nullable final String name) {
- displayName = name;
+ @Nonnull public BaseWebAuthnContext setDisplayName(@Nullable final String dispName) {
+ displayName = dispName;
return this;
}
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/EnhancedCredentialRegistration.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/EnhancedCredentialRegistration.java
index e6f6edf..985a320 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/EnhancedCredentialRegistration.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/EnhancedCredentialRegistration.java
@@ -35,7 +35,7 @@ import net.shibboleth.shared.logic.Constraint;
* An ephemeral wrapper class that holds a {@link CredentialRegistration} and any associated metadata. Created and
* used during registration or authentication and then discarded. This is not meant to be serialised or stored.
*/
-public class EnhancedCredentialRegistration {
+public final class EnhancedCredentialRegistration {
/** The wrapped credential registration.*/
@Nonnull private final CredentialRegistration credentialRegistration;
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/StorePublicKeyCredential.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/StorePublicKeyCredential.java
index abb34ae..8acca09 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/StorePublicKeyCredential.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/StorePublicKeyCredential.java
@@ -77,7 +77,7 @@ public class StorePublicKeyCredential extends AbstractWebAuthnAuditingAction<Web
}
}
- // Checkstyle: MethodLength OFF
+ // Checkstyle: MethodLength|CyclomaticComplexity OFF
@Override
protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
@Nonnull final WebAuthnRegistrationContext context) {
@@ -176,7 +176,7 @@ public class StorePublicKeyCredential extends AbstractWebAuthnAuditingAction<Web
}
- // Checkstyle: MethodLength ON
+ // Checkstyle: MethodLength|CyclomaticComplexity ON
}
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/UpdateAdminContextWithC14nPrincipal.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/UpdateAdminContextWithC14nPrincipal.java
index 29e9bd3..8ae569f 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/UpdateAdminContextWithC14nPrincipal.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/UpdateAdminContextWithC14nPrincipal.java
@@ -33,9 +33,9 @@ import net.shibboleth.shared.primitive.LoggerFactory;
/**
* A WebAuthn management action that sets the principal name from the SubjectCanonicalizationContext back onto the
- * WebAuthn context as the search username. It then removes the SubjectCanonicalizationContext from the parent, this can
- * help avoid conflicting/confusing situations where a new c14n context will be created by subsequent authentication
- * steps.
+ * WebAuthn context as the search username. It then removes the SubjectCanonicalizationContext from the parent, this
+ * can help avoid conflicting/confusing situations where a new c14n context will be created by subsequent
+ * authentication steps.
*
* @pre <pre>ProfileRequestContext.getSubcontext(WebAuthnManagementContext.class) != null</pre>
* @post <pre>ProfileRequestContext.getSubcontext(WebAuthnManagementContext.class).getSearchUsername() != null</pre>
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java
index 69e6f3c..2346617 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java
@@ -121,7 +121,7 @@ public class YubicoWebAuthnAuthenticationClient implements WebAuthnAuthenticatio
.build();
// Request Credential Properties extension, allows knowledge if key is resident or passkey
- RegistrationExtensionInputs extensions;
+ final RegistrationExtensionInputs extensions;
if (creationOptions.isEnableCredProperties()) {
extensions = RegistrationExtensionInputs.builder().credProps().build();
} else {
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 8bee559..8fddc18 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
@@ -202,8 +202,8 @@ public class ValidateWebAuthnAssertion extends AbstractAuditingValidationAction
updateSignatureCount(result.getUsername(), assertion);
}
- log.info("{} WebAuthn authentication succeeded for '{}', authenticator verified the user '{}'",getLogPrefix(),
- result.getUsername(), result.isUserVerified());
+ log.info("{} WebAuthn authentication succeeded for '{}', authenticator verified the user '{}'",
+ getLogPrefix(), result.getUsername(), result.isUserVerified());
// Add the username and user.id that matched the credential from the result back to the context.
// The result is authorative.
context.setUsername(result.getUsername());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list