Skip to content

Commit 339eb6d

Browse files
committed
Remove credProps.authenticatorDisplayName
1 parent 45a4ca6 commit 339eb6d

File tree

9 files changed

+1
-275
lines changed

9 files changed

+1
-275
lines changed

NEWS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ New features:
5656
* (Experimental) Added property `RegisteredCredential.transports`.
5757
** NOTE: Experimental features may receive breaking changes without a major
5858
version increase.
59-
* (Experimental) Added property `credProps.authenticatorDisplayName`.
6059
** NOTE: Experimental features may receive breaking changes without a major
6160
version increase.
6261
* (Experimental) Added `credProps` extension to assertion extension outputs.

webauthn-server-core/src/main/java/com/yubico/webauthn/AssertionResult.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import com.yubico.webauthn.data.AuthenticatorResponse;
3636
import com.yubico.webauthn.data.ByteArray;
3737
import com.yubico.webauthn.data.ClientAssertionExtensionOutputs;
38-
import com.yubico.webauthn.data.Extensions;
3938
import com.yubico.webauthn.data.PublicKeyCredential;
4039
import com.yubico.webauthn.data.PublicKeyCredentialRequestOptions;
4140
import com.yubico.webauthn.data.UserIdentity;
@@ -282,33 +281,4 @@ public Optional<AuthenticatorAssertionExtensionOutputs> getAuthenticatorExtensio
282281
return AuthenticatorAssertionExtensionOutputs.fromAuthenticatorData(
283282
credentialResponse.getResponse().getParsedAuthenticatorData());
284283
}
285-
286-
/**
287-
* Retrieve a suitable nickname for this credential, if one is available. This MAY differ from
288-
* {@link RegistrationResult#getAuthenticatorDisplayName() the value returned during
289-
* registration}, if any. In that case the application may want to offer the user to update the
290-
* previously stored value, if any.
291-
*
292-
* <p>This returns the <code>authenticatorDisplayName</code> output from the <a
293-
* href="https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension">
294-
* <code>credProps</code></a> extension.
295-
*
296-
* @return A user-chosen or vendor-default display name for the credential, if available.
297-
* Otherwise empty.
298-
* @see <a
299-
* href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
300-
* <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
301-
* (credProps)</a>
302-
* @see RegistrationResult#getAuthenticatorDisplayName()
303-
* @see Extensions.CredentialProperties.CredentialPropertiesOutput#getAuthenticatorDisplayName()
304-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
305-
* the standard matures.
306-
*/
307-
@JsonIgnore
308-
@Deprecated
309-
public Optional<String> getAuthenticatorDisplayName() {
310-
return getClientExtensionOutputs()
311-
.flatMap(outputs -> outputs.getCredProps())
312-
.flatMap(credProps -> credProps.getAuthenticatorDisplayName());
313-
}
314284
}

webauthn-server-core/src/main/java/com/yubico/webauthn/AssertionResultV2.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import com.yubico.webauthn.data.AuthenticatorResponse;
3636
import com.yubico.webauthn.data.ByteArray;
3737
import com.yubico.webauthn.data.ClientAssertionExtensionOutputs;
38-
import com.yubico.webauthn.data.Extensions;
3938
import com.yubico.webauthn.data.PublicKeyCredential;
4039
import java.util.Optional;
4140
import lombok.AccessLevel;
@@ -244,33 +243,4 @@ public Optional<AuthenticatorAssertionExtensionOutputs> getAuthenticatorExtensio
244243
return AuthenticatorAssertionExtensionOutputs.fromAuthenticatorData(
245244
credentialResponse.getResponse().getParsedAuthenticatorData());
246245
}
247-
248-
/**
249-
* Retrieve a suitable nickname for this credential, if one is available. This MAY differ from
250-
* {@link RegistrationResult#getAuthenticatorDisplayName() the value returned during
251-
* registration}, if any. In that case the application may want to offer the user to update the
252-
* previously stored value, if any.
253-
*
254-
* <p>This returns the <code>authenticatorDisplayName</code> output from the <a
255-
* href="https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension">
256-
* <code>credProps</code></a> extension.
257-
*
258-
* @return A user-chosen or vendor-default display name for the credential, if available.
259-
* Otherwise empty.
260-
* @see <a
261-
* href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
262-
* <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
263-
* (credProps)</a>
264-
* @see RegistrationResult#getAuthenticatorDisplayName()
265-
* @see Extensions.CredentialProperties.CredentialPropertiesOutput#getAuthenticatorDisplayName()
266-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
267-
* the standard matures.
268-
*/
269-
@JsonIgnore
270-
@Deprecated
271-
public Optional<String> getAuthenticatorDisplayName() {
272-
return getClientExtensionOutputs()
273-
.flatMap(outputs -> outputs.getCredProps())
274-
.flatMap(credProps -> credProps.getAuthenticatorDisplayName());
275-
}
276246
}

