[java-idp-plugin-webauthn] branch main updated: Add error message if registration fails verification
Phil Smart
philip.smart at jisc.ac.uk
Tue Jun 25 10:36:07 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=8188169421d6f56b8460686531a3bd95a6fe4e76
The following commit(s) were added to refs/heads/main by this push:
new 8188169 Add error message if registration fails verification
8188169 is described below
commit 8188169421d6f56b8460686531a3bd95a6fe4e76
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Tue Jun 25 11:36:05 2024 +0100
Add error message if registration fails verification
---
.../webauthn/admin/impl/ValidateAuthenticatorAttestationResponse.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ValidateAuthenticatorAttestationResponse.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ValidateAuthenticatorAttestationResponse.java
index 2c5476f..618f498 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ValidateAuthenticatorAttestationResponse.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/ValidateAuthenticatorAttestationResponse.java
@@ -38,7 +38,7 @@ import net.shibboleth.shared.annotation.constraint.NonnullBeforeExec;
import net.shibboleth.shared.primitive.LoggerFactory;
/**
- * Validate the public key registration attempt by sending the public key credential to the WebAuthn client.
+ * Validate the public key registration attempt by delegating the created public key credential to the WebAuthn client.
* If valid, store the registration result inside the registration context.
*
* @event {WebAuthnRegistrationEventIds#INVALID_REGISTRATION}
@@ -110,6 +110,8 @@ public class ValidateAuthenticatorAttestationResponse extends AbstractWebAuthnRe
} catch (final RegistrationFailureException e) {
log.warn("{} Public key registration failed", getLogPrefix(), e);
ActionSupport.buildEvent(profileRequestContext, WebAuthnRegistrationEventIds.INVALID_REGISTRATION);
+ context.ensureSubcontext(WebAuthnRegistrationErrorContext.class)
+ .addClassifiedError(WebAuthnRegistrationEventIds.INVALID_REGISTRATION);
return;
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list