RegistrationResult.java

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;
26
27
import com.fasterxml.jackson.annotation.JsonCreator;
28
import com.fasterxml.jackson.annotation.JsonIgnore;
29
import com.fasterxml.jackson.annotation.JsonProperty;
30
import com.yubico.internal.util.CertificateParser;
31
import com.yubico.webauthn.RelyingParty.RelyingPartyBuilder;
32
import com.yubico.webauthn.attestation.AttestationTrustSource;
33
import com.yubico.webauthn.data.AttestationType;
34
import com.yubico.webauthn.data.AuthenticatorAttachment;
35
import com.yubico.webauthn.data.AuthenticatorAttestationResponse;
36
import com.yubico.webauthn.data.AuthenticatorData;
37
import com.yubico.webauthn.data.AuthenticatorDataFlags;
38
import com.yubico.webauthn.data.AuthenticatorRegistrationExtensionOutputs;
39
import com.yubico.webauthn.data.AuthenticatorResponse;
40
import com.yubico.webauthn.data.ByteArray;
41
import com.yubico.webauthn.data.ClientRegistrationExtensionOutputs;
42
import com.yubico.webauthn.data.Extensions;
43
import com.yubico.webauthn.data.PublicKeyCredential;
44
import com.yubico.webauthn.data.PublicKeyCredentialDescriptor;
45
import java.io.IOException;
46
import java.security.NoSuchAlgorithmException;
47
import java.security.PublicKey;
48
import java.security.cert.CertificateEncodingException;
49
import java.security.cert.CertificateException;
50
import java.security.cert.X509Certificate;
51
import java.security.spec.InvalidKeySpecException;
52
import java.util.List;
53
import java.util.Optional;
54
import java.util.stream.Collectors;
55
import lombok.AccessLevel;
56
import lombok.Getter;
57
import lombok.NonNull;
58
import lombok.Value;
59
60
/** The result of a call to {@link RelyingParty#finishRegistration(FinishRegistrationOptions)}. */
61
@Value
62
public class RegistrationResult {
63
64
  @JsonProperty
65
  @Getter(AccessLevel.NONE)
66
  private final PublicKeyCredential<
67
          AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs>
68
      credential;
69
70
  /**
71
   * <code>true</code> if and only if the attestation signature was successfully linked to a trusted
72
   * attestation root.
73
   *
74
   * <p>This will always be <code>false</code> unless the {@link
75
   * RelyingPartyBuilder#attestationTrustSource(AttestationTrustSource) attestationTrustSource}
76
   * setting was configured on the {@link RelyingParty} instance.
77
   *
78
   * <p>You can ignore this if authenticator attestation is not relevant to your application.
79
   */
80
  private final boolean attestationTrusted;
81
82
  /**
83
   * The <a
84
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-attestation-types">attestation
85
   * type</a> that was used for the created credential.
86
   *
87
   * <p>You can ignore this if authenticator attestation is not relevant to your application.
88
   *
89
   * @see <a
90
   *     href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-attestation-types">§6.4.3.
91
   *     Attestation Types</a>
92
   */
93
  @NonNull private final AttestationType attestationType;
94
95
  // JavaDoc on getter
96
  private final List<X509Certificate> attestationTrustPath;
97
98
  RegistrationResult(
99
      PublicKeyCredential<AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs>
100
          credential,
101
      boolean attestationTrusted,
102 1 1. <init> : negated conditional → KILLED
      @NonNull AttestationType attestationType,
103
      Optional<List<X509Certificate>> attestationTrustPath) {
104
    this.credential = credential;
105
    this.attestationTrusted = attestationTrusted;
106
    this.attestationType = attestationType;
107
    this.attestationTrustPath = attestationTrustPath.orElse(null);
108
  }
109
110
  @JsonCreator
111
  private static RegistrationResult fromJson(
112 1 1. fromJson : negated conditional → KILLED
      @NonNull @JsonProperty("credential")
113
          PublicKeyCredential<AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs>
114
              credential,
115
      @JsonProperty("attestationTrusted") boolean attestationTrusted,
116 1 1. fromJson : negated conditional → KILLED
      @NonNull @JsonProperty("attestationType") AttestationType attestationType,
117 1 1. fromJson : negated conditional → KILLED
      @NonNull @JsonProperty("attestationTrustPath") Optional<List<String>> attestationTrustPath) {
118 1 1. fromJson : replaced return value with null for com/yubico/webauthn/RegistrationResult::fromJson → KILLED
    return new RegistrationResult(
119
        credential,
120
        attestationTrusted,
121
        attestationType,
122
        attestationTrustPath.map(
123
            atp ->
124
                atp.stream()
125
                    .map(
126
                        pem -> {
127
                          try {
128 1 1. lambda$fromJson$0 : replaced return value with null for com/yubico/webauthn/RegistrationResult::lambda$fromJson$0 → KILLED
                            return CertificateParser.parsePem(pem);
129
                          } catch (CertificateException e) {
130
                            throw new RuntimeException(e);
131
                          }
132
                        })
133 1 1. lambda$fromJson$1 : replaced return value with Collections.emptyList for com/yubico/webauthn/RegistrationResult::lambda$fromJson$1 → KILLED
                    .collect(Collectors.toList())));
134
  }
135
136
  /**
137
   * Check whether the <a href="https://www.w3.org/TR/webauthn/#user-verification">user
138
   * verification</a> as performed during the registration ceremony.
139
   *
140
   * <p>This flag is also available via <code>
141
   * {@link PublicKeyCredential}.{@link PublicKeyCredential#getResponse() getResponse()}.{@link AuthenticatorResponse#getParsedAuthenticatorData() getParsedAuthenticatorData()}.{@link AuthenticatorData#getFlags() getFlags()}.{@link AuthenticatorDataFlags#UV UV}
142
   * </code>.
143
   *
144
   * @return <code>true</code> if and only if the authenticator claims to have performed user
145
   *     verification during the registration ceremony.
146
   * @see <a href="https://www.w3.org/TR/webauthn/#user-verification">User Verification</a>
147
   * @see <a href="https://w3c.github.io/webauthn/#authdata-flags-uv">UV flag in §6.1. Authenticator
148
   *     Data</a>
149
   */
150
  @JsonIgnore
151
  public boolean isUserVerified() {
152 2 1. isUserVerified : replaced boolean return with false for com/yubico/webauthn/RegistrationResult::isUserVerified → KILLED
2. isUserVerified : replaced boolean return with true for com/yubico/webauthn/RegistrationResult::isUserVerified → KILLED
    return credential.getResponse().getParsedAuthenticatorData().getFlags().UV;
153
  }
154
155
  /**
156
   * Check whether the created credential is <a
157
   * href="https://w3c.github.io/webauthn/#backup-eligible">backup eligible</a>, using the <a
158
   * href="https://w3c.github.io/webauthn/#authdata-flags-be">BE flag</a> in the authenticator data.
159
   *
160
   * <p>You SHOULD store this value in your representation of a {@link RegisteredCredential}. {@link
161
   * CredentialRepository} implementations SHOULD set this value as the {@link
162
   * RegisteredCredential.RegisteredCredentialBuilder#backupEligible(Boolean)
163
   * backupEligible(Boolean)} value when reconstructing that {@link RegisteredCredential}.
164
   *
165
   * @return <code>true</code> if and only if the created credential is backup eligible. NOTE that
166
   *     this is only a hint and not a guarantee, unless backed by a trusted authenticator
167
   *     attestation.
168
   * @see <a href="https://w3c.github.io/webauthn/#backup-eligible">Backup Eligible in §4.
169
   *     Terminology</a>
170
   * @see <a href="https://w3c.github.io/webauthn/#authdata-flags-be">BE flag in §6.1. Authenticator
171
   *     Data</a>
172
   * @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
173
   *     the standard matures.
174
   */
175
  @Deprecated
176
  @JsonIgnore
177
  public boolean isBackupEligible() {
178 2 1. isBackupEligible : replaced boolean return with true for com/yubico/webauthn/RegistrationResult::isBackupEligible → KILLED
2. isBackupEligible : replaced boolean return with false for com/yubico/webauthn/RegistrationResult::isBackupEligible → KILLED
    return credential.getResponse().getParsedAuthenticatorData().getFlags().BE;
179
  }
180
181
  /**
182
   * Get the current <a href="https://w3c.github.io/webauthn/#backup-state">backup state</a> of the
183
   * created credential, using the <a href="https://w3c.github.io/webauthn/#authdata-flags-bs">BS
184
   * flag</a> in the authenticator data.
185
   *
186
   * <p>You SHOULD store this value in your representation of a {@link RegisteredCredential}. {@link
187
   * CredentialRepository} implementations SHOULD set this value as the {@link
188
   * RegisteredCredential.RegisteredCredentialBuilder#backupState(Boolean) backupState(Boolean)}
189
   * value when reconstructing that {@link RegisteredCredential}.
190
   *
191
   * @return <code>true</code> if and only if the created credential is believed to currently be
192
   *     backed up. NOTE that this is only a hint and not a guarantee, unless backed by a trusted
193
   *     authenticator attestation.
194
   * @see <a href="https://w3c.github.io/webauthn/#backup-state">Backup State in §4. Terminology</a>
195
   * @see <a href="https://w3c.github.io/webauthn/#authdata-flags-bs">BS flag in §6.1. Authenticator
196
   *     Data</a>
197
   * @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
198
   *     the standard matures.
199
   */
200
  @Deprecated
201
  @JsonIgnore
202
  public boolean isBackedUp() {
203 2 1. isBackedUp : replaced boolean return with true for com/yubico/webauthn/RegistrationResult::isBackedUp → KILLED
2. isBackedUp : replaced boolean return with false for com/yubico/webauthn/RegistrationResult::isBackedUp → KILLED
    return credential.getResponse().getParsedAuthenticatorData().getFlags().BS;
204
  }
205
206
  /**
207
   * The <a href="https://w3c.github.io/webauthn/#authenticator-attachment-modality">authenticator
208
   * attachment modality</a> in effect at the time the credential was created.
209
   *
210
   * @see PublicKeyCredential#getAuthenticatorAttachment()
211
   * @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
212
   *     the standard matures.
213
   */
214
  @Deprecated
215
  @JsonIgnore
216
  public Optional<AuthenticatorAttachment> getAuthenticatorAttachment() {
217 1 1. getAuthenticatorAttachment : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAuthenticatorAttachment → KILLED
    return credential.getAuthenticatorAttachment();
218
  }
219
220
  /**
221
   * The signature count returned with the created credential.
222
   *
223
   * <p>This is used in {@link RelyingParty#finishAssertion(FinishAssertionOptions)} to verify the
224
   * validity of future signature counter values.
225
   *
226
   * @see RegisteredCredential#getSignatureCount()
227
   */
228
  @JsonIgnore
229
  public long getSignatureCount() {
230 1 1. getSignatureCount : replaced long return with 0 for com/yubico/webauthn/RegistrationResult::getSignatureCount → KILLED
    return credential.getResponse().getParsedAuthenticatorData().getSignatureCounter();
231
  }
232
233
  /**
234
   * The <a href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#credential-id">credential
235
   * ID</a> and <a
236
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dom-publickeycredentialdescriptor-transports">transports</a>
237
   * of the created credential.
238
   *
239
   * @see <a href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#credential-id">Credential
240
   *     ID</a>
241
   * @see <a
242
   *     href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dictionary-credential-descriptor">5.8.3.
243
   *     Credential Descriptor (dictionary PublicKeyCredentialDescriptor)</a>
244
   * @see PublicKeyCredential#getId()
245
   */
246
  @JsonIgnore
247
  public PublicKeyCredentialDescriptor getKeyId() {
248 1 1. getKeyId : replaced return value with null for com/yubico/webauthn/RegistrationResult::getKeyId → KILLED
    return PublicKeyCredentialDescriptor.builder()
249
        .id(credential.getId())
250
        .type(credential.getType())
251
        .transports(credential.getResponse().getTransports())
252
        .build();
253
  }
254
255
  /**
256
   * The <a href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#aaguid"><code>aaguid</code>
257
   * </a> reported in the <a
258
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-authenticator-data">of the
259
   * created credential.</a>
260
   *
261
   * <p>This MAY be an AAGUID consisting of only zeroes.
262
   */
263
  @JsonIgnore
264
  public ByteArray getAaguid() {
265 1 1. getAaguid : replaced return value with null for com/yubico/webauthn/RegistrationResult::getAaguid → KILLED
    return credential
266
        .getResponse()
267
        .getAttestation()
268
        .getAuthenticatorData()
269
        .getAttestedCredentialData()
270
        .get()
271
        .getAaguid();
272
  }
273
274
  /**
275
   * The public key of the created credential.
276
   *
277
   * <p>This is used in {@link RelyingParty#finishAssertion(FinishAssertionOptions)} to verify the
278
   * authentication signatures.
279
   *
280
   * @see RegisteredCredential#getPublicKeyCose()
281
   */
282
  @JsonIgnore
283
  public ByteArray getPublicKeyCose() {
284 1 1. getPublicKeyCose : replaced return value with null for com/yubico/webauthn/RegistrationResult::getPublicKeyCose → KILLED
    return credential
285
        .getResponse()
286
        .getAttestation()
287
        .getAuthenticatorData()
288
        .getAttestedCredentialData()
289
        .get()
290
        .getCredentialPublicKey();
291
  }
292
293
  /**
294
   * The public key of the created credential, parsed as a {@link PublicKey} object.
295
   *
296
   * @see #getPublicKeyCose()
297
   * @see RegisteredCredential#getParsedPublicKey()
298
   */
299
  @NonNull
300
  @JsonIgnore
301
  public PublicKey getParsedPublicKey()
302
      throws InvalidKeySpecException, NoSuchAlgorithmException, IOException {
303 1 1. getParsedPublicKey : replaced return value with null for com/yubico/webauthn/RegistrationResult::getParsedPublicKey → NO_COVERAGE
    return WebAuthnCodecs.importCosePublicKey(getPublicKeyCose());
304
  }
305
306
  /**
307
   * The <a
308
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#client-extension-output">client
309
   * extension outputs</a>, if any.
310
   *
311
   * <p>This is present if and only if at least one extension output is present in the return value.
312
   *
313
   * @see <a
314
   *     href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-client-extension-processing">§9.4.
315
   *     Client Extension Processing</a>
316
   * @see ClientRegistrationExtensionOutputs
317
   * @see #getAuthenticatorExtensionOutputs() ()
318
   */
319
  @JsonIgnore
320
  public Optional<ClientRegistrationExtensionOutputs> getClientExtensionOutputs() {
321 1 1. getClientExtensionOutputs : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getClientExtensionOutputs → KILLED
    return Optional.ofNullable(credential.getClientExtensionResults())
322 2 1. lambda$getClientExtensionOutputs$2 : replaced boolean return with true for com/yubico/webauthn/RegistrationResult::lambda$getClientExtensionOutputs$2 → SURVIVED
2. lambda$getClientExtensionOutputs$2 : negated conditional → KILLED
        .filter(ceo -> !ceo.getExtensionIds().isEmpty());
323
  }
324
325
  /**
326
   * The <a
327
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#authenticator-extension-output">authenticator
328
   * extension outputs</a>, if any.
329
   *
330
   * <p>This is present if and only if at least one extension output is present in the return value.
331
   *
332
   * @see <a
333
   *     href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-authenticator-extension-processing">§9.5.
334
   *     Authenticator Extension Processing</a>
335
   * @see AuthenticatorRegistrationExtensionOutputs
336
   * @see #getClientExtensionOutputs()
337
   */
338
  @JsonIgnore
339
  public Optional<AuthenticatorRegistrationExtensionOutputs> getAuthenticatorExtensionOutputs() {
340 1 1. getAuthenticatorExtensionOutputs : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAuthenticatorExtensionOutputs → KILLED
    return AuthenticatorRegistrationExtensionOutputs.fromAuthenticatorData(
341
        credential.getResponse().getParsedAuthenticatorData());
342
  }
343
344
  /**
345
   * Try to determine whether the created credential is a <a
346
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#discoverable-credential">discoverable
347
   * credential</a>, also called a <i>passkey</i>, using the output from the <a
348
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-authenticator-credential-properties-extension">
349
   * <code>credProps</code></a> extension.
350
   *
351
   * @return A present <code>true</code> if the created credential is a passkey (discoverable). A
352
   *     present <code>
353
   *     false</code> if the created credential is not a passkey. An empty value if it is not known
354
   *     whether the created credential is a passkey.
355
   * @see <a
356
   *     href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dom-credentialpropertiesoutput-rk">§10.4.
357
   *     Credential Properties Extension (credProps), "rk" output</a>
358
   * @see <a
359
   *     href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#discoverable-credential">Discoverable
360
   *     Credential</a>
361
   * @see <a href="https://passkeys.dev/docs/reference/terms/#passkey">Passkey</a> in <a
362
   *     href="https://passkeys.dev">passkeys.dev</a> reference
363
   */
364
  @JsonIgnore
365
  public Optional<Boolean> isDiscoverable() {
366 1 1. isDiscoverable : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::isDiscoverable → KILLED
    return getClientExtensionOutputs()
367 1 1. lambda$isDiscoverable$3 : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$isDiscoverable$3 → KILLED
        .flatMap(outputs -> outputs.getCredProps())
368 1 1. lambda$isDiscoverable$4 : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$isDiscoverable$4 → KILLED
        .flatMap(credProps -> credProps.getRk());
369
  }
370
371
  /**
372
   * Retrieve a suitable nickname for this credential, if one is available.
373
   *
374
   * <p>This returns the <code>authenticatorDisplayName</code> output from the <a
375
   * href="https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension">
376
   * <code>credProps</code></a> extension.
377
   *
378
   * @return A user-chosen or vendor-default display name for the credential, if available.
379
   *     Otherwise empty.
380
   * @see <a
381
   *     href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
382
   *     <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
383
   *     (credProps)</a>
384
   * @see AssertionResult#getAuthenticatorDisplayName()
385
   * @see AssertionResultV2#getAuthenticatorDisplayName()
386
   * @see Extensions.CredentialProperties.CredentialPropertiesOutput#getAuthenticatorDisplayName()
387
   * @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
388
   *     the standard matures.
389
   */
390
  @JsonIgnore
391
  @Deprecated
392
  public Optional<String> getAuthenticatorDisplayName() {
393 1 1. getAuthenticatorDisplayName : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAuthenticatorDisplayName → KILLED
    return getClientExtensionOutputs()
394 1 1. lambda$getAuthenticatorDisplayName$5 : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$getAuthenticatorDisplayName$5 → KILLED
        .flatMap(outputs -> outputs.getCredProps())
395 1 1. lambda$getAuthenticatorDisplayName$6 : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$getAuthenticatorDisplayName$6 → KILLED
        .flatMap(credProps -> credProps.getAuthenticatorDisplayName());
396
  }
397
398
  /**
399
   * The <a
400
   * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#attestation-trust-path">attestation
401
   * trust path</a> for the created credential, if any.
402
   *
403
   * <p>If present, this may be useful for looking up attestation metadata from external sources.
404
   * The attestation trust path has been successfully verified as trusted if and only if {@link
405
   * #isAttestationTrusted()} is <code>true</code>.
406
   *
407
   * <p>You can ignore this if authenticator attestation is not relevant to your application.
408
   *
409
   * @see <a
410
   *     href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#attestation-trust-path">Attestation
411
   *     trust path</a>
412
   */
413
  @JsonIgnore
414
  public Optional<List<X509Certificate>> getAttestationTrustPath() {
415 1 1. getAttestationTrustPath : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAttestationTrustPath → KILLED
    return Optional.ofNullable(attestationTrustPath);
416
  }
417
418
  @JsonProperty("attestationTrustPath")
419
  private Optional<List<String>> getAttestationTrustPathJson() {
420 1 1. getAttestationTrustPathJson : replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAttestationTrustPathJson → KILLED
    return getAttestationTrustPath()
421
        .map(
422
            x5c ->
423
                x5c.stream()
424
                    .map(
425
                        cert -> {
426
                          try {
427 1 1. lambda$getAttestationTrustPathJson$7 : replaced return value with "" for com/yubico/webauthn/RegistrationResult::lambda$getAttestationTrustPathJson$7 → KILLED
                            return new ByteArray(cert.getEncoded()).getBase64();
428
                          } catch (CertificateEncodingException e) {
429
                            throw new RuntimeException(e);
430
                          }
431
                        })
432 1 1. lambda$getAttestationTrustPathJson$8 : replaced return value with Collections.emptyList for com/yubico/webauthn/RegistrationResult::lambda$getAttestationTrustPathJson$8 → KILLED
                    .collect(Collectors.toList()));
433
  }
434
}