webauthn-server-core/src/main/java/com/yubico/webauthn/RegistrationResult.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import com.yubico.webauthn.data.AuthenticatorResponse;
4040
import com.yubico.webauthn.data.ByteArray;
4141
import com.yubico.webauthn.data.ClientRegistrationExtensionOutputs;
42-
import com.yubico.webauthn.data.Extensions;
4342
import com.yubico.webauthn.data.PublicKeyCredential;
4443
import com.yubico.webauthn.data.PublicKeyCredentialDescriptor;
4544
import java.io.IOException;
@@ -368,33 +367,6 @@ public Optional<Boolean> isDiscoverable() {
368367
.flatMap(credProps -> credProps.getRk());
369368
}
370369

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-
return getClientExtensionOutputs()
394-
.flatMap(outputs -> outputs.getCredProps())
395-
.flatMap(credProps -> credProps.getAuthenticatorDisplayName());
396-
}
397-
398370
/**
399371
* The <a
400372
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#attestation-trust-path">attestation

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

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
import com.fasterxml.jackson.annotation.JsonValue;
77
import com.upokecenter.cbor.CBORObject;
88
import com.upokecenter.cbor.CBORType;
9-
import com.yubico.webauthn.AssertionResult;
10-
import com.yubico.webauthn.AssertionResultV2;
11-
import com.yubico.webauthn.RegistrationResult;
129
import com.yubico.webauthn.StartRegistrationOptions;
1310
import com.yubico.webauthn.extension.uvm.KeyProtectionType;
1411
import com.yubico.webauthn.extension.uvm.MatcherProtectionType;
@@ -74,15 +71,9 @@ public static class CredentialPropertiesOutput {
7471
@JsonProperty("rk")
7572
private final Boolean rk;
7673

77-
@JsonProperty("authenticatorDisplayName")
78-
private final String authenticatorDisplayName;
79-
8074
@JsonCreator
81-
private CredentialPropertiesOutput(
82-
@JsonProperty("rk") Boolean rk,
83-
@JsonProperty("authenticatorDisplayName") String authenticatorDisplayName) {
75+
private CredentialPropertiesOutput(@JsonProperty("rk") Boolean rk) {
8476
this.rk = rk;
85-
this.authenticatorDisplayName = authenticatorDisplayName;
8677
}
8778

8879
/**
@@ -114,34 +105,6 @@ private CredentialPropertiesOutput(
114105
public Optional<Boolean> getRk() {
115106
return Optional.ofNullable(rk);
116107
}
117-
118-
/**
119-
* This OPTIONAL property is a human-palatable description of the credential's managing
120-
* authenticator, chosen by the user.
121-
*
122-
* <p>If the application supports setting "nicknames" for registered credentials, then this
123-
* value may be a suitable default value for such a nickname.
124-
*
125-
* <p>In an authentication ceremony, if this value is different from the stored nickname, then
126-
* the application may want to offer the user to update the stored nickname to match this
127-
* value.
128-
*
129-
* @return A user-chosen or vendor-default display name for the credential, if available.
130-
* Otherwise empty.
131-
* @see <a
132-
* href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
133-
* <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
134-
* (credProps)</a>
135-
* @see RegistrationResult#getAuthenticatorDisplayName()
136-
* @see AssertionResult#getAuthenticatorDisplayName()
137-
* @see AssertionResultV2#getAuthenticatorDisplayName()
138-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change
139-
* as the standard matures.
140-
*/
141-
@Deprecated
142-
public Optional<String> getAuthenticatorDisplayName() {
143-
return Optional.ofNullable(authenticatorDisplayName);
144-
}
145108
}
146109
}
147110

