IssuerAgent

class IssuerAgent(validator: Validator, issuerCredentialStore: IssuerCredentialStore = InMemoryIssuerCredentialStore(), revocationListBaseUrl: String = "https://wallet.a-sit.at/backend/credentials/status", dataProvider: IssuerCredentialDataProvider = EmptyCredentialDataProvider, zlibService: ZlibService = DefaultZlibService(), revocationListLifetime: Duration = 48.hours, jwsService: JwsService, clock: Clock = Clock.System, keyId: String, timePeriodProvider: TimePeriodProvider = FixedTimePeriodProvider) : Issuer

An agent that only implements Issuer, i.e. it issues credentials for other agents.

Constructors

Link copied to clipboard
fun IssuerAgent(validator: Validator, issuerCredentialStore: IssuerCredentialStore = InMemoryIssuerCredentialStore(), revocationListBaseUrl: String = "https://wallet.a-sit.at/backend/credentials/status", dataProvider: IssuerCredentialDataProvider = EmptyCredentialDataProvider, zlibService: ZlibService = DefaultZlibService(), revocationListLifetime: Duration = 48.hours, jwsService: JwsService, clock: Clock = Clock.System, keyId: String, timePeriodProvider: TimePeriodProvider = FixedTimePeriodProvider)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun buildRevocationList(timePeriod: Int): 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

Wraps credential into a single VerifiableCredential, returns a JWS representation of that VC.

open suspend override fun issueCredential(subjectId: String, attributeType: String): Issuer.IssuedCredentialResult

Issues credential for attributeType to subjectId, calls dataProvider

Link copied to clipboard
open suspend override fun issueCredentials(subjectId: String, attributeNames: List<String>): Issuer.IssuedCredentialResult

Issues credentials for all attributeNames to subjectId, calls dataProvider

Link copied to clipboard
open suspend override fun issueRevocationListCredential(timePeriod: Int): String?

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

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

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