1 | // Copyright (c) 2018, Yubico AB | |
2 | // All rights reserved. | |
3 | // | |
4 | // Redistribution and use in source and binary forms, with or without | |
5 | // modification, are permitted provided that the following conditions are met: | |
6 | // | |
7 | // 1. Redistributions of source code must retain the above copyright notice, this | |
8 | // list of conditions and the following disclaimer. | |
9 | // | |
10 | // 2. Redistributions in binary form must reproduce the above copyright notice, | |
11 | // this list of conditions and the following disclaimer in the documentation | |
12 | // and/or other materials provided with the distribution. | |
13 | // | |
14 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
15 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
16 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
17 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | |
18 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
19 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
20 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
21 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
22 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
23 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
24 | ||
25 | package com.yubico.webauthn.data; | |
26 | ||
27 | import com.fasterxml.jackson.annotation.JsonCreator; | |
28 | import com.fasterxml.jackson.annotation.JsonProperty; | |
29 | import com.fasterxml.jackson.core.JsonProcessingException; | |
30 | import com.fasterxml.jackson.databind.ObjectMapper; | |
31 | import com.fasterxml.jackson.databind.node.ObjectNode; | |
32 | import com.yubico.internal.util.CollectionUtil; | |
33 | import com.yubico.internal.util.JacksonCodecs; | |
34 | import com.yubico.webauthn.StartAssertionOptions; | |
35 | import java.util.Arrays; | |
36 | import java.util.Collections; | |
37 | import java.util.List; | |
38 | import java.util.Optional; | |
39 | import lombok.Builder; | |
40 | import lombok.NonNull; | |
41 | import lombok.Value; | |
42 | ||
43 | /** | |
44 | * The PublicKeyCredentialRequestOptions dictionary supplies get() with the data it needs to | |
45 | * generate an assertion. | |
46 | * | |
47 | * <p>Its `challenge` member must be present, while its other members are optional. | |
48 | * | |
49 | * @see <a | |
50 | * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dictdef-publickeycredentialrequestoptions">§5.5. | |
51 | * Options for Assertion Generation (dictionary PublicKeyCredentialRequestOptions) </a> | |
52 | */ | |
53 | @Value | |
54 | @Builder(toBuilder = true) | |
55 | public class PublicKeyCredentialRequestOptions { | |
56 | ||
57 | /** | |
58 | * A challenge that the selected authenticator signs, along with other data, when producing an | |
59 | * authentication assertion. See the <a | |
60 | * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-cryptographic-challenges">§13.1 | |
61 | * Cryptographic Challenges</a> security consideration. | |
62 | */ | |
63 | @NonNull private final ByteArray challenge; | |
64 | ||
65 | /** | |
66 | * Specifies a time, in milliseconds, that the caller is willing to wait for the call to complete. | |
67 | * | |
68 | * <p>This is treated as a hint, and MAY be overridden by the client. | |
69 | */ | |
70 | private final Long timeout; | |
71 | ||
72 | /** | |
73 | * Zero or more hints, in descending order of preference, to guide the user agent in interacting | |
74 | * with the user during this authentication operation. | |
75 | * | |
76 | * <p>For example, the {@link PublicKeyCredentialHint#SECURITY_KEY} hint may be used to ask the | |
77 | * client to emphasize the option of authenticating with an external security key, or the {@link | |
78 | * PublicKeyCredentialHint#CLIENT_DEVICE} hint may be used to ask the client to emphasize the | |
79 | * option of authenticating a built-in passkey provider. | |
80 | * | |
81 | * <p>These hints are not requirements, and do not bind the user-agent, but may guide it in | |
82 | * providing the best experience by using contextual information about the request. | |
83 | * | |
84 | * <p>Hints MAY contradict information contained in {@link | |
85 | * PublicKeyCredentialDescriptor#getTransports()}. When this occurs, the hints take precedence. | |
86 | * | |
87 | * <p>This library does not take these hints into account in any way, other than passing them | |
88 | * through so they can be used in the argument to <code>navigator.credentials.get()</code> on the | |
89 | * client side. | |
90 | * | |
91 | * <p>The default is empty. | |
92 | * | |
93 | * @see PublicKeyCredentialHint | |
94 | * @see StartAssertionOptions#getHints() | |
95 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(List) | |
96 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(String...) | |
97 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(PublicKeyCredentialHint...) | |
98 | * @see <a | |
99 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#dom-publickeycredentialrequestoptions-hints">PublicKeyCredentialRequestOptions.hints</a> | |
100 | * @see <a | |
101 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#enumdef-publickeycredentialhints">§5.8.7. | |
102 | * User-agent Hints Enumeration (enum PublicKeyCredentialHints)</a> | |
103 | */ | |
104 | private final List<String> hints; | |
105 | ||
106 | /** | |
107 | * Specifies the relying party identifier claimed by the caller. | |
108 | * | |
109 | * <p>If omitted, its value will be set by the client. | |
110 | */ | |
111 | private final String rpId; | |
112 | ||
113 | /** | |
114 | * A list of {@link PublicKeyCredentialDescriptor} objects representing public key credentials | |
115 | * acceptable to the caller, in descending order of the caller’s preference (the first item in the | |
116 | * list is the most preferred credential, and so on down the list). | |
117 | */ | |
118 | private final List<PublicKeyCredentialDescriptor> allowCredentials; | |
119 | ||
120 | /** | |
121 | * Describes the Relying Party's requirements regarding <a | |
122 | * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#user-verification">user | |
123 | * verification</a> for the <code>navigator.credentials.get()</code> operation. | |
124 | * | |
125 | * <p>Eligible authenticators are filtered to only those capable of satisfying this requirement. | |
126 | * | |
127 | * <p>By default, this is not set. When not set, the default in the browser is {@link | |
128 | * UserVerificationRequirement#PREFERRED}. | |
129 | * | |
130 | * @see UserVerificationRequirement | |
131 | * @see <a | |
132 | * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#enum-userVerificationRequirement">§5.8.6. | |
133 | * User Verification Requirement Enumeration (enum UserVerificationRequirement)</a> | |
134 | * @see <a href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#user-verification">User | |
135 | * Verification</a> | |
136 | */ | |
137 | private final UserVerificationRequirement userVerification; | |
138 | ||
139 | /** | |
140 | * Additional parameters requesting additional processing by the client and authenticator. | |
141 | * | |
142 | * <p>For example, if transaction confirmation is sought from the user, then the prompt string | |
143 | * might be included as an extension. | |
144 | */ | |
145 | @NonNull @Builder.Default | |
146 | private final AssertionExtensionInputs extensions = AssertionExtensionInputs.builder().build(); | |
147 | ||
148 | @JsonCreator | |
149 | private PublicKeyCredentialRequestOptions( | |
150 |
1
1. <init> : negated conditional → KILLED |
@NonNull @JsonProperty("challenge") ByteArray challenge, |
151 | @JsonProperty("timeout") Long timeout, | |
152 | @JsonProperty("hints") List<String> hints, | |
153 | @JsonProperty("rpId") String rpId, | |
154 | @JsonProperty("allowCredentials") List<PublicKeyCredentialDescriptor> allowCredentials, | |
155 | @JsonProperty("userVerification") UserVerificationRequirement userVerification, | |
156 |
1
1. <init> : negated conditional → KILLED |
@NonNull @JsonProperty("extensions") AssertionExtensionInputs extensions) { |
157 | this.challenge = challenge; | |
158 | this.timeout = timeout; | |
159 |
1
1. <init> : negated conditional → KILLED |
this.hints = hints == null ? Collections.emptyList() : Collections.unmodifiableList(hints); |
160 | this.rpId = rpId; | |
161 | this.allowCredentials = | |
162 |
1
1. <init> : negated conditional → KILLED |
allowCredentials == null ? null : CollectionUtil.immutableList(allowCredentials); |
163 | this.userVerification = userVerification; | |
164 | this.extensions = extensions; | |
165 | } | |
166 | ||
167 | public Optional<Long> getTimeout() { | |
168 |
1
1. getTimeout : replaced return value with Optional.empty for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions::getTimeout → KILLED |
return Optional.ofNullable(timeout); |
169 | } | |
170 | ||
171 | public Optional<List<PublicKeyCredentialDescriptor>> getAllowCredentials() { | |
172 |
1
1. getAllowCredentials : replaced return value with Optional.empty for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions::getAllowCredentials → KILLED |
return Optional.ofNullable(allowCredentials); |
173 | } | |
174 | ||
175 | public Optional<UserVerificationRequirement> getUserVerification() { | |
176 |
1
1. getUserVerification : replaced return value with Optional.empty for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions::getUserVerification → KILLED |
return Optional.ofNullable(userVerification); |
177 | } | |
178 | ||
179 | /** | |
180 | * Serialize this {@link PublicKeyCredentialRequestOptions} value to JSON suitable for sending to | |
181 | * the client. | |
182 | * | |
183 | * <p>Any {@link ByteArray} values in this data structure will be {@link ByteArray#getBase64Url() | |
184 | * Base64Url} encoded. Those values MUST be decoded into <code>BufferSource</code> values (such as | |
185 | * <code>Uint8Array</code>) on the client side before calling <code>navigator.credentials.get() | |
186 | * </code>. | |
187 | * | |
188 | * <p>After decoding binary values, the resulting JavaScript object is suitable for passing as an | |
189 | * argument to <code>navigator.credentials.get()</code>. | |
190 | * | |
191 | * @return a JSON value suitable for sending to the client and passing as an argument to <code> | |
192 | * navigator.credentials.get()</code>, after decoding binary options from Base64Url strings. | |
193 | * @throws JsonProcessingException if JSON serialization fails. | |
194 | */ | |
195 | public String toCredentialsGetJson() throws JsonProcessingException { | |
196 | ObjectMapper json = JacksonCodecs.json(); | |
197 | ObjectNode result = json.createObjectNode(); | |
198 | result.set("publicKey", json.valueToTree(this)); | |
199 |
1
1. toCredentialsGetJson : replaced return value with "" for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions::toCredentialsGetJson → KILLED |
return json.writeValueAsString(result); |
200 | } | |
201 | ||
202 | public static PublicKeyCredentialRequestOptionsBuilder.MandatoryStages builder() { | |
203 |
1
1. builder : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions::builder → KILLED |
return new PublicKeyCredentialRequestOptionsBuilder.MandatoryStages(); |
204 | } | |
205 | ||
206 | public static class PublicKeyCredentialRequestOptionsBuilder { | |
207 | private Long timeout = null; | |
208 | private String rpId = null; | |
209 | private List<PublicKeyCredentialDescriptor> allowCredentials = null; | |
210 | ||
211 | public static class MandatoryStages { | |
212 | private final PublicKeyCredentialRequestOptionsBuilder builder = | |
213 | new PublicKeyCredentialRequestOptionsBuilder(); | |
214 | ||
215 | /** | |
216 | * {@link PublicKeyCredentialRequestOptionsBuilder#challenge(ByteArray) challenge} is a | |
217 | * required parameter. | |
218 | * | |
219 | * @see PublicKeyCredentialRequestOptionsBuilder#challenge(ByteArray) | |
220 | */ | |
221 | public PublicKeyCredentialRequestOptionsBuilder challenge(ByteArray challenge) { | |
222 |
1
1. challenge : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder$MandatoryStages::challenge → KILLED |
return builder.challenge(challenge); |
223 | } | |
224 | } | |
225 | ||
226 | /** | |
227 | * Specifies a time, in milliseconds, that the caller is willing to wait for the call to | |
228 | * complete. | |
229 | * | |
230 | * <p>This is treated as a hint, and MAY be overridden by the client. | |
231 | */ | |
232 |
1
1. timeout : negated conditional → KILLED |
public PublicKeyCredentialRequestOptionsBuilder timeout(@NonNull Optional<Long> timeout) { |
233 | this.timeout = timeout.orElse(null); | |
234 |
1
1. timeout : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::timeout → KILLED |
return this; |
235 | } | |
236 | ||
237 | /* | |
238 | * Workaround, see: https://github.com/rzwitserloot/lombok/issues/2623#issuecomment-714816001 | |
239 | * Consider reverting this workaround if Lombok fixes that issue. | |
240 | */ | |
241 | private PublicKeyCredentialRequestOptionsBuilder timeout(Long timeout) { | |
242 |
1
1. timeout : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::timeout → KILLED |
return this.timeout(Optional.ofNullable(timeout)); |
243 | } | |
244 | ||
245 | /** | |
246 | * Specifies a time, in milliseconds, that the caller is willing to wait for the call to | |
247 | * complete. | |
248 | * | |
249 | * <p>This is treated as a hint, and MAY be overridden by the client. | |
250 | */ | |
251 | public PublicKeyCredentialRequestOptionsBuilder timeout(long timeout) { | |
252 |
1
1. timeout : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::timeout → NO_COVERAGE |
return this.timeout(Optional.of(timeout)); |
253 | } | |
254 | ||
255 | /** | |
256 | * Zero or more hints, in descending order of preference, to guide the user agent in interacting | |
257 | * with the user during this authentication operation. | |
258 | * | |
259 | * <p>Setting this property multiple times overwrites any value set previously. | |
260 | * | |
261 | * <p>For example, the {@link PublicKeyCredentialHint#SECURITY_KEY} hint may be used to ask the | |
262 | * client to emphasize the option of authenticating with an external security key, or the {@link | |
263 | * PublicKeyCredentialHint#CLIENT_DEVICE} hint may be used to ask the client to emphasize the | |
264 | * option of authenticating a built-in passkey provider. | |
265 | * | |
266 | * <p>These hints are not requirements, and do not bind the user-agent, but may guide it in | |
267 | * providing the best experience by using contextual information about the request. | |
268 | * | |
269 | * <p>Hints MAY contradict information contained in {@link | |
270 | * PublicKeyCredentialDescriptor#getTransports()}. When this occurs, the hints take precedence. | |
271 | * | |
272 | * <p>This library does not take these hints into account in any way, other than passing them | |
273 | * through so they can be used in the argument to <code>navigator.credentials.get()</code> on | |
274 | * the client side. | |
275 | * | |
276 | * <p>The default is empty. | |
277 | * | |
278 | * @see PublicKeyCredentialHint | |
279 | * @see StartAssertionOptions#getHints() | |
280 | * @see PublicKeyCredentialRequestOptions#getHints() | |
281 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(List) | |
282 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(PublicKeyCredentialHint...) | |
283 | * @see <a | |
284 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#dom-publickeycredentialrequestoptions-hints">PublicKeyCredentialRequestOptions.hints</a> | |
285 | * @see <a | |
286 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#enumdef-publickeycredentialhints">§5.8.7. | |
287 | * User-agent Hints Enumeration (enum PublicKeyCredentialHints)</a> | |
288 | */ | |
289 |
1
1. hints : negated conditional → KILLED |
public PublicKeyCredentialRequestOptionsBuilder hints(@NonNull String... hints) { |
290 | this.hints = Arrays.asList(hints); | |
291 |
1
1. hints : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::hints → SURVIVED |
return this; |
292 | } | |
293 | ||
294 | /** | |
295 | * Zero or more hints, in descending order of preference, to guide the user agent in interacting | |
296 | * with the user during this authentication operation. | |
297 | * | |
298 | * <p>Setting this property multiple times overwrites any value set previously. | |
299 | * | |
300 | * <p>For example, the {@link PublicKeyCredentialHint#SECURITY_KEY} hint may be used to ask the | |
301 | * client to emphasize the option of authenticating with an external security key, or the {@link | |
302 | * PublicKeyCredentialHint#CLIENT_DEVICE} hint may be used to ask the client to emphasize the | |
303 | * option of authenticating a built-in passkey provider. | |
304 | * | |
305 | * <p>These hints are not requirements, and do not bind the user-agent, but may guide it in | |
306 | * providing the best experience by using contextual information about the request. | |
307 | * | |
308 | * <p>Hints MAY contradict information contained in {@link | |
309 | * PublicKeyCredentialDescriptor#getTransports()}. When this occurs, the hints take precedence. | |
310 | * | |
311 | * <p>This library does not take these hints into account in any way, other than passing them | |
312 | * through so they can be used in the argument to <code>navigator.credentials.get()</code> on | |
313 | * the client side. | |
314 | * | |
315 | * <p>The default is empty. | |
316 | * | |
317 | * @see PublicKeyCredentialHint | |
318 | * @see StartAssertionOptions#getHints() | |
319 | * @see PublicKeyCredentialRequestOptions#getHints() | |
320 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(List) | |
321 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(String...) | |
322 | * @see <a | |
323 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#dom-publickeycredentialrequestoptions-hints">PublicKeyCredentialRequestOptions.hints</a> | |
324 | * @see <a | |
325 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#enumdef-publickeycredentialhints">§5.8.7. | |
326 | * User-agent Hints Enumeration (enum PublicKeyCredentialHints)</a> | |
327 | */ | |
328 | public PublicKeyCredentialRequestOptionsBuilder hints( | |
329 |
1
1. hints : negated conditional → KILLED |
@NonNull PublicKeyCredentialHint... hints) { |
330 |
1
1. hints : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::hints → SURVIVED |
return this.hints( |
331 |
1
1. lambda$hints$0 : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::lambda$hints$0 → KILLED |
Arrays.stream(hints).map(PublicKeyCredentialHint::getValue).toArray(String[]::new)); |
332 | } | |
333 | ||
334 | /** | |
335 | * Zero or more hints, in descending order of preference, to guide the user agent in interacting | |
336 | * with the user during this authentication operation. | |
337 | * | |
338 | * <p>Setting this property multiple times overwrites any value set previously. | |
339 | * | |
340 | * <p>For example, the {@link PublicKeyCredentialHint#SECURITY_KEY} hint may be used to ask the | |
341 | * client to emphasize the option of authenticating with an external security key, or the {@link | |
342 | * PublicKeyCredentialHint#CLIENT_DEVICE} hint may be used to ask the client to emphasize the | |
343 | * option of authenticating a built-in passkey provider. | |
344 | * | |
345 | * <p>These hints are not requirements, and do not bind the user-agent, but may guide it in | |
346 | * providing the best experience by using contextual information about the request. | |
347 | * | |
348 | * <p>Hints MAY contradict information contained in {@link | |
349 | * PublicKeyCredentialDescriptor#getTransports()}. When this occurs, the hints take precedence. | |
350 | * | |
351 | * <p>This library does not take these hints into account in any way, other than passing them | |
352 | * through so they can be used in the argument to <code>navigator.credentials.get()</code> on | |
353 | * the client side. | |
354 | * | |
355 | * <p>The default is empty. | |
356 | * | |
357 | * @see PublicKeyCredentialHint | |
358 | * @see StartAssertionOptions#getHints() | |
359 | * @see PublicKeyCredentialRequestOptions#getHints() | |
360 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(String...) | |
361 | * @see PublicKeyCredentialRequestOptionsBuilder#hints(PublicKeyCredentialHint...) | |
362 | * @see <a | |
363 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#dom-publickeycredentialrequestoptions-hints">PublicKeyCredentialRequestOptions.hints</a> | |
364 | * @see <a | |
365 | * href="https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#enumdef-publickeycredentialhints">§5.8.7. | |
366 | * User-agent Hints Enumeration (enum PublicKeyCredentialHints)</a> | |
367 | */ | |
368 |
1
1. hints : negated conditional → KILLED |
public PublicKeyCredentialRequestOptionsBuilder hints(@NonNull List<String> hints) { |
369 | this.hints = hints; | |
370 |
1
1. hints : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::hints → KILLED |
return this; |
371 | } | |
372 | ||
373 | /** | |
374 | * Specifies the relying party identifier claimed by the caller. | |
375 | * | |
376 | * <p>If omitted, its value will be set by the client. | |
377 | */ | |
378 |
1
1. rpId : negated conditional → KILLED |
public PublicKeyCredentialRequestOptionsBuilder rpId(@NonNull Optional<String> rpId) { |
379 |
1
1. rpId : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::rpId → KILLED |
return this.rpId(rpId.orElse(null)); |
380 | } | |
381 | ||
382 | /** | |
383 | * Specifies the relying party identifier claimed by the caller. | |
384 | * | |
385 | * <p>If omitted, its value will be set by the client. | |
386 | */ | |
387 | public PublicKeyCredentialRequestOptionsBuilder rpId(String rpId) { | |
388 | this.rpId = rpId; | |
389 |
1
1. rpId : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::rpId → KILLED |
return this; |
390 | } | |
391 | ||
392 | /** | |
393 | * A list of {@link PublicKeyCredentialDescriptor} objects representing public key credentials | |
394 | * acceptable to the caller, in descending order of the caller’s preference (the first item in | |
395 | * the list is the most preferred credential, and so on down the list). | |
396 | */ | |
397 | public PublicKeyCredentialRequestOptionsBuilder allowCredentials( | |
398 |
1
1. allowCredentials : negated conditional → KILLED |
@NonNull Optional<List<PublicKeyCredentialDescriptor>> allowCredentials) { |
399 |
1
1. allowCredentials : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::allowCredentials → KILLED |
return this.allowCredentials(allowCredentials.orElse(null)); |
400 | } | |
401 | ||
402 | /** | |
403 | * A list of {@link PublicKeyCredentialDescriptor} objects representing public key credentials | |
404 | * acceptable to the caller, in descending order of the caller’s preference (the first item in | |
405 | * the list is the most preferred credential, and so on down the list). | |
406 | */ | |
407 | public PublicKeyCredentialRequestOptionsBuilder allowCredentials( | |
408 | List<PublicKeyCredentialDescriptor> allowCredentials) { | |
409 | this.allowCredentials = allowCredentials; | |
410 |
1
1. allowCredentials : replaced return value with null for com/yubico/webauthn/data/PublicKeyCredentialRequestOptions$PublicKeyCredentialRequestOptionsBuilder::allowCredentials → KILLED |
return this; |
411 | } | |
412 | } | |
413 | } | |
Mutations | ||
150 |
1.1 |
|
156 |
1.1 |
|
159 |
1.1 |
|
162 |
1.1 |
|
168 |
1.1 |
|
172 |
1.1 |
|
176 |
1.1 |
|
199 |
1.1 |
|
203 |
1.1 |
|
222 |
1.1 |
|
232 |
1.1 |
|
234 |
1.1 |
|
242 |
1.1 |
|
252 |
1.1 |
|
289 |
1.1 |
|
291 |
1.1 |
|
329 |
1.1 |
|
330 |
1.1 |
|
331 |
1.1 |
|
368 |
1.1 |
|
370 |
1.1 |
|
378 |
1.1 |
|
379 |
1.1 |
|
389 |
1.1 |
|
398 |
1.1 |
|
399 |
1.1 |
|
410 |
1.1 |