webauthn-server-core/src/test/scala/com/yubico/webauthn/RelyingPartyAssertionSpec.scala

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import com.yubico.webauthn.data.AuthenticatorTransport
3838
import com.yubico.webauthn.data.ByteArray
3939
import com.yubico.webauthn.data.ClientAssertionExtensionOutputs
4040
import com.yubico.webauthn.data.CollectedClientData
41-
import com.yubico.webauthn.data.Extensions.CredentialProperties.CredentialPropertiesOutput
4241
import com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobAuthenticationInput
4342
import com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobAuthenticationOutput
4443
import com.yubico.webauthn.data.Extensions.Uvm.UvmEntry
@@ -2846,55 +2845,6 @@ class RelyingPartyAssertionSpec
28462845
)
28472846
}
28482847
}
2849-
2850-
describe("exposes the credProps.authenticatorDisplayName extension output as getAuthenticatorDisplayName()") {
2851-
val pkcTemplate =
2852-
TestAuthenticator.createAssertion(
2853-
challenge =
2854-
request.getPublicKeyCredentialRequestOptions.getChallenge,
2855-
credentialKey = credentialKeypair,
2856-
credentialId = credential.getId,
2857-
)
2858-
2859-
it("""when set to "hej".""") {
2860-
val pkc = pkcTemplate.toBuilder
2861-
.clientExtensionResults(
2862-
pkcTemplate.getClientExtensionResults.toBuilder
2863-
.credProps(
2864-
CredentialPropertiesOutput
2865-
.builder()
2866-
.authenticatorDisplayName("hej")
2867-
.build()
2868-
)
2869-
.build()
2870-
)
2871-
.build()
2872-
val result = rp.finishAssertion(
2873-
FinishAssertionOptions
2874-
.builder()
2875-
.request(request)
2876-
.response(pkc)
2877-
.build()
2878-
)
2879-
2880-
result.getAuthenticatorDisplayName.toScala should equal(
2881-
Some("hej")
2882-
)
2883-
}
2884-
2885-
it("when not available.") {
2886-
val pkc = pkcTemplate
2887-
val result = rp.finishAssertion(
2888-
FinishAssertionOptions
2889-
.builder()
2890-
.request(request)
2891-
.response(pkc)
2892-
.build()
2893-
)
2894-
2895-
result.getAuthenticatorDisplayName.toScala should equal(None)
2896-
}
2897-
}
28982848
}
28992849
}
29002850
}

webauthn-server-core/src/test/scala/com/yubico/webauthn/RelyingPartyRegistrationSpec.scala

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ class RelyingPartyRegistrationSpec
266266
"org.example.foo": "bar",
267267
"credProps": {
268268
"rk": false,
269-
"authenticatorDisplayName": "My passkey",
270269
"unknownProperty": ["unknown-value"]
271270
}
272271
}
@@ -4289,51 +4288,6 @@ class RelyingPartyRegistrationSpec
42894288
}
42904289
}
42914290

