Skip to content

Commit d256546

Browse files
fix: trailing tilde in credential jwts in presentation (#351)
2 parents 4dcf272 + b2bcba4 commit d256546

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/kotlin/id/walt/credentials/w3c/VerifiablePresentation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data class PresentableCredential(
6262
} else {
6363
verifiableCredential.sdJwt!!.present(selectiveDisclosure?.let { SDMapBuilder().addField(claimKey, false, it).build() })
6464
}
65-
JsonPrimitive(presentedJwt.toString(formatForPresentation = true))
65+
JsonPrimitive(presentedJwt.toString(formatForPresentation = false))
6666
} else verifiableCredential.toJsonElement()
6767

6868
val isJwt

src/main/kotlin/id/walt/signatory/WaltIdSignatory.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ class WaltIdSignatory(configurationPath: String) : Signatory() {
101101
val fullProofConfig = fillProofConfig(config)
102102
val vcRequest = credentialBuilder.apply {
103103
issuer?.let { setIssuer(it) }
104-
setIssuerId(fullProofConfig.issuerDid)
104+
if(issuer?.id.isNullOrEmpty()) {
105+
setIssuerId(fullProofConfig.issuerDid)
106+
}
105107
setIssuanceDate(fullProofConfig.issueDate ?: Instant.now())
106108
setIssued(fullProofConfig.issueDate ?: Instant.now())
107109
fullProofConfig.subjectDid?.let { setSubjectId(it) }

0 commit comments

Comments
 (0)