Class VerifiablePresentation
-
- All Implemented Interfaces:
public final class VerifiablePresentationRepresents a Verifiable Presentation according to the W3C Verifiable Credentials Data Model v1.1 and conformant to the Web5 specification. A Verifiable Presentation allows a holder to present one or more credentials.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classVerifiablePresentation.Companion
-
Field Summary
Fields Modifier and Type Field Description private final List<String>contextprivate final List<String>typeprivate final Stringidprivate final Stringholderprivate final DateissuanceDateprivate final DateexpirationDateprivate final List<String>verifiableCredentialprivate final Map<String, Object>additionalPropertiespublic final static VerifiablePresentation.CompanionCompanion
-
Method Summary
Modifier and Type Method Description final List<String>getContext()A list of contexts used to define the semantic meaning of the data contained in the presentation. final List<String>getType()The type(s) of the Verifiable Presentation. final StringgetId()The unique identifier for the Verifiable Presentation. final StringgetHolder()The entity holding and presenting the Verifiable Presentation, identified by a DID or other identifier. final DategetIssuanceDate()The date and time when the presentation was issued. final DategetExpirationDate()The optional expiration date and time after which the presentation is no longer valid. final List<String>getVerifiableCredential()A list of Verifiable Credentials contained within the presentation. final Map<String, Object>getAdditionalProperties()Additional data that may be included in the presentation, represented as a key-value map. final Stringsign(BearerDid bearerDid, String verificationMethodId)Signs the Verifiable Presentation using the specified Bearer DID and optional verification method. -
-
Method Detail
-
getContext
final List<String> getContext()
A list of contexts used to define the semantic meaning of the data contained in the presentation.
-
getHolder
final String getHolder()
The entity holding and presenting the Verifiable Presentation, identified by a DID or other identifier.
-
getIssuanceDate
final Date getIssuanceDate()
The date and time when the presentation was issued.
-
getExpirationDate
final Date getExpirationDate()
The optional expiration date and time after which the presentation is no longer valid.
-
getVerifiableCredential
final List<String> getVerifiableCredential()
A list of Verifiable Credentials contained within the presentation.
-
getAdditionalProperties
final Map<String, Object> getAdditionalProperties()
Additional data that may be included in the presentation, represented as a key-value map.
-
sign
final String sign(BearerDid bearerDid, String verificationMethodId)
Signs the Verifiable Presentation using the specified Bearer DID and optional verification method.
- Parameters:
bearerDid- The DID used to sign the presentation.verificationMethodId- Optional identifier of the Verification Method to sign with.- Returns:
A string representing the signed JWT, serialized as a compact JWS, of the Verifiable Presentation.
-
-
-
-