Skip to content

Commit

Permalink
adjust to changed HomekitAuthInfo interface #3
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dfrommi authored Feb 13, 2021
2 parents c4ca7b6 + ba69aaa commit 562922f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 562922f

Please sign in to comment.