diff --git a/webauthn-server-core/src/main/java/com/yubico/webauthn/RelyingParty.java b/webauthn-server-core/src/main/java/com/yubico/webauthn/RelyingParty.java index b33d7e71c..7e560a332 100644 --- a/webauthn-server-core/src/main/java/com/yubico/webauthn/RelyingParty.java +++ b/webauthn-server-core/src/main/java/com/yubico/webauthn/RelyingParty.java @@ -42,6 +42,7 @@ import com.yubico.webauthn.data.PublicKeyCredentialParameters; import com.yubico.webauthn.data.PublicKeyCredentialRequestOptions; import com.yubico.webauthn.data.PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder; +import com.yubico.webauthn.data.RegistrationExtensionInputs; import com.yubico.webauthn.data.RelyingPartyIdentity; import com.yubico.webauthn.exception.AssertionFailedException; import com.yubico.webauthn.exception.InvalidSignatureCountException; @@ -140,8 +141,7 @@ public class RelyingParty { @NonNull private final CredentialRepository credentialRepository; /** - * The extension input to set for the appid extension when initiating authentication - * operations. + * The extension input to set for the appid and appidExclude extensions. * *

You do not need this extension if you have not previously supported U2F. Its purpose is to * make already-registered U2F credentials forward-compatible with the WebAuthn API. It is not @@ -154,13 +154,19 @@ public class RelyingParty { *

If this member is set, {@link #startAssertion(StartAssertionOptions) startAssertion} will * automatically set the appid extension input, and {@link * #finishAssertion(FinishAssertionOptions) finishAssertion} will adjust its verification logic to - * also accept this AppID as an alternative to the RP ID. + * also accept this AppID as an alternative to the RP ID. Likewise, {@link + * #startRegistration(StartRegistrationOptions)} startRegistration} will automatically set the + * appidExclude extension input. * *

By default, this is not set. * * @see AssertionExtensionInputs#getAppid() + * @see RegistrationExtensionInputs#getAppidExclude() * @see §10.1. * FIDO AppID Extension (appid) + * @see §10.2. + * FIDO AppID Exclusion Extension (appidExclude) */ @NonNull private final Optional appId; @@ -563,8 +569,8 @@ public RelyingPartyBuilder credentialRepository(CredentialRepository credentialR } /** - * The extension input to set for the appid extension when initiating - * authentication operations. + * The extension input to set for the appid and appidExclude + * extensions. * *

You do not need this extension if you have not previously supported U2F. Its purpose is to * make already-registered U2F credentials forward-compatible with the WebAuthn API. It is not @@ -577,14 +583,20 @@ public RelyingPartyBuilder credentialRepository(CredentialRepository credentialR *

If this member is set, {@link #startAssertion(StartAssertionOptions) startAssertion} will * automatically set the appid extension input, and {@link * #finishAssertion(FinishAssertionOptions) finishAssertion} will adjust its verification logic - * to also accept this AppID as an alternative to the RP ID. + * to also accept this AppID as an alternative to the RP ID. Likewise, {@link + * #startRegistration(StartRegistrationOptions)} startRegistration} will automatically set the + * appidExclude extension input. * *

By default, this is not set. * * @see AssertionExtensionInputs#getAppid() + * @see RegistrationExtensionInputs#getAppidExclude() * @see §10.1. * FIDO AppID Extension (appid) + * @see §10.2. + * FIDO AppID Exclusion Extension (appidExclude) */ public RelyingPartyBuilder appId(@NonNull Optional appId) { this.appId = appId; @@ -592,8 +604,8 @@ public RelyingPartyBuilder appId(@NonNull Optional appId) { } /** - * The extension input to set for the appid extension when initiating - * authentication operations. + * The extension input to set for the appid and appidExclude + * extensions. * *

You do not need this extension if you have not previously supported U2F. Its purpose is to * make already-registered U2F credentials forward-compatible with the WebAuthn API. It is not @@ -606,14 +618,20 @@ public RelyingPartyBuilder appId(@NonNull Optional appId) { *

If this member is set, {@link #startAssertion(StartAssertionOptions) startAssertion} will * automatically set the appid extension input, and {@link * #finishAssertion(FinishAssertionOptions) finishAssertion} will adjust its verification logic - * to also accept this AppID as an alternative to the RP ID. + * to also accept this AppID as an alternative to the RP ID. Likewise, {@link + * #startRegistration(StartRegistrationOptions)} startRegistration} will automatically set the + * appidExclude extension input. * *

By default, this is not set. * * @see AssertionExtensionInputs#getAppid() + * @see RegistrationExtensionInputs#getAppidExclude() * @see §10.1. * FIDO AppID Extension (appid) + * @see §10.2. + * FIDO AppID Exclusion Extension (appidExclude) */ public RelyingPartyBuilder appId(@NonNull AppId appId) { return this.appId(Optional.of(appId));