4292-
describe("expose the credProps.authenticatorDisplayName extension output as RegistrationResult.getAuthenticatorDisplayName()") {
4293-
val testDataBase = RegistrationTestData.Packed.BasicAttestation
4294-
val testData = testDataBase.copy(requestedExtensions =
4295-
testDataBase.request.getExtensions.toBuilder.credProps().build()
4296-
)
4297-
4298-
it("""when set to "hej".""") {
4299-
val result = rp.finishRegistration(
4300-
FinishRegistrationOptions
4301-
.builder()
4302-
.request(testData.request)
4303-
.response(
4304-
testData.response.toBuilder
4305-
.clientExtensionResults(
4306-
ClientRegistrationExtensionOutputs
4307-
.builder()
4308-
.credProps(
4309-
CredentialPropertiesOutput
4310-
.builder()
4311-
.authenticatorDisplayName("hej")
4312-
.build()
4313-
)
4314-
.build()
4315-
)
4316-
.build()
4317-
)
4318-
.build()
4319-
)
4320-
4321-
result.getAuthenticatorDisplayName.toScala should equal(Some("hej"))
4322-
}
4323-
4324-
it("when not available.") {
4325-
val result = rp.finishRegistration(
4326-
FinishRegistrationOptions
4327-
.builder()
4328-
.request(testData.request)
4329-
.response(testData.response)
4330-
.build()
4331-
)
4332-
4333-
result.getAuthenticatorDisplayName.toScala should equal(None)
4334-
}
4335-
}
4336-
43374291
describe("support the largeBlob extension") {
43384292
it("being enabled at registration time.") {
43394293
val testData = RegistrationTestData.Packed.BasicAttestation

webauthn-server-core/src/test/scala/com/yubico/webauthn/RelyingPartyV2AssertionSpec.scala

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import com.yubico.webauthn.data.AuthenticatorTransport
3838
import com.yubico.webauthn.data.ByteArray
3939
import com.yubico.webauthn.data.ClientAssertionExtensionOutputs
4040
import com.yubico.webauthn.data.CollectedClientData
41-
import com.yubico.webauthn.data.Extensions.CredentialProperties.CredentialPropertiesOutput
4241
import com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobAuthenticationInput
4342
import com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobAuthenticationOutput
4443
import com.yubico.webauthn.data.Extensions.Uvm.UvmEntry
@@ -2921,55 +2920,6 @@ class RelyingPartyV2AssertionSpec
29212920
)
29222921
}
29232922
}
2924-
2925-
describe("exposes the credProps.authenticatorDisplayName extension output as getAuthenticatorDisplayName()") {
2926-
val pkcTemplate =
2927-
TestAuthenticator.createAssertion(
2928-
challenge =
2929-
request.getPublicKeyCredentialRequestOptions.getChallenge,
2930-
credentialKey = credentialKeypair,
2931-
credentialId = credential.getId,
2932-
)
2933-
2934-
it("""when set to "hej".""") {
2935-
val pkc = pkcTemplate.toBuilder
2936-
.clientExtensionResults(
2937-
pkcTemplate.getClientExtensionResults.toBuilder
2938-
.credProps(
2939-
CredentialPropertiesOutput
2940-
.builder()
2941-
.authenticatorDisplayName("hej")
2942-
.build()
2943-
)
2944-
.build()
2945-
)
2946-
.build()
2947-
val result = rp.finishAssertion(
2948-
FinishAssertionOptions
2949-
.builder()
2950-
.request(request)
2951-
.response(pkc)
2952-
.build()
2953-
)
2954-
2955-
result.getAuthenticatorDisplayName.toScala should equal(
2956-
Some("hej")
2957-
)
2958-
}
2959-
2960-
it("when not available.") {
2961-
val pkc = pkcTemplate
2962-
val result = rp.finishAssertion(
2963-
FinishAssertionOptions
2964-
.builder()
2965-
.request(request)
2966-
.response(pkc)
2967-
.build()
2968-
)
2969-
2970-
result.getAuthenticatorDisplayName.toScala should equal(None)
2971-
}
2972-
}
29732923
}
29742924
}
29752925
}

webauthn-server-core/src/test/scala/com/yubico/webauthn/data/Generators.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,9 @@ object Generators {
868868
def credentialPropertiesOutput: Gen[CredentialPropertiesOutput] =
869869
for {
870870
rk <- arbitrary[Option[Boolean]]
871-
authenticatorDisplayName <- arbitrary[Option[String]]
872871
} yield {
873872
val b = CredentialPropertiesOutput.builder()
874873
rk.foreach(b.rk(_))
875-
authenticatorDisplayName.foreach(b.authenticatorDisplayName)
876874
b.build()
877875
}
878876
}

0 commit comments

Comments
 (0)