Interface CredentialRecord
- All Superinterfaces:
ToPublicKeyCredentialDescriptor
- All Known Implementing Classes:
RegisteredCredential
- See Also:
-
- Credential Record in Web Authentication Level 3 (Editor's Draft)
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteArraycosePublicKeyFromEs256Raw(ByteArray es256RawKey) Deprecated.Convert a credential public key from U2F format to COSE_Key format.@NonNull ByteArrayDeprecated.EXPERIMENTAL: This is an experimental feature.@NonNull ByteArrayDeprecated.EXPERIMENTAL: This is an experimental feature.longDeprecated.EXPERIMENTAL: This is an experimental feature.Deprecated.EXPERIMENTAL: This is an experimental feature.@NonNull ByteArrayDeprecated.EXPERIMENTAL: This is an experimental feature.Deprecated.EXPERIMENTAL: This is an experimental feature.Deprecated.EXPERIMENTAL: This is an experimental feature.default PublicKeyCredentialDescriptorDeprecated.This default implementation ofToPublicKeyCredentialDescriptor.toPublicKeyCredentialDescriptor()sets theidfield to the return value ofgetCredentialId()and thetransportsfield to the return value ofgetTransports().
-
Method Details
-
getCredentialId
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.The credential ID of the credential.Implementations MUST NOT return null.
-
getUserHandle
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.The user handle of the user the credential is registered to.Implementations MUST NOT return null.
- See Also:
-
getPublicKeyCose
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.The credential public key encoded in COSE_Key format, as defined in Section 7 of RFC 8152.This is used to verify the
signaturein authentication assertions.If your database has credentials encoded in U2F (raw) format, you may need to use
cosePublicKeyFromEs256Raw(ByteArray)to convert them before returning them in this method.Implementations MUST NOT return null.
-
getSignatureCount
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.The stored signature count of the credential.This is used to validate the
signature counterin authentication assertions. -
getTransports
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release.Transport hints as to how the client might communicate with the authenticator this credential is bound to.Implementations SHOULD return the value returned by
AuthenticatorAttestationResponse.getTransports()when the credential was created. That value SHOULD NOT be modified.Implementations MUST NOT return null.
This is used to set
PublicKeyCredentialDescriptor.getTransports()inexcludeCredentialsinRelyingParty.startRegistration(StartRegistrationOptions)and andallowCredentialsinRelyingParty.startAssertion(StartAssertionOptions).- See Also:
-
isBackupEligible
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release. EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.The state of the BE flag when this credential was registered, if known.If absent, it is not known whether or not this credential is backup eligible.
If present and
true, the credential is backup eligible: it can be backed up in some way, most commonly by syncing the private key to a cloud account.If present and
false, the credential is not backup eligible: it cannot be backed up in any way.CredentialRecordimplementations SHOULD return the first known value returned byRegistrationResult.isBackupEligible()orAssertionResult.isBackupEligible(), if known. If unknown,CredentialRecordimplementations SHOULD returnOptional.empty().Implementations MUST NOT return null.
-
isBackedUp
Deprecated.EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted before reaching a mature release. EXPERIMENTAL: This feature is from a not yet mature standard; it could change as the standard matures.The last known state of the BS flag for this credential, if known.If absent, the backup state of the credential is not known.
If present and
true, the credential is believed to be currently backed up.If present and
false, the credential is believed to not be currently backed up.CredentialRecordimplementations SHOULD return the most recent value returned byAssertionResult.isBackedUp()orRegistrationResult.isBackedUp(), if known. If unknown,CredentialRecordimplementations SHOULD returnOptional.empty().Implementations MUST NOT return null.
-
toPublicKeyCredentialDescriptor
Deprecated.This default implementation ofToPublicKeyCredentialDescriptor.toPublicKeyCredentialDescriptor()sets theidfield to the return value ofgetCredentialId()and thetransportsfield to the return value ofgetTransports().- Specified by:
toPublicKeyCredentialDescriptorin interfaceToPublicKeyCredentialDescriptor- See Also:
-
- credential descriptor for a credential record in Web Authentication Level 3 (Editor's Draft)
-
cosePublicKeyFromEs256Raw
Deprecated.Convert a credential public key from U2F format to COSE_Key format.The U2F JavaScript API encoded credential public keys in
ALG_KEY_ECC_X962_RAWformat as specified in FIDO Registry §3.6.2 Public Key Representation Formats. If your database has credential public keys stored in this format, those public keys need to be converted to COSE_Key format before they can be used by aCredentialRecordinstance. This function performs the conversion.If your application has only used the
navigator.credentials.create()API to register credentials, you likely do not need this function.- Parameters:
es256RawKey- a credential public key inALG_KEY_ECC_X962_RAWformat as specified in FIDO Registry §3.6.2 Public Key Representation Formats.- Returns:
- a credential public key in COSE_Key format, suitable to be returned by
getPublicKeyCose(). - See Also:
-