[java-idp-plugin-webauthn] branch main updated: Add since tags and minor cleanup
Phil Smart
philip.smart at jisc.ac.uk
Wed Mar 5 12:00:15 UTC 2025
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=2977be22d75f588403cf113ebe0885673ee963e1
The following commit(s) were added to refs/heads/main by this push:
new 2977be2 Add since tags and minor cleanup
2977be2 is described below
commit 2977be22d75f588403cf113ebe0885673ee963e1
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Mar 5 12:00:11 2025 +0000
Add since tags and minor cleanup
---
.../idp/plugin/authn/webauthn/context/BaseWebAuthnContext.java | 2 +-
.../idp/plugin/authn/webauthn/context/WebAuthnGuardContext.java | 4 ++--
.../idp/plugin/authn/webauthn/context/WebAuthnManagementContext.java | 4 ++++
.../plugin/authn/webauthn/context/WebAuthnRegistrationContext.java | 4 ++++
.../idp/plugin/authn/webauthn/storage/CredentialRecord.java | 4 ++++
.../idp/plugin/authn/webauthn/admin/impl/AddNicknameRequired.java | 2 +-
.../impl/ExtractPublicKeyCredentialAttestationFromFormRequest.java | 2 +-
.../webauthn/admin/impl/RequireStrongFreshAuthnAccessPredicate.java | 4 ++--
.../idp/plugin/authn/webauthn/impl/CheckCredentialPolicy.java | 2 +-
.../webauthn/impl/CheckUserHandleExistsIfNoAllowCredentials.java | 4 +---
.../plugin/authn/webauthn/impl/DefaultUserHandleLookupStrategy.java | 2 ++
.../idp/plugin/authn/webauthn/impl/ValidateWebAuthnAssertion.java | 4 +++-
.../shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm | 4 ++--
13 files changed, 28 insertions(+), 14 deletions(-)
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 d3c4214..e932098 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,7 +83,7 @@ public class BaseWebAuthnContext extends BaseContext {
*/
public boolean isWebAuthnAvailable() {
if (!credentialsSet) {
- // return true if we do not know the user has no credentials yet, as a guard. Could also use a null
+ // return true if we do not know the user doesn't have credentials yet, as a guard. Could also use a null
// collection as signal, but this boolean has a clearer meaning.
return true;
}
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnGuardContext.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnGuardContext.java
index 044d7c5..7252df2 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnGuardContext.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnGuardContext.java
@@ -19,8 +19,8 @@ import javax.annotation.Nonnull;
import org.opensaml.messaging.context.BaseContext;
/**
- * A context to hold signals about the type of authentication performed. For example, was authn sufficient for
- * accessing the WebAuthn credential registration flow.
+ * A context to hold signals about the type of authentication performed. For example, is the authentication performed
+ * sufficient for accessing the WebAuthn credential registration flow.
*
* <p>Use of this context is optional and determined by the deployer.</p>
*
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnManagementContext.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnManagementContext.java
index 5de6279..9336374 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnManagementContext.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/context/WebAuthnManagementContext.java
@@ -100,6 +100,8 @@ public class WebAuthnManagementContext extends BaseContext {
* Gets the raw username entered by the admin to search for.
*
* @return the raw username entered by the admin
+ *
+ * @since 1.1.0
*/
@Nullable public String getRawSearchUsername() {
return rawSearchUsername;
@@ -111,6 +113,8 @@ public class WebAuthnManagementContext extends BaseContext {
* @param name the raw username entered by the admin
*
* @return this context
+ *
+ * @since 1.1.0
*/
@Nonnull public WebAuthnManagementContext setRawSearchUsername(@Nullable final String name) {
rawSearchUsername = name;
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 1f3975c..143a64f 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
@@ -87,6 +87,8 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
* Is nickname collection required or not. The nickname is used for display purposes only.
*
* @return true if the nickname is required, false otherwise.
+ *
+ * @since 1.1.0
*/
public boolean isNicknameRequired() {
return nicknameRequired;
@@ -96,6 +98,8 @@ public final class WebAuthnRegistrationContext extends BaseWebAuthnContext {
* Set if nickname collection is required or not. The nickname is used for display purposes only.
*
* @param flag the flag to set
+ *
+ * @since 1.1.0
*/
public BaseWebAuthnContext setNicknameRequired(final boolean flag) {
nicknameRequired = flag;
diff --git a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRecord.java b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRecord.java
index ae78f6d..9d2d18e 100644
--- a/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRecord.java
+++ b/webauthn-api/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/CredentialRecord.java
@@ -211,6 +211,8 @@ public final class CredentialRecord {
* Get the time the credential was last used for authentication
*
* @return the last used time of the credential.
+ *
+ * @since 1.1.0
*/
@JsonGetter("lastUsedTime")
public Instant getLastUsedTime() {
@@ -423,6 +425,8 @@ public final class CredentialRecord {
*
* @param time the time the credential was last used to authenticate.
* @return the next builder stage
+ *
+ * @since 1.1.0
*/
@Nonnull public IBuildStage withLastUsedTime(Instant time);
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddNicknameRequired.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddNicknameRequired.java
index 4138df7..d5431cb 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddNicknameRequired.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddNicknameRequired.java
@@ -31,7 +31,7 @@ import net.shibboleth.shared.logic.PredicateSupport;
import net.shibboleth.shared.primitive.LoggerFactory;
/**
- * An action that sets onto the context if nickname collection is required or not. The nickname is only used for display
+ * An action that sets onto the context if nickname collection is required. The nickname is only used for display
* purposes.
*
* @pre <pre>ProfileRequestContext.getSubcontext(WebAuthnRegistrationContext.class) != null</pre>
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractPublicKeyCredentialAttestationFromFormRequest.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractPublicKeyCredentialAttestationFromFormRequest.java
index e43e56e..0903471 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractPublicKeyCredentialAttestationFromFormRequest.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ExtractPublicKeyCredentialAttestationFromFormRequest.java
@@ -40,7 +40,7 @@ import net.shibboleth.shared.primitive.StringSupport;
/**
* An action that extracts the PublicKeyCredential containing the authenticator attestation response from the incoming
* HTTP request. Also extracts the user entered credential nickname. Failure to find the attestation results in an
- * a non-proceed event. Similarly, if a nickname is required and not provided, it results in a non-proceed event..
+ * a non-proceed event. Similarly, if a nickname is required and not provided a non-proceed event is signalled.
*
* @event {WebAuthnRegistrationEventIds#INVALID_REGISTRATION}
* @event {AuthnEventIds#NO_CREDENTIALS}
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/RequireStrongFreshAuthnAccessPredicate.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/RequireStrongFreshAuthnAccessPredicate.java
index 0e0f84b..1281e07 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/RequireStrongFreshAuthnAccessPredicate.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/RequireStrongFreshAuthnAccessPredicate.java
@@ -42,7 +42,7 @@ import net.shibboleth.shared.primitive.StringSupport;
/**
* Access control predicate, used within a WebAuthn registration flow, to check if a user with existing WebAuthn/FIDO2
* credentials has performed a fresh, strong, authentication. A fresh and strong authentication is signalled by a
- * flag in the {@link WebAuthnRegistrationContext} context. The flag is likely set inside the MFA flow logic by
+ * flag in the {@link WebAuthnGuardContext} context. The flag is likely set inside the MFA flow logic by
* the deployer indicating the expected level of authentication was performed.
*
* @since 1.1.0
@@ -54,7 +54,7 @@ public class RequireStrongFreshAuthnAccessPredicate extends AbstractIdentifiable
@Nonnull @NotEmpty
private final Logger log = LoggerFactory.getLogger(RequireStrongFreshAuthnAccessPredicate.class);
- /** Lookup strategy to locate the WebAuthn guard context. */
+ /** Lookup strategy to locate the WebAuthnGuardContext. */
@Nonnull private
Function<ProfileRequestContext,WebAuthnGuardContext> webAuthnGuardContextLookupStrategy;
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckCredentialPolicy.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckCredentialPolicy.java
index 3f0b10b..b18e9de 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckCredentialPolicy.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckCredentialPolicy.java
@@ -99,7 +99,7 @@ public class CheckCredentialPolicy extends AbstractWebAuthnAction<WebAuthnAuthen
}
/**
- * Set the strategy to locate the userHandle of the user of the credential used to sign the
+ * Set the strategy to locate the userHandle of the user that holds the credential used to sign the
* assertion.
*
* @param strategy The user handle lookup strategy to set.
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckUserHandleExistsIfNoAllowCredentials.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckUserHandleExistsIfNoAllowCredentials.java
index 676185f..4d3c0ac 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckUserHandleExistsIfNoAllowCredentials.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/CheckUserHandleExistsIfNoAllowCredentials.java
@@ -107,7 +107,6 @@ public class CheckUserHandleExistsIfNoAllowCredentials extends AbstractWebAuthnA
ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_CREDENTIALS);
return;
}
-
if (allowCredentials.isEmpty() || allowCredentials.get() == null || allowCredentials.get().isEmpty()) {
if (userHandle.isEmpty()) {
@@ -124,7 +123,6 @@ public class CheckUserHandleExistsIfNoAllowCredentials extends AbstractWebAuthnA
getLogPrefix(), userHandle.isPresent() ? "returned in the response" :
"not returned in the response");
}
- }
-
+ }
}
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/DefaultUserHandleLookupStrategy.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/DefaultUserHandleLookupStrategy.java
index c9a10be..03cc63f 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/DefaultUserHandleLookupStrategy.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/DefaultUserHandleLookupStrategy.java
@@ -33,6 +33,8 @@ import net.shibboleth.shared.primitive.LoggerFactory;
/**
* A strategy to locate the userHandle first from an assertion response and then, if that does not exist, from the
* userId in the WebAuthn authentication context.
+ *
+ * @since 1.1.0
*/
@ThreadSafe
public class DefaultUserHandleLookupStrategy implements Function<ProfileRequestContext, byte[]> {
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 6863b40..85016a3 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
@@ -158,7 +158,9 @@ public class ValidateWebAuthnAssertion extends AbstractAuditingValidationAction
* Set the predicate to determine if we should update the last used time on the credential in the repository
* after successful validation?
*
- * @param predicate the predicate to set..
+ * @param predicate the predicate to set.
+ *
+ * @since 1.1.0
*/
public void setUpdateLastUsedTimePredicate(@Nonnull final Predicate<ProfileRequestContext> predicate) {
checkSetterPreconditions();
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm
index 4dfb1a2..6d20db7 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm
@@ -65,9 +65,9 @@ $response.addHeader("Content-Security-Policy", "default-src 'none'; style-src 's
<th>#springMessageText("idp.webauthn.admin.table.header.authenticatorIcon", "Icon")</th>
<th>#springMessageText("idp.webauthn.admin.table.header.labels", "Labels")</th>
#if ($lastUsed == 'true')
- <th>#springMessageText("idp.webauthn.admin.table.header.lastUsedTime", "Last Used")</th>
+ <th>#springMessageText("idp.webauthn.admin.table.header.lastUsedTime", "Last Used")</th>
#else
- <th>#springMessageText("idp.webauthn.admin.table.header.registrationTime", "Registration Time")</th>
+ <th>#springMessageText("idp.webauthn.admin.table.header.registrationTime", "Registration Time")</th>
#end
<th>#springMessageText("idp.webauthn.admin.table.header.hasMetadata", "Metadata?")</th>
<th>#springMessageText("idp.webauthn.admin.table.header.action", "Action")</th>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list