Mutations

102

1.1
Location : <init>
Killed by : com.yubico.webauthn.RelyingPartyCeremoniesSpec
negated conditional → KILLED

112

1.1
Location : fromJson
Killed by : com.yubico.webauthn.data.JsonIoSpec
negated conditional → KILLED

116

1.1
Location : fromJson
Killed by : com.yubico.webauthn.data.JsonIoSpec
negated conditional → KILLED

117

1.1
Location : fromJson
Killed by : com.yubico.webauthn.data.JsonIoSpec
negated conditional → KILLED

118

1.1
Location : fromJson
Killed by : com.yubico.webauthn.data.JsonIoSpec
replaced return value with null for com/yubico/webauthn/RegistrationResult::fromJson → KILLED

128

1.1
Location : lambda$fromJson$0
Killed by : com.yubico.webauthn.data.JsonIoSpec
replaced return value with null for com/yubico/webauthn/RegistrationResult::lambda$fromJson$0 → KILLED

133

1.1
Location : lambda$fromJson$1
Killed by : com.yubico.webauthn.data.JsonIoSpec
replaced return value with Collections.emptyList for com/yubico/webauthn/RegistrationResult::lambda$fromJson$1 → KILLED

152

1.1
Location : isUserVerified
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced boolean return with false for com/yubico/webauthn/RegistrationResult::isUserVerified → KILLED

