Skip to content

Commit a26d315

Browse files
committed
Emphasize that appid extensions do not usually need to be set explicitly
1 parent dfe41ad commit a26d315

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

webauthn-server-core/src/main/java/com/yubico/webauthn/data/AssertionExtensionInputs.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ public static class AssertionExtensionInputsBuilder {
9393
/**
9494
* The input to the FIDO AppID Extension (<code>appid</code>).
9595
*
96+
* <p>You usually do not need to call this method explicitly; if {@link RelyingParty#getAppId()}
97+
* is present, then {@link RelyingParty#startAssertion(StartAssertionOptions)} will enable this
98+
* extension automatically.
99+
*
96100
* <p>This extension allows WebAuthn Relying Parties that have previously registered a
97101
* credential using the legacy FIDO JavaScript APIs to request an assertion. The FIDO APIs use
98102
* an alternative identifier for Relying Parties called an <a
@@ -103,10 +107,6 @@ public static class AssertionExtensionInputsBuilder {
103107
* <p>This extension does not allow FIDO-compatible credentials to be created. Thus, credentials
104108
* created with WebAuthn are not backwards compatible with the FIDO JavaScript APIs.
105109
*
106-
* <p>{@link RelyingParty#startAssertion(StartAssertionOptions)} sets this extension input
107-
* automatically if the {@link RelyingParty.RelyingPartyBuilder#appId(Optional)} parameter is
108-
* given when constructing the {@link RelyingParty} instance.
109-
*
110110
* @see <a
111111
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-extension">§10.1.
112112
* FIDO AppID Extension (appid)</a>
@@ -118,6 +118,10 @@ public AssertionExtensionInputsBuilder appid(@NonNull Optional<AppId> appid) {
118118
/**
119119
* The input to the FIDO AppID Extension (<code>appid</code>).
120120
*
121+
* <p>You usually do not need to call this method explicitly; if {@link RelyingParty#getAppId()}
122+
* is present, then {@link RelyingParty#startAssertion(StartAssertionOptions)} will enable this
123+
* extension automatically.
124+
*
121125
* <p>This extension allows WebAuthn Relying Parties that have previously registered a
122126
* credential using the legacy FIDO JavaScript APIs to request an assertion. The FIDO APIs use
123127
* an alternative identifier for Relying Parties called an <a
@@ -128,10 +132,6 @@ public AssertionExtensionInputsBuilder appid(@NonNull Optional<AppId> appid) {
128132
* <p>This extension does not allow FIDO-compatible credentials to be created. Thus, credentials
129133
* created with WebAuthn are not backwards compatible with the FIDO JavaScript APIs.
130134
*
131-
* <p>{@link RelyingParty#startAssertion(StartAssertionOptions)} sets this extension input
132-
* automatically if the {@link RelyingParty.RelyingPartyBuilder#appId(Optional)} parameter is
133-
* given when constructing the {@link RelyingParty} instance.
134-
*
135135
* @see <a
136136
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-extension">§10.1.
137137
* FIDO AppID Extension (appid)</a>
@@ -191,10 +191,6 @@ private AssertionExtensionInputsBuilder uvm(Boolean uvm) {
191191
* <p>This extension does not allow FIDO-compatible credentials to be created. Thus, credentials
192192
* created with WebAuthn are not backwards compatible with the FIDO JavaScript APIs.
193193
*
194-
* <p>{@link RelyingParty#startAssertion(StartAssertionOptions)} sets this extension input
195-
* automatically if the {@link RelyingParty.RelyingPartyBuilder#appId(Optional)} parameter is
196-
* given when constructing the {@link RelyingParty} instance.
197-
*
198194
* @see <a href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-extension">§10.1.
199195
* FIDO AppID Extension (appid)</a>
200196
*/

webauthn-server-core/src/main/java/com/yubico/webauthn/data/RegistrationExtensionInputs.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import com.fasterxml.jackson.annotation.JsonCreator;
2828
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
2929
import com.fasterxml.jackson.annotation.JsonProperty;
30+
import com.yubico.webauthn.RelyingParty;
31+
import com.yubico.webauthn.StartRegistrationOptions;
3032
import com.yubico.webauthn.extension.appid.AppId;
3133
import java.util.Collections;
3234
import java.util.HashSet;
@@ -158,6 +160,10 @@ public static class RegistrationExtensionInputsBuilder {
158160
/**
159161
* Enable or disable the FIDO AppID Exclusion Extension (<code>appidExclude</code>).
160162
*
163+
* <p>You usually do not need to call this method explicitly; if {@link RelyingParty#getAppId()}
164+
* is present, then {@link RelyingParty#startRegistration(StartRegistrationOptions)} will enable
165+
* this extension automatically.
166+
*
161167
* @see <a
162168
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-exclude-extension">§10.2.
163169
* FIDO AppID Exclusion Extension (appidExclude)</a>
@@ -170,6 +176,10 @@ public RegistrationExtensionInputsBuilder appidExclude(Optional<AppId> appidExcl
170176
/**
171177
* Enable the FIDO AppID Exclusion Extension (<code>appidExclude</code>).
172178
*
179+
* <p>You usually do not need to call this method explicitly; if {@link RelyingParty#getAppId()}
180+
* is present, then {@link RelyingParty#startRegistration(StartRegistrationOptions)} will enable
181+
* this extension automatically.
182+
*
173183
* @see <a
174184
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-exclude-extension">§10.2.
175185
* FIDO AppID Exclusion Extension (appidExclude)</a>

0 commit comments

Comments
 (0)