HolderAgent

class HolderAgent(validator: Validator = Validator.newDefaultInstance(), subjectCredentialStore: SubjectCredentialStore = InMemorySubjectCredentialStore(), jwsService: JwsService, coseService: CoseService, val identifier: String) : Holder

An agent that only implements Holder, i.e. it can receive credentials form other agents and present credentials to other agents.

Constructors

Link copied to clipboard
constructor(validator: Validator = Validator.newDefaultInstance(), subjectCredentialStore: SubjectCredentialStore = InMemorySubjectCredentialStore(), jwsService: JwsService, coseService: CoseService, identifier: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override 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
open suspend override fun createPresentation(validCredentials: List<String>, challenge: String, audienceId: String): Holder.CreatePresentationResult?

Creates a VerifiablePresentation with the given validCredentials.

open suspend override fun createPresentation(challenge: String, audienceId: String, attributeTypes: Collection<String>?, requestedClaims: Collection<String>?): Holder.CreatePresentationResult?

Creates a VerifiablePresentation serialized as a JWT for all the credentials we have stored, that match attributeTypes (if specified). Optionally filters by requestedClaims (e.g. in ISO or SD-JWT case).

Link copied to clipboard
open suspend override fun getCredentials(attributeTypes: Collection<String>?): Collection<Holder.StoredCredential>?

Gets a list of all stored credentials, with a revocation status.

Link copied to clipboard
open override fun setRevocationList(it: String): Boolean

Sets the revocation list ot use for further processing of Verifiable Credentials

Link copied to clipboard

Stores all verifiable credentials from credentialList that parse and validate, and returns them for future reference.