Skip to content

Rename misleading WebAuthn4J credential options methods - #759

Merged
tsegismont merged 1 commit into
eclipse-vertx:masterfrom
SiteNetSoft:issue-698-webauthn4j-method-names
Sep 15, 2026
Merged

tsegismont merged 1 commit into
eclipse-vertx:masterfrom
SiteNetSoft:issue-698-webauthn4j-method-names

Conversation

@jnbdz

@jnbdz jnbdz commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

As reported in #698, createCredentialsOptions and getCredentialsOptions read as if they create and return a CredentialsOptions object, while they actually create PublicKeyCredentialCreationOptions (for navigator.credentials.create()) and PublicKeyCredentialRequestOptions (for navigator.credentials.get()).

This introduces createPublicKeyCredentialCreationOptions and createPublicKeyCredentialRequestOptions as the primary methods, and turns the old names into @Deprecated default methods that delegate — the issue proposed a hard rename while the module was pre-release, but 5.x has since shipped with the old names (and WebAuthn4JHandler in vertx-web calls them), so a deprecation cycle seemed safer. If a hard break is preferred for the next major, the old defaults are trivial to drop.

Naming note: the issue suggested createPublicKeyCredentialGetOptions for the second method; this PR uses RequestOptions to match the spec dictionary name (PublicKeyCredentialRequestOptions) and WebAuthn4J's own class name — happy to adjust if the original suggestion is preferred.

Also fixes the javadoc of the request options method, which linked to the creation options dictionary of the spec, and updates docs/examples to the new names. Tests cover both the new names and the deprecated delegating aliases.

Fixes #698

createCredentialsOptions and getCredentialsOptions suggest they create
and return a CredentialsOptions object, while they actually create
PublicKeyCredentialCreationOptions and PublicKeyCredentialRequestOptions
respectively.

Introduce createPublicKeyCredentialCreationOptions and
createPublicKeyCredentialRequestOptions, keeping the old names as
deprecated delegating defaults since 5.x already shipped with them. Also
fix the request options javadoc which linked to the creation options
dictionary of the spec.

Fixes eclipse-vertx#698
@tsegismont
tsegismont force-pushed the issue-698-webauthn4j-method-names branch from f3fb314 to c925fa0 Compare September 15, 2026 14:23

@tsegismont tsegismont left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@tsegismont
tsegismont merged commit ff4d318 into eclipse-vertx:master Sep 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename WebAuthn4J credential options methods to match W3C specification terminology

2 participants