feat(websocket)!: Implement WebSocket connection and event handling

This commit is contained in:
2025-11-23 16:10:55 +01:00
parent ba373f91e9
commit c705e31a6d
38 changed files with 2176 additions and 2786 deletions

View File

@@ -6,9 +6,11 @@ import model.users.User
@ImplementedBy(classOf[BaseSessionManager])
trait SessionManager {
def createSession(user: User): String
def getUserBySession(sessionId: String): Option[User]
def invalidateSession(sessionId: String): Unit
}

View File

@@ -8,9 +8,13 @@ import model.users.User
trait UserManager {
def addUser(name: String, password: String): Boolean
def authenticate(name: String, password: String): Option[User]
def userExists(name: String): Option[User]
def userExistsById(id: Long): Option[User]
def removeUser(name: String): Boolean
}

View File

@@ -9,7 +9,7 @@ import javax.inject.{Inject, Singleton}
@Singleton
class StubUserManager @Inject()(val config: Config) extends UserManager {
private val user: Map[String, User] = Map(
"Janis" -> User(
internalId = 1L,
@@ -53,5 +53,5 @@ class StubUserManager @Inject()(val config: Config) extends UserManager {
override def removeUser(name: String): Boolean = {
throw new NotImplementedError("StubUserManager.removeUser is not implemented")
}
}