Skip to content

Commit db3f868

Browse files
committed
Rename getPublicKeyAsPublicKey to getParsedPublicKey, refine JavaDoc
1 parent de39170 commit db3f868

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ public final class RegisteredCredential {
9090
@NonNull private final ByteArray publicKeyCose;
9191

9292
/**
93-
* The credential public key, as a {@link java.security.PublicKey} object.
93+
* The public key of the credential, parsed as a {@link PublicKey} object.
9494
*
95-
* <p>Provided for convenience.
95+
* @see #getPublicKeyCose()
96+
* @see RegistrationResult#getParsedPublicKey()
9697
*/
9798
@NonNull
9899
@JsonIgnore
99-
public PublicKey getPublicKeyAsPublicKey()
100+
public PublicKey getParsedPublicKey()
100101
throws InvalidKeySpecException, NoSuchAlgorithmException, CoseException, IOException {
101102
return WebAuthnCodecs.importCosePublicKey(getPublicKeyCose());
102103
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,14 @@ public ByteArray getPublicKeyCose() {
269269
}
270270

271271
/**
272-
* The public key of the created credential, as a {@link java.security.PublicKey} object.
272+
* The public key of the created credential, parsed as a {@link PublicKey} object.
273273
*
274-
* <p>Provided for convenience.
274+
* @see #getPublicKeyCose()
275+
* @see RegisteredCredential#getParsedPublicKey()
275276
*/
276277
@NonNull
277278
@JsonIgnore
278-
public PublicKey getPublicKeyAsPublicKey()
279+
public PublicKey getParsedPublicKey()
279280
throws InvalidKeySpecException, NoSuchAlgorithmException, CoseException, IOException {
280281
return WebAuthnCodecs.importCosePublicKey(getPublicKeyCose());
281282
}

0 commit comments

Comments
 (0)