Skip to content

Commit

Permalink
fix: trailing tilde in credential jwts in presentation (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
severinstampler authored Oct 3, 2023
2 parents 4dcf272 + b2bcba4 commit d256546
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ data class PresentableCredential(
} else {
verifiableCredential.sdJwt!!.present(selectiveDisclosure?.let { SDMapBuilder().addField(claimKey, false, it).build() })
}
JsonPrimitive(presentedJwt.toString(formatForPresentation = true))
JsonPrimitive(presentedJwt.toString(formatForPresentation = false))
} else verifiableCredential.toJsonElement()

val isJwt
Expand Down
4 changes: 3 additions & 1 deletion src/main/kotlin/id/walt/signatory/WaltIdSignatory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ class WaltIdSignatory(configurationPath: String) : Signatory() {
val fullProofConfig = fillProofConfig(config)
val vcRequest = credentialBuilder.apply {
issuer?.let { setIssuer(it) }
setIssuerId(fullProofConfig.issuerDid)
if(issuer?.id.isNullOrEmpty()) {
setIssuerId(fullProofConfig.issuerDid)
}
setIssuanceDate(fullProofConfig.issueDate ?: Instant.now())
setIssued(fullProofConfig.issueDate ?: Instant.now())
fullProofConfig.subjectDid?.let { setSubjectId(it) }
Expand Down

0 comments on commit d256546

Please sign in to comment.