Credential

@Serializable
data class Credential(val credentialId: String, val isResidentCredential: Boolean, val rpId: String? = null, val privateKey: String, val userHandle: String? = null, val signCount: Int, val largeBlob: String? = null, val backupEligibility: Boolean? = null, val backupState: Boolean? = null, val userName: String? = null, val userDisplayName: String? = null)

Constructors

Link copied to clipboard
constructor(credentialId: String, isResidentCredential: Boolean, rpId: String? = null, privateKey: String, userHandle: String? = null, signCount: Int, largeBlob: String? = null, backupEligibility: Boolean? = null, backupState: Boolean? = null, userName: String? = null, userDisplayName: String? = null)

Properties

Link copied to clipboard

Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.

Link copied to clipboard
val backupState: Boolean? = null

Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val largeBlob: String? = null

The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON)

Link copied to clipboard

The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON)

Link copied to clipboard
val rpId: String? = null

Relying Party ID the credential is scoped to. Must be set when adding a credential.

Link copied to clipboard

Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter

Link copied to clipboard
val userDisplayName: String? = null

The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname

Link copied to clipboard
val userHandle: String? = null

An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user. (Encoded as a base64 string when passed over JSON)

Link copied to clipboard
val userName: String? = null

The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name