SecureAreaBoundCredential

Base class for credentials bound to a SecureArea.

This associates a key from a SecureArea to a Credential

Inheritors

Constructors

Link copied to clipboard
protected constructor(document: Document, asReplacementForIdentifier: String?, domain: String, secureArea: SecureArea)

Constructs a new SecureAreaBoundCredential.

constructor(document: Document)

Constructs a Credential from serialized data.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
lateinit var alias: String

The alias for the authentication key associated with this credential.

Link copied to clipboard
abstract val credentialType: String

Identifies credential type.

Link copied to clipboard

The Document that the credential belongs to.

Link copied to clipboard
lateinit var domain: String

The domain of the credential.

Link copied to clipboard
Link copied to clipboard

Indicates whether the credential has been certified yet.

Link copied to clipboard
val issuerProvidedData: ByteString

The issuer-provided data associated with the credential.

Link copied to clipboard
lateinit var secureArea: SecureArea

The secure area for the authentication key associated with this credential.

Link copied to clipboard
val tags: Tags

A Tags for storing application-specific data.

Link copied to clipboard

How many times the credential has been used in an identity presentation.

Link copied to clipboard

The point in time the issuer-provided data is valid from.

Link copied to clipboard

The point in time the issuer-provided data is valid until.

Functions

Link copied to clipboard
open override fun addSerializedData(builder: MapBuilder<CborBuilder>)

Method which can be overridden by Credential subclasses to add any additional information when serializing a credential.

Link copied to clipboard
suspend fun addToDocument()
Link copied to clipboard
open suspend fun certify(issuerProvidedAuthenticationData: ByteString)

Certifies the credential.

Link copied to clipboard
protected open suspend override fun clear()

Cleans up additional credential data, such as a SecureArea key.

Link copied to clipboard
open suspend override fun deserialize(dataItem: DataItem)

Initialize this object using serialized data.

Link copied to clipboard
open suspend fun exportToMpzPass(keyUnlockData: KeyUnlockData? = null): MpzPass

Exports the credential as a MpzPass which can be shared with other applications.

Link copied to clipboard
protected abstract suspend fun extractValidityFromIssuerData(): Pair<Instant, Instant>

Extract validity from the issuer-provided data

Link copied to clipboard
protected suspend fun generateKey(createKeySettings: CreateKeySettings)

Generates an authentication key to which this credential is bound and adds the credential to the document.

Link copied to clipboard

The attestation for the SecureArea key associated with this credential.

Link copied to clipboard
abstract suspend fun getClaims(documentTypeRepository: DocumentTypeRepository?, locales: List<String> = emptyList()): List<Claim>

Gets the claims in the credential.

Link copied to clipboard

Convenience method to extract RevocationInfo from a Credential.

Link copied to clipboard
suspend fun increaseUsageCount()

Increases usage count of the credential.

Link copied to clipboard
open suspend override fun isInvalidated(): Boolean

Indicates whether the credential has been invalidated.

Link copied to clipboard
protected suspend fun useExistingKey(keyAlias: String)

Uses an existing authentication key to which this credential is bound and adds the credential to the document.

Link copied to clipboard
open suspend fun validate(now: Instant? = Clock.System.now()): ValidationResult

Validates this certified credential against its current issuerProvidedData.

open suspend fun validate(issuerProvidedAuthenticationData: ByteString, now: Instant? = Clock.System.now()): ValidationResult

Validates candidate issuer-provided static authentication data against this credential.