Issuer

interface Issuer

Summarizes operations for an Issuer in the sense of the W3C VC Data Model.

It can issue Verifiable Credentials, revoke credentials and build a revocation list.

Inheritors

Types

Link copied to clipboard
data class Attachment(val name: String, val mediaType: String, val data: ByteArray)
Link copied to clipboard
data class FailedAttribute(val attributeType: String, val reason: Throwable)
Link copied to clipboard
sealed class IssuedCredential

A credential issued by an Issuer, in a specific format

Link copied to clipboard
data class IssuedCredentialResult(val successful: List<Issuer.IssuedCredential> = listOf(), val failed: List<Issuer.FailedAttribute> = listOf())

Properties

Link copied to clipboard
abstract val cryptoAlgorithms: Set<CryptoAlgorithm>

The cryptographic algorithms supported by this issuer, i.e. the ones from its cryptographic service, used to sign credentials.

Link copied to clipboard
abstract val identifier: String

The identifier for this agent, typically the keyId from the cryptographic key, e.g. did:key:mAB... or urn:ietf:params:oauth:jwk-thumbprint:sha256:...

Functions

Link copied to clipboard
abstract fun buildRevocationList(timePeriod: Int? = null): String?

Returns a Base64-encoded, zlib-compressed bitstring of revoked credentials, where the entry at "revocationListIndex" (of the credential) is true iff it is revoked

Link copied to clipboard
Link copied to clipboard
abstract suspend fun issueCredential(subjectPublicKey: CryptoPublicKey, attributeTypes: Collection<String>, representation: ConstantIndex.CredentialRepresentation, claimNames: Collection<String>? = null, dataProviderOverride: IssuerCredentialDataProvider? = null): Issuer.IssuedCredentialResult

Issues credentials for some attributeTypes (i.e. some of at.asitplus.wallet.lib.data.ConstantIndex.CredentialScheme.vcType) to the subject specified with its public key in subjectPublicKey in the format specified by representation. Callers may optionally define some attribute names from ConstantIndex.CredentialScheme.claimNames in claimNames to request only some claims (if supported by the representation).

Link copied to clipboard
abstract suspend fun issueRevocationListCredential(timePeriod: Int? = null): String?

Wraps the revocation information into a VC, returns a JWS representation of that.

Link copied to clipboard
abstract fun revokeCredentials(credentialsToRevoke: List<String>): Boolean

Revokes all verifiable credentials from credentialsToRevoke list that parse and validate. It returns true if all revocations was successful.

Link copied to clipboard
abstract fun revokeCredentialsWithId(credentialIdsToRevoke: Map<String, Instant>): Boolean

Revokes all verifiable credentials with ids and issuance date from credentialIdsToRevoke It returns true if all revocations was successful.