From ba69aaa5fdea82ee2cffc6c8db49f695bcb0da32 Mon Sep 17 00:00:00 2001 From: Dennis Frommknecht Date: Sat, 13 Feb 2021 18:39:32 +0100 Subject: [PATCH] adjust to changed `HomekitAuthInfo` interface HAP-Java changed the interface to have a `hasUser` method, which indicated whether a user was paired already or not. This interface change remained undetected, because it has a default implementation. The effect of not implementing the method is that HAP-Java will always be in pairing mode. A restart of the app will lead to 'no response' displayed in the home app. --- .../io/github/dfrommi/rehaktor/core/auth/HomekitAuthService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/io/github/dfrommi/rehaktor/core/auth/HomekitAuthService.kt b/src/main/kotlin/io/github/dfrommi/rehaktor/core/auth/HomekitAuthService.kt index 91ac1c2..86e1cb8 100644 --- a/src/main/kotlin/io/github/dfrommi/rehaktor/core/auth/HomekitAuthService.kt +++ b/src/main/kotlin/io/github/dfrommi/rehaktor/core/auth/HomekitAuthService.kt @@ -17,6 +17,8 @@ class HomekitAuthService( override fun getSalt() = authState.salt override fun getUserPublicKey(username: String) = authState.userKeyMap[username] + override fun hasUser() = !authState.userKeyMap.isEmpty() + override fun createUser(username: String, publicKey: ByteArray) { authState.userKeyMap[username] = publicKey authStateRepository.save(authState)