42
42
import com .yubico .webauthn .data .PublicKeyCredentialParameters ;
43
43
import com .yubico .webauthn .data .PublicKeyCredentialRequestOptions ;
44
44
import com .yubico .webauthn .data .PublicKeyCredentialRequestOptions .PublicKeyCredentialRequestOptionsBuilder ;
45
+ import com .yubico .webauthn .data .RegistrationExtensionInputs ;
45
46
import com .yubico .webauthn .data .RelyingPartyIdentity ;
46
47
import com .yubico .webauthn .exception .AssertionFailedException ;
47
48
import com .yubico .webauthn .exception .InvalidSignatureCountException ;
@@ -140,8 +141,7 @@ public class RelyingParty {
140
141
@ NonNull private final CredentialRepository credentialRepository ;
141
142
142
143
/**
143
- * The extension input to set for the <code>appid</code> extension when initiating authentication
144
- * operations.
144
+ * The extension input to set for the <code>appid</code> and <code>appidExclude</code> extensions.
145
145
*
146
146
* <p>You do not need this extension if you have not previously supported U2F. Its purpose is to
147
147
* make already-registered U2F credentials forward-compatible with the WebAuthn API. It is not
@@ -154,13 +154,19 @@ public class RelyingParty {
154
154
* <p>If this member is set, {@link #startAssertion(StartAssertionOptions) startAssertion} will
155
155
* automatically set the <code>appid</code> extension input, and {@link
156
156
* #finishAssertion(FinishAssertionOptions) finishAssertion} will adjust its verification logic to
157
- * also accept this AppID as an alternative to the RP ID.
157
+ * also accept this AppID as an alternative to the RP ID. Likewise, {@link
158
+ * #startRegistration(StartRegistrationOptions)} startRegistration} will automatically set the
159
+ * <code>appidExclude</code> extension input.
158
160
*
159
161
* <p>By default, this is not set.
160
162
*
161
163
* @see AssertionExtensionInputs#getAppid()
164
+ * @see RegistrationExtensionInputs#getAppidExclude()
162
165
* @see <a href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-extension">§10.1.
163
166
* FIDO AppID Extension (appid)</a>
167
+ * @see <a
168
+ * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-exclude-extension">§10.2.
169
+ * FIDO AppID Exclusion Extension (appidExclude)</a>
164
170
*/
165
171
@ NonNull private final Optional <AppId > appId ;
166
172
@@ -563,8 +569,8 @@ public RelyingPartyBuilder credentialRepository(CredentialRepository credentialR
563
569
}
564
570
565
571
/**
566
- * The extension input to set for the <code>appid</code> extension when initiating
567
- * authentication operations .
572
+ * The extension input to set for the <code>appid</code> and <code>appidExclude</code>
573
+ * extensions .
568
574
*
569
575
* <p>You do not need this extension if you have not previously supported U2F. Its purpose is to
570
576
* make already-registered U2F credentials forward-compatible with the WebAuthn API. It is not
@@ -577,23 +583,29 @@ public RelyingPartyBuilder credentialRepository(CredentialRepository credentialR
577
583
* <p>If this member is set, {@link #startAssertion(StartAssertionOptions) startAssertion} will
578
584
* automatically set the <code>appid</code> extension input, and {@link
579
585
* #finishAssertion(FinishAssertionOptions) finishAssertion} will adjust its verification logic
580
- * to also accept this AppID as an alternative to the RP ID.
586
+ * to also accept this AppID as an alternative to the RP ID. Likewise, {@link
587
+ * #startRegistration(StartRegistrationOptions)} startRegistration} will automatically set the
588
+ * <code>appidExclude</code> extension input.
581
589
*
582
590
* <p>By default, this is not set.
583
591
*
584
592
* @see AssertionExtensionInputs#getAppid()
593
+ * @see RegistrationExtensionInputs#getAppidExclude()
585
594
* @see <a
586
595
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-extension">§10.1.
587
596
* FIDO AppID Extension (appid)</a>
597
+ * @see <a
598
+ * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-exclude-extension">§10.2.
599
+ * FIDO AppID Exclusion Extension (appidExclude)</a>
588
600
*/
589
601
public RelyingPartyBuilder appId (@ NonNull Optional <AppId > appId ) {
590
602
this .appId = appId ;
591
603
return this ;
592
604
}
593
605
594
606
/**
595
- * The extension input to set for the <code>appid</code> extension when initiating
596
- * authentication operations .
607
+ * The extension input to set for the <code>appid</code> and <code>appidExclude</code>
608
+ * extensions .
597
609
*
598
610
* <p>You do not need this extension if you have not previously supported U2F. Its purpose is to
599
611
* make already-registered U2F credentials forward-compatible with the WebAuthn API. It is not
@@ -606,14 +618,20 @@ public RelyingPartyBuilder appId(@NonNull Optional<AppId> appId) {
606
618
* <p>If this member is set, {@link #startAssertion(StartAssertionOptions) startAssertion} will
607
619
* automatically set the <code>appid</code> extension input, and {@link
608
620
* #finishAssertion(FinishAssertionOptions) finishAssertion} will adjust its verification logic
609
- * to also accept this AppID as an alternative to the RP ID.
621
+ * to also accept this AppID as an alternative to the RP ID. Likewise, {@link
622
+ * #startRegistration(StartRegistrationOptions)} startRegistration} will automatically set the
623
+ * <code>appidExclude</code> extension input.
610
624
*
611
625
* <p>By default, this is not set.
612
626
*
613
627
* @see AssertionExtensionInputs#getAppid()
628
+ * @see RegistrationExtensionInputs#getAppidExclude()
614
629
* @see <a
615
630
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-extension">§10.1.
616
631
* FIDO AppID Extension (appid)</a>
632
+ * @see <a
633
+ * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-appid-exclude-extension">§10.2.
634
+ * FIDO AppID Exclusion Extension (appidExclude)</a>
617
635
*/
618
636
public RelyingPartyBuilder appId (@ NonNull AppId appId ) {
619
637
return this .appId (Optional .of (appId ));
0 commit comments