Skip to content

Commit

Permalink
ATL-7741: Fix PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Bassam Riman <[email protected]>
  • Loading branch information
CryptoKnightIOG committed Sep 10, 2024
1 parent fde53c6 commit f2039bf
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,11 @@ case class OIDCCredentialIssuerServiceImpl(
jwtIssuer <- credentialService
.getJwtIssuer(issuingDID, VerificationRelationship.AssertionMethod, None)
.provideSomeLayer(ZLayer.succeed(wac))

issuerDid <- ZIO
.fromEither(DID.fromString(jwtIssuer.did))
.mapError(error => ServiceError(error))
jwtVC <- buildJwtVerifiableCredential(
jwtIssuer.did,
issuerDid,
subjectDID,
credentialIdentifier,
credentialDefinition,
Expand All @@ -177,7 +179,7 @@ case class OIDCCredentialIssuerServiceImpl(
}

def buildJwtVerifiableCredential(
issuerDid: String,
issuerDid: DID,
subjectDid: Option[DID],
credentialIdentifier: Option[String],
credentialDefinition: CredentialDefinition,
Expand All @@ -192,7 +194,7 @@ case class OIDCCredentialIssuerServiceImpl(
`type` = Set(
"VerifiableCredential"
) ++ credentialDefinition.`type`, // TODO: This information should come from Schema registry by record.schemaId
issuer = Left(issuerDid),
issuer = Left(issuerDid.toString),
issuanceDate = Instant.now(),
maybeExpirationDate = None, // TODO: Add expiration date
maybeCredentialSchema = None, // TODO: Add schema from schema registry
Expand Down

0 comments on commit f2039bf

Please sign in to comment.