2.2
Location : isUserVerified
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced boolean return with true for com/yubico/webauthn/RegistrationResult::isUserVerified → KILLED

178

1.1
Location : isBackupEligible
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced boolean return with true for com/yubico/webauthn/RegistrationResult::isBackupEligible → KILLED

2.2
Location : isBackupEligible
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced boolean return with false for com/yubico/webauthn/RegistrationResult::isBackupEligible → KILLED

203

1.1
Location : isBackedUp
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced boolean return with true for com/yubico/webauthn/RegistrationResult::isBackedUp → KILLED

2.2
Location : isBackedUp
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced boolean return with false for com/yubico/webauthn/RegistrationResult::isBackedUp → KILLED

217

1.1
Location : getAuthenticatorAttachment
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAuthenticatorAttachment → KILLED

230

1.1
Location : getSignatureCount
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced long return with 0 for com/yubico/webauthn/RegistrationResult::getSignatureCount → KILLED

248

1.1
Location : getKeyId
Killed by : com.yubico.webauthn.RelyingPartyCeremoniesSpec
replaced return value with null for com/yubico/webauthn/RegistrationResult::getKeyId → KILLED

265

1.1
Location : getAaguid
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with null for com/yubico/webauthn/RegistrationResult::getAaguid → KILLED

