feat(desktop-onboarding): neue Onboarding-UI implementiert, Backup- und Rollenmanagement hinzugefügt
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Failing after 3m10s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 6m37s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 5m59s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Has been cancelled
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Failing after 3m10s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 6m37s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 5m59s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Has been cancelled
- Einbindung eines komplett überarbeiteten Onboarding-Screens mit validierten Eingaben für Gerätename, Sicherheitsschlüssel und Backup-Pfad. - `SettingsManager` eingeführt zur Speicherung der Onboarding-Daten in `settings.json`. - Navigation verbessert: Onboarding-Workflow startet, wenn Konfiguration fehlt; neues "Setup"-Icon in der Navigationsleiste hinzugefügt. - Backend: Geräte-API und `DeviceSecurityFilter` für Authentifizierung per Sicherheitsschlüssel implementiert. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
+10
@@ -1,7 +1,10 @@
|
||||
package at.mocode.identity.service.config
|
||||
|
||||
import at.mocode.identity.domain.repository.DeviceRepository
|
||||
import at.mocode.identity.domain.repository.ProfileRepository
|
||||
import at.mocode.identity.domain.service.DeviceService
|
||||
import at.mocode.identity.domain.service.ProfileService
|
||||
import at.mocode.identity.infrastructure.persistence.ExposedDeviceRepository
|
||||
import at.mocode.identity.infrastructure.persistence.ExposedProfileRepository
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
@@ -15,4 +18,11 @@ class IdentityConfig {
|
||||
@Bean
|
||||
fun profileService(profileRepository: ProfileRepository): ProfileService =
|
||||
ProfileService(profileRepository)
|
||||
|
||||
@Bean
|
||||
fun deviceRepository(): DeviceRepository = ExposedDeviceRepository()
|
||||
|
||||
@Bean
|
||||
fun deviceService(deviceRepository: DeviceRepository): DeviceService =
|
||||
DeviceService(deviceRepository)
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package at.mocode.identity.service.web
|
||||
|
||||
import at.mocode.identity.domain.model.Device
|
||||
import at.mocode.identity.domain.model.DeviceRole
|
||||
import at.mocode.identity.domain.service.DeviceService
|
||||
import org.springframework.web.bind.annotation.*
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/devices")
|
||||
class DeviceController(
|
||||
private val deviceService: DeviceService
|
||||
) {
|
||||
|
||||
@PostMapping("/register")
|
||||
suspend fun registerDevice(@RequestBody request: DeviceRegisterRequest): Device {
|
||||
return deviceService.registerDevice(
|
||||
name = request.name,
|
||||
securityKeyHash = request.securityKeyHash,
|
||||
role = request.role
|
||||
)
|
||||
}
|
||||
|
||||
@GetMapping("/{name}")
|
||||
suspend fun getDevice(@PathVariable name: String): Device? {
|
||||
return deviceService.getDeviceByName(name)
|
||||
}
|
||||
}
|
||||
|
||||
data class DeviceRegisterRequest(
|
||||
val name: String,
|
||||
val securityKeyHash: String,
|
||||
val role: DeviceRole
|
||||
)
|
||||
Reference in New Issue
Block a user