Class RegisteredCredential.RegisteredCredentialBuilder
- Enclosing class:
- RegisteredCredential
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
credentialId
(@NonNull ByteArray credentialId) The credential ID of the credential.publicKeyCose
(@NonNull ByteArray publicKeyCose) The credential public key encoded in COSE_Key format, as defined in Section 7 of RFC 8152.publicKeyEs256Raw
(ByteArray publicKeyEs256Raw) Specify the credential public key in U2F format.signatureCount
(long signatureCount) The stored signature count of the credential.toString()
userHandle
(@NonNull ByteArray userHandle) The user handle of the user the credential is registered to.
-
Method Details
-
publicKeyCose
public RegisteredCredential.RegisteredCredentialBuilder publicKeyCose(@NonNull @NonNull ByteArray publicKeyCose) The credential public key encoded in COSE_Key format, as defined in Section 7 of RFC 8152. This method overwritespublicKeyEs256Raw(ByteArray)
.The return value of
RegistrationResult.getPublicKeyCose()
is a suitable argument for this method.This is used to verify the
signature
in authentication assertions.Alternatively, the public key can be specified using the
publicKeyEs256Raw(ByteArray)
method if the key is stored in the U2F format (ALG_KEY_ECC_X962_RAW
as specified in FIDO Registry §3.6.2 Public Key Representation Formats). This is mostly useful for public keys registered via the U2F JavaScript API. -
publicKeyEs256Raw
public RegisteredCredential.RegisteredCredentialBuilder publicKeyEs256Raw(ByteArray publicKeyEs256Raw) Specify the credential public key in U2F format. This method overwritespublicKeyCose(ByteArray)
.An alternative to
publicKeyCose(ByteArray)
, this method expects anES256
public key inALG_KEY_ECC_X962_RAW
format as specified in FIDO Registry §3.6.2 Public Key Representation Formats.This is primarily intended for public keys registered via the U2F JavaScript API. If your application has only used the
navigator.credentials.create()
API to register credentials, you should usepublicKeyCose(ByteArray)
instead.- See Also:
-
credentialId
public RegisteredCredential.RegisteredCredentialBuilder credentialId(@NonNull @NonNull ByteArray credentialId) The credential ID of the credential.- Returns:
this
.- See Also:
-
userHandle
public RegisteredCredential.RegisteredCredentialBuilder userHandle(@NonNull @NonNull ByteArray userHandle) The user handle of the user the credential is registered to.- Returns:
this
.- See Also:
-
signatureCount
The stored signature count of the credential.This is used to validate the
signature counter
in authentication assertions.- Returns:
this
.- See Also:
-
build
-
toString
-