Skip to content

Commit 0d30c93

Browse files
committed
Add JavaDocs for PRF extension
1 parent 87ca3e6 commit 0d30c93

File tree

5 files changed

+331
-67
lines changed

5 files changed

+331
-67
lines changed

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

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,28 @@ public AssertionExtensionInputsBuilder largeBlob(
182182
/**
183183
* Enable the Pseudo-random function extension (<code>prf</code>).
184184
*
185-
* @see <a
186-
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">§10.5.
187-
* Large blob storage extension (largeBlob)</a>
185+
* <p>This extension allows a Relying Party to evaluate outputs from a pseudo-random function
186+
* (PRF) associated with a credential.
187+
*
188+
* <p>Use the {@link com.yubico.webauthn.data.Extensions.Prf.PrfAuthenticationInput} factory
189+
* functions to construct the argument:
190+
*
191+
* <ul>
192+
* <li>Use {@link Extensions.Prf.PrfAuthenticationInput#eval(Extensions.Prf.PrfValues)} to use
193+
* the same PRF input for all credentials.
194+
* <li>Use {@link Extensions.Prf.PrfAuthenticationInput#evalByCredential(Map)} to use
195+
* different PRF inputs for different credentials.
196+
* <li>Use {@link Extensions.Prf.PrfAuthenticationInput#evalByCredentialWithFallback(Map,
197+
* Extensions.Prf.PrfValues)} to use different PRF inputs for different credentials, but
198+
* with a "fallback" input for credentials without their own input.
199+
* </ul>
200+
*
201+
* @see Extensions.Prf.PrfAuthenticationInput#eval(Extensions.Prf.PrfValues)
202+
* @see Extensions.Prf.PrfAuthenticationInput#evalByCredential(Map)
203+
* @see Extensions.Prf.PrfAuthenticationInput#evalByCredentialWithFallback(Map,
204+
* Extensions.Prf.PrfValues)
205+
* @see <a href="https://www.w3.org/TR/2025/WD-webauthn-3-20250127/#prf-extension">§10.1.4.
206+
* Pseudo-random function extension (prf)</a>
188207
*/
189208
public AssertionExtensionInputsBuilder prf(Extensions.Prf.PrfAuthenticationInput prf) {
190209
this.prf = prf;
@@ -253,16 +272,17 @@ private Extensions.LargeBlob.LargeBlobAuthenticationInput getLargeBlobJson() {
253272
}
254273

255274
/**
256-
* The input to the Pseudo-random function extension (<code>prf</code>).
275+
* The input to the Pseudo-random function extension (<code>prf</code>), if any.
257276
*
258277
* <p>This extension allows a Relying Party to evaluate outputs from a pseudo-random function
259278
* (PRF) associated with a credential.
260279
*
261-
* @see Extensions.LargeBlob.LargeBlobAuthenticationInput#read()
262-
* @see Extensions.LargeBlob.LargeBlobAuthenticationInput#write(ByteArray)
263-
* @see <a
264-
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">§10.5.
265-
* Large blob storage extension (largeBlob)</a>
280+
* @see Extensions.Prf.PrfAuthenticationInput#eval(Extensions.Prf.PrfValues)
281+
* @see Extensions.Prf.PrfAuthenticationInput#evalByCredential(Map)
282+
* @see Extensions.Prf.PrfAuthenticationInput#evalByCredentialWithFallback(Map,
283+
* Extensions.Prf.PrfValues)
284+
* @see <a href="https://www.w3.org/TR/2025/WD-webauthn-3-20250127/#prf-extension">§10.1.4.
285+
* Pseudo-random function extension (prf)</a>
266286
*/
267287
public Optional<Extensions.Prf.PrfAuthenticationInput> getPrf() {
268288
return Optional.ofNullable(prf);

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public Optional<Boolean> getAppid() {
112112
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">Large blob
113113
* storage (<code>largeBlob</code>) extension</a>, if any.
114114
*
115-
* @see com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobRegistrationOutput
115+
* @see com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobAuthenticationOutput
116116
* @see <a
117117
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">§10.5.Large
118118
* blob storage extension (largeBlob)</a>
@@ -123,13 +123,12 @@ public Optional<Extensions.LargeBlob.LargeBlobAuthenticationOutput> getLargeBlob
123123

124124
/**
125125
* The extension output for the <a
126-
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">Large blob
127-
* storage (<code>largeBlob</code>) extension</a>, if any.
126+
* href="https://www.w3.org/TR/2025/WD-webauthn-3-20250127/#prf-extension">Pseudo-random function
127+
* (<code>prf</code>) extension</a>, if any.
128128
*
129-
* @see com.yubico.webauthn.data.Extensions.Prf.PrfRegistrationOutput
130-
* @see <a
131-
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">§10.5.Large
132-
* blob storage extension (largeBlob)</a>
129+
* @see com.yubico.webauthn.data.Extensions.Prf.PrfAuthenticationOutput
130+
* @see <a href="https://www.w3.org/TR/2025/WD-webauthn-3-20250127/#prf-extension">§10.1.4.
131+
* Pseudo-random function extension (prf)</a>
133132
*/
134133
public Optional<Extensions.Prf.PrfAuthenticationOutput> getPrf() {
135134
return Optional.ofNullable(prf);

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,13 @@ public Optional<Extensions.LargeBlob.LargeBlobRegistrationOutput> getLargeBlob()
136136
}
137137

138138
/**
139-
* The extension output for the Pseudo-random function (<code>prf</code>), if any.
139+
* The extension output for the <a
140+
* href="https://www.w3.org/TR/2025/WD-webauthn-3-20250127/#prf-extension">Pseudo-random function
141+
* (<code>prf</code>) extension</a>, if any.
140142
*
141143
* @see com.yubico.webauthn.data.Extensions.Prf.PrfRegistrationOutput
142-
* @see <a
143-
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">§10.5.Large
144-
* blob storage extension (largeBlob)</a>
144+
* @see <a href="https://www.w3.org/TR/2025/WD-webauthn-3-20250127/#prf-extension">§10.1.4.
145+
* Pseudo-random function extension (prf)</a>
145146
*/
146147
public Optional<Extensions.Prf.PrfRegistrationOutput> getPrf() {
147148
return Optional.ofNullable(prf);

0 commit comments

Comments
 (0)