Add serverside LOGOUT-command #41

Closed
opened 2026-04-01 13:33:55 +02:00 by lars.winzer · 12 comments
lars.winzer commented 2026-04-01 13:33:55 +02:00 (Migrated from git.scicore.unibas.ch)

Task

Summary

Adds parsers and handlers essential to logging out and destroying the user on the server.

Context

CommandParser, Request, CommandHandler

Current Progress

  • LogoutCommandParser
  • LogoutRequest
  • LogoutCommandHandler

Notes

Request

LOGOUT 

Response

+OK

Checklist

  • I outlined checkpoints describing phases of my work related to this task
  • I added relevant labels
  • I linked to other issues or branches that must be completed first
## Task <!--The reccommended type is: Task--> ### Summary Adds parsers and handlers essential to logging out and destroying the user on the server. ### Context CommandParser, Request, CommandHandler ### Current Progress - [x] LogoutCommandParser - [x] LogoutRequest - [x] LogoutCommandHandler ### Notes #### Request ``` LOGOUT ``` #### Response ``` +OK ``` ### Checklist - [x] I outlined checkpoints describing phases of my work related to this task - [x] I added relevant labels - [x] I linked to other issues or branches that must be completed first
lars.winzer commented 2026-04-01 13:34:05 +02:00 (Migrated from git.scicore.unibas.ch)

marked this task as related to #37

marked this task as related to #37
lars.winzer commented 2026-04-01 13:34:10 +02:00 (Migrated from git.scicore.unibas.ch)

marked the checklist item I linked to other issues or branches that must be completed first as completed

marked the checklist item **I linked to other issues or branches that must be completed first** as completed
lars.winzer commented 2026-04-07 12:25:23 +02:00 (Migrated from git.scicore.unibas.ch)

assigned to @lars.winzer

assigned to @lars.winzer
lars.winzer commented 2026-04-07 12:25:41 +02:00 (Migrated from git.scicore.unibas.ch)

created branch feat/41-add-serverside-logout-command to address this issue

created branch [`feat/41-add-serverside-logout-command`](/cs108-fs26/Gruppe-13/-/compare/main...feat%2F41-add-serverside-logout-command) to address this issue
lars.winzer commented 2026-04-07 12:31:31 +02:00 (Migrated from git.scicore.unibas.ch)

marked the checklist item LogoutRequest as completed

marked the checklist item **LogoutRequest** as completed
lars.winzer commented 2026-04-07 12:31:59 +02:00 (Migrated from git.scicore.unibas.ch)

marked the checklist item LogoutCommandParser as completed

marked the checklist item **LogoutCommandParser** as completed
lars.winzer commented 2026-04-07 12:41:52 +02:00 (Migrated from git.scicore.unibas.ch)

marked the checklist item LogoutCommandHandler as completed

marked the checklist item **LogoutCommandHandler** as completed
lars.winzer commented 2026-04-07 12:57:51 +02:00 (Migrated from git.scicore.unibas.ch)

The current implementation of the LogoutHandler is insufficient. It works, but not as intended.

@Override
public void execute(LogoutRequest request) {
    userRegistry.onDisconnect(request.getSessionId());
    responseDispatcher.dispatch(new OkResponse(request.getContext()));
}

With the current implementation, the removal of the user from the UserRegistry is delegated to the UserCleanupJob.

The UserRegistry needs to be expanded to allow for removal of users.

The current implementation of the LogoutHandler is insufficient. It works, but not as intended. ```java @Override public void execute(LogoutRequest request) { userRegistry.onDisconnect(request.getSessionId()); responseDispatcher.dispatch(new OkResponse(request.getContext())); } ``` With the current implementation, the removal of the user from the UserRegistry is delegated to the UserCleanupJob. The UserRegistry needs to be expanded to allow for removal of users.
lars.winzer commented 2026-04-07 13:02:09 +02:00 (Migrated from git.scicore.unibas.ch)

mentioned in task #54

mentioned in task #54
lars.winzer commented 2026-04-07 14:09:41 +02:00 (Migrated from git.scicore.unibas.ch)

mentioned in merge request !83

mentioned in merge request !83
lars.winzer commented 2026-04-07 14:11:25 +02:00 (Migrated from git.scicore.unibas.ch)

mentioned in commit 8a2d0607f8

mentioned in commit 8a2d0607f8d3db5a14e83537ae386841585021b3
lars.winzer (Migrated from git.scicore.unibas.ch) closed this issue 2026-04-07 14:11:26 +02:00
lars.winzer commented 2026-04-07 14:14:08 +02:00 (Migrated from git.scicore.unibas.ch)

added 1h of time spent at 2026-04-07 12:00:00 +0200

added 1h of time spent at 2026-04-07 12:00:00 +0200
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: University-of-Basel-Studentprojects/Programmierprojekt#41