From 945fed5136bbc243f14bda49c04b1ca3d13bf3ec Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Mon, 1 Nov 2021 17:18:21 +0100 Subject: [PATCH] Recommend RegistrationResult.getPublicKeyCose() as argument to RegisteredCredential --- .../main/java/com/yubico/webauthn/RegisteredCredential.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webauthn-server-core/src/main/java/com/yubico/webauthn/RegisteredCredential.java b/webauthn-server-core/src/main/java/com/yubico/webauthn/RegisteredCredential.java index ef1cfb89f..0ba783bf0 100644 --- a/webauthn-server-core/src/main/java/com/yubico/webauthn/RegisteredCredential.java +++ b/webauthn-server-core/src/main/java/com/yubico/webauthn/RegisteredCredential.java @@ -144,6 +144,9 @@ public class Step3 { * {@link RegisteredCredentialBuilder#publicKeyCose(ByteArray) publicKeyCose} is a required * parameter. * + *

The return value of {@link RegistrationResult#getPublicKeyCose()} is a suitable + * argument for this method. + * *

Alternatively, the public key can be specified using the {@link * #publicKeyEs256Raw(ByteArray)} method if the key is stored in the U2F format ( * ALG_KEY_ECC_X962_RAW as specified in RFC 8152. This method overwrites {@link * #publicKeyEs256Raw(ByteArray)}. * + *

The return value of {@link RegistrationResult#getPublicKeyCose()} is a suitable argument + * for this method. + * *

This is used to verify the {@link AuthenticatorAssertionResponse#getSignature() signature} * in authentication assertions. *