Skip to content

Commit

Permalink
feat: implement entity config builder
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmelati committed Aug 20, 2024
1 parent efbee24 commit c37d975
Show file tree
Hide file tree
Showing 15 changed files with 429 additions and 745 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
networks:
- openid_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${DATASOURCE_DB} -U ${DATASOURCE_USER}"]
test: [ "CMD-SHELL", "pg_isready -d ${DATASOURCE_DB} -U ${DATASOURCE_USER}" ]
interval: 3s
timeout: 5s
retries: 20
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.sphereon.oid.fed.server.admin.controllers

import com.sphereon.oid.fed.openapi.models.EntityConfigurationStatement
import com.sphereon.oid.fed.services.EntityStatementService
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("/accounts/{accountUsername}/statement")
class EntityStatementController {
private val entityStatementService = EntityStatementService()

@GetMapping
fun getEntityStatement(@PathVariable accountUsername: String): EntityConfigurationStatement {
return entityStatementService.findByUsername(accountUsername)
}

@PostMapping
fun publishEntityStatement(@PathVariable accountUsername: String): EntityConfigurationStatement {
return entityStatementService.publishByUsername(accountUsername)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class KeyController {
@GetMapping
fun getKeys(@PathVariable accountUsername: String): List<JwkAdminDTO> {
val keys = keyService.getKeys(accountUsername)
return keys
return keys.map { it.toJwkAdminDTO() }
}

@DeleteMapping("/{keyId}")
Expand Down
3 changes: 2 additions & 1 deletion modules/openapi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ kotlin {
outputDir.set("$projectDir/build/generated")
configOptions.set(
mapOf(
"dateLibrary" to "string"
"dateLibrary" to "string",
"collectionType" to "array",
)
)

Expand Down
Loading

0 comments on commit c37d975

Please sign in to comment.