284

1.1
Location : getPublicKeyCose
Killed by : com.yubico.webauthn.RelyingPartyCeremoniesSpec
replaced return value with null for com/yubico/webauthn/RegistrationResult::getPublicKeyCose → KILLED

303

1.1
Location : getParsedPublicKey
Killed by : none
replaced return value with null for com/yubico/webauthn/RegistrationResult::getParsedPublicKey → NO_COVERAGE

321

1.1
Location : getClientExtensionOutputs
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getClientExtensionOutputs → KILLED

322

1.1
Location : lambda$getClientExtensionOutputs$2
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
negated conditional → KILLED

2.2
Location : lambda$getClientExtensionOutputs$2
Killed by : none
replaced boolean return with true for com/yubico/webauthn/RegistrationResult::lambda$getClientExtensionOutputs$2 → SURVIVED

340

1.1
Location : getAuthenticatorExtensionOutputs
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAuthenticatorExtensionOutputs → KILLED

366

1.1
Location : isDiscoverable
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::isDiscoverable → KILLED

367

1.1
Location : lambda$isDiscoverable$3
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$isDiscoverable$3 → KILLED

368

1.1
Location : lambda$isDiscoverable$4
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$isDiscoverable$4 → KILLED

393

1.1
Location : getAuthenticatorDisplayName
Killed by : com.yubico.webauthn.RelyingPartyRegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAuthenticatorDisplayName → KILLED

394

1.1
Location : lambda$getAuthenticatorDisplayName$5
Killed by : com.yubico.webauthn.RelyingPartyRegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$getAuthenticatorDisplayName$5 → KILLED

395

1.1
Location : lambda$getAuthenticatorDisplayName$6
Killed by : com.yubico.webauthn.RelyingPartyRegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::lambda$getAuthenticatorDisplayName$6 → KILLED

415

1.1
Location : getAttestationTrustPath
Killed by : com.yubico.webauthn.RelyingPartyV2RegistrationSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAttestationTrustPath → KILLED

420

1.1
Location : getAttestationTrustPathJson
Killed by : com.yubico.webauthn.data.JsonIoSpec
replaced return value with Optional.empty for com/yubico/webauthn/RegistrationResult::getAttestationTrustPathJson → KILLED

427

1.1
Location : lambda$getAttestationTrustPathJson$7
Killed by : com.yubico.webauthn.data.JsonIoSpec
replaced return value with "" for com/yubico/webauthn/RegistrationResult::lambda$getAttestationTrustPathJson$7 → KILLED

432

1.1
Location : lambda$getAttestationTrustPathJson$8
Killed by : com.yubico.webauthn.data.JsonIoSpec
replaced return value with Collections.emptyList for com/yubico/webauthn/RegistrationResult::lambda$getAttestationTrustPathJson$8 → KILLED

Active mutators

Tests examined


Report generated by PIT 1.15.0