Skip to content

Commit

Permalink
fix: proof_type_supported metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
patlo-iog committed May 7, 2024
1 parent 0116ea4 commit 3a8aff2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object CredentialIssuerEndpoints {

private val credentialConfigurationIdSegment = path[String]("credentialConfigurationId")
.description("An identifier for the credential configuration")
.example("credentialConfigurationId")
.example("configurationId")

private val baseEndpoint = endpoint
.tag(tagName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ final case class CredentialConfiguration(
scope: String,
credential_definition: CredentialDefinition,
cryptographic_binding_methods_supported: Seq[String] = Seq("did:prism"),
credential_signing_alg_values_supported: Seq[String] = Seq("ES256K")
credential_signing_alg_values_supported: Seq[String] = Seq("ES256K"),
proof_types_supported: SupportProofType =
SupportProofType(jwt = ProofTypeConfiguration(proof_signing_alg_values_supported = Seq("ES256K")))
)

object CredentialConfiguration {
Expand All @@ -42,3 +44,19 @@ object CredentialConfiguration {
)
)
}

final case class SupportProofType(jwt: ProofTypeConfiguration)

object SupportProofType {
given schema: Schema[SupportProofType] = Schema.derived
given encoder: JsonEncoder[SupportProofType] = DeriveJsonEncoder.gen
given decoder: JsonDecoder[SupportProofType] = DeriveJsonDecoder.gen
}

final case class ProofTypeConfiguration(proof_signing_alg_values_supported: Seq[String])

object ProofTypeConfiguration {
given schema: Schema[ProofTypeConfiguration] = Schema.derived
given encoder: JsonEncoder[ProofTypeConfiguration] = DeriveJsonEncoder.gen
given decoder: JsonDecoder[ProofTypeConfiguration] = DeriveJsonDecoder.gen
}

0 comments on commit 3a8aff2

Please sign